How to add a space before a table entry

I am creating a table I call Common Place Names. They contain names like: East, South, Sunny, and Haven,
There are three or so tables attached to the parent table, the first table picks the order from the next two tables, for example:
[@table2&;#93;
[@table3&;#93;
[@table2&;#93;[@table3&;#93;
.

table2 contains extensions like ville or den, where table3 contains second parts words like Creek or Canyon.


I need a space to appear before table 3 gets inserted, especially on the second entry of"[@table3]";

I know in the third entry in the table above I can just put a space between the lookups for table2 and table3, but I still need a space for the second entry.

Otherwise I get results like:
SunnyvilleCreek
EastCreek

Where i need the space before the table3 entry.

Thanks in advance!

Comments

  • Nevermind, I figured it out. I changed the line with only table3 in it to:
    [ ] [@table3&;#93;
    
    I am not sure if it is supposed to work that way but it does work.

    Another question:
    How do I add a table lookup to all the entries to the primary table without entering it on every line?
    For example:
    In my Common Place Names table the entries are as follows
    East[@table1&;#93;
    South[@table1&;#93;
    Sunny[@table1&;#93;
    Haven[@table1&;#93;
    
    How do I change that so I do not have to list the reference to "table1" on every line? Basically I want the "table1" reference to be automatically added to the end of all the entries in the Common Place Names table?

    Or should I start another thread with this question?
  • Clever! I've never thought to try that. Other ways to force a space are:
    \_[@table3&;#93;
    
    (though I think this has proven to be somewhat unreliable)

    or...
     [@table3&;#93;
    
    (reliable though somewhat ugly)


    Regarding your latest question, I'd create a table called TownPrefix.
    table: TownPrefix
    East
    South
    Sunny
    Haven
    
    With that, you could generate the town name as just:
    She hails from [@TownPrefix&;#93; [@table1&;#93;.
    
    Or, if you have several places in your code to generate town names, you could create a single-entry table:
    She hails from [@TownName&;#93;.
    
    table: TownName
    [@TownPrefix&;#93; [@table1&;#93;
    

    Hope that helps!
  • largando wrote:
    Regarding your latest question, I'd create a table called TownPrefix.
    table: TownPrefix
    East
    South
    Sunny
    Haven
    
    With that, you could generate the town name as just:
    She hails from [@TownPrefix&;#93; [@table1&;#93;.
    
    Or, if you have several places in your code to generate town names, you could create a single-entry table:
    She hails from [@TownName&;#93;.
    
    table: TownName
    [@TownPrefix&;#93; [@table1&;#93;
    

    Hope that helps!

    Thanks, I'll try out your other suggestions if it comes up again.

    On your code above, I am not sure how that would work in my current setup.
    Here are the first few lines of code from my table:
    Table: Common Place Names
    East[@table4&;#93;[@table1&;#93;
    West[@table4&;#93;[@table1&;#93;
    North[@table4&;#93;[@table1&;#93;
    South[@table4&;#93;[@table1&;#93;
    [@Num&;#93;Bakers[@table1&;#93;
    Brook[@table1&;#93;
    
    Would I simply change the table to Common Place Names [@table1]
    Or would it be better to create another table like this:
    Table: Prime
    [@Common Place Names] [@table1&;#93;
    
    Actually that makes perfect sense and am not sure why I didn't think of it before....Thanks for the help!

    Edit: to correct the code!

Leave a Comment