When you need to present lists of items, you would typically insert to the right of the next to last item an 'and' or an 'or' to signal that the list is about to end. When the list is static, all you do is type the appropriate conjunction between the next to last and last item. But when the list is fluid, a much more challenging issue is presented, one that is particularly difficult to program for.

 

1.   Here is my list of jobs:

a.Take out the garbage;

b.Mow the lawn;

c.Wash the dishes;

d.Vacuum the floor.

 

   Viewing the example above, you can see some of the complexities.The first issue deals with the punctuation of the intermediate and final choices.  Item d. ends with a period, whereas the others with a semicolon.

   You could append an 'and' at the end of a-c and then remove (manually or with the help of a program) the unnecessary 'and' when the document is fully assembled.

   But that necessarily assumes that d. will always be the last choice. It doesn't work if you choose a and b (and not c and d) because the punctuation mark ending 'b' is a semicolon, and you want a period.

Automated Approach:

   Other programs make setting up the handling of the 'final and' a programming nightmare.

   It's easy and all plain text and plainly visible in Pathagoras.

   (Before going further, keep in mind that the examples set out immediately below represent resulting text after application of Options selections. An example of an options block that may lead to the initial examples is provided near the end of this article.)

   If the last item is always the last item (example, the last item is "Other ___________."):

   Here you are not worried about changing interim punctuation to that final period. Just punctuate as you expect the text to be regardless of which items are actually selected. Type '<&FINAND>' (the case doesn't matter. ,<&FinAnd> works just as well.) You can use any text after the opening '<&'. Here, we selected 'Fin' for 'Final'

Here is my list of jobs:

a.Take out the garbage;<&FINAND>

b.Mow the lawn;<&FINAND>

c.Wash the dishes;<&FINAND>

d.Vacuum the floor;<&FINAND>

e.Other _______________.

 

 There are three part to this code. The first part is the '<&'; the second part is the distinguishing code (more on this below) (we used FIN). The third part is 'AND' and a final '>'. (But the third part could have been 'OR' and a final '>'.)

   If the last item can be any item in the list, including the first item,

There are 4 parts to this code. The first part is '<&'. The second is the distinguishing text (here we used 'FIN' for final). The third part is the final line's punctuation (which can only be a period, a question mark or an exclamation mark). The third part is ''AND' and a final '>' or 'OR' and the final '>'. The code must be appended to each line that could be the final line (including the current final line.

 

Here is a list of jobs:

a.Take out the garbage;<&Fin.And>

b.Mow the lawn;<&Fin.And>

c.Wash the dishes;<&Fin.And>

d.Vacuum the floor.<&Fin.And>

 

NOTE: The distinguishing text' must be unique for each list, but you can have multiple lists in the document. But the can be similar. For example <&FIN1AND> and <&FIN2AND> are unique enough to identify the two lists below.

Here is a list of my jobs:

a.Take out the garbage;<&FIN1And>

b.Mow the lawn;<&FIN1And>

c.Wash the dishes;<&FIN1And>

d.Vacuum the floor.<&FIN1And>
 

This is a list of your jobs:

a.Do the laundry;<&Fin2And>

b.Edge the yard;<&Fin2And>

c.Empty the dishwasher;<&Fin2And>

d.Mop the floors.<&FIN2And>

 

OR conjunction:

For the Or conjunction, just substitute 'Or' for 'And' in any of the above setups.

 

Notes:

   Before adding the <&. . .> text, make sure the paragraphs have all the punctuation you want using the assumption that all elements will be chosen. Pathagoras doesn't 'add' the punctuation to the last line; it merely backspaces and replaces it.

   The 'And' or 'AND' or 'and' (or 'OR' or 'Or' or 'or') that you type in the list will control the replacement.

   The above lists suggest that the user will manually remove the items that are not to remain on the list. And if you do that, press Alt-P to process the <&Fin. . .> blocks.

   The below example applies '<<*Options*' blocks to the last list shown above. When this list is processed, the <&Fin. . .> blocks are processed automatically with the rest of the document. (When processing a list with a 'Final And/Or' tag, you are presented 'connectors' ('and', 'or', 'space', etc.) after you select the second item. Choose 'None' because the connector is already selected.)

 

Here is the list of my jobs:

<<*Options*!MyJobs!Garbage/Lawn/Dishes/Vacuum/Stove/Silver*

a.Take out the garbage;<&FIN1.And>/

b.Mow the lawn;<&FIN1.And>/

c.Wash the dishes;<&FIN1.And>/

d.Vacuum the floor;<&FIN1.And>/

e.Clean stove;<&FIN1.And>/

f.Polish silverware;<&FIN1.And>

>>

This is the list of your jobs:

<<*Options*!YourJobs!Laundry/Yard/Dishwasher/Mop*

a.Do the laundry;<&Fin2.And>/

b.Edge the yard;<&Fin2.And>/

c.Empty the dishwasher;<&Fin2.And>/

d.Mop the floors;<&Fin2.And>

>>

If the last line is always going to be the last line, you should (1) exclude it from the Options selection and (2) remove the 'final punctuation' (because it's location is apparent from the list).

Here is the list of my jobs (only I can touch the silver):

<<*Options*!MyJobs!Garbage/Lawn/Dishes/Vacuum/Stove*

a.Take out the garbage;<&FIN1And>/

b.Mow the lawn;<&FIN1And>/

c.Wash the dishes;<&FIN1And>/

d.Vacuum the floor;<&FIN1And>/

e.Clean stove;<&FIN1And> >>

f.Polish silverware.

 

This is the list of your jobs:

<<*Options*!YourJobs!Laundry/Yard/Dishwasher/Mop*

a.Do the laundry;<&Fin2.And>/

b.Edge the yard;<&Fin2.And>/

c.Empty the dishwasher;<&Fin2.And>/

d.Mop the floors;<&Fin2.And>

>>

Note: The difference between the 'last item always the last line' and 'all lines could be last line' is the punctuation --period or semi-colon preceding the connector word. <&FIN1.And> vs.<&FIN1And>. With the punctuation mark, the connector is applied to the penultimate item in the list. If no punctuation mark, it is applied to the last item in the list (to connect it to the final line that Pathagoras does not touch.

Note: If using conditional text (<< *Options*. . .>> or <<*Optional*. . .>>), the closing '>>' must be separated by at least one character, typically a space or an Enter. (See 'e.' in the first set and 'd.' in the second set.)

 

Note2: The Final 'And'/'Or' routine can be adapted to almost any language. Just type the appropriate 'And' and 'Or' words in the Language section of the Local Settings screen accessible from the Repeat screen.