Terry's TMG Tips

TMG Sentence Variables

This page updated 7 Feb 2014

Version note: Applies to TMG 8 & 9

Sentence variables are used in Sentence Structures of tags to specify how the various data fields in that tag will be assembled into text for narrative reports. My article on Modifying Tag Sentence Structures describes how to apply these variables. The Event Tag variables can also be used in Memo fields. See my articles on an Expanded Census Tag and A Customized Will Tag for examples of this usage.

The following tables list all the available variables and describe their uses. The variables may be typed into the fields, but it is generally simpler to select them from the right-click menus in the Memo and Sentence Structure fields.

Variables that refer to people refer to a person or person in one of three ways:

Position Variables – refer to a person by where they are entered in a Tag. The following positions are recognized:

Current Principal Each section of a narrative report has a "focus person" – the one that part of the report is about. When a tag has two principals, and the report section is about one of them, the Current Principal is the one who is the focus of the section.
Other Principal The Principal that is not the focus of the report section.
First Principal The Principal listed first on the Tag Entry screen.
Second Principal The Principal listed second on the Tag Entry screen.
Current Witness The Witness who is the focus of the report section.
Other Witnesses Any Witness who is not the focus of the report section.

Role Variables – refer to a person based on the Role they have been assigned, regardless of where they are entered in the Tag. In the tables below, the term Rolename would be replaced by the name of a Role, such as "Minister," "Heir," or even the standard Roles like "Principal" or Witness."

Subject Variables – refer to the subject of a narrative, the person whose narrative is being constructed, regardless of where they are entered or the Role they are assigned. (Not available in TMG 8)

Some name variables substitute the pronoun "he" or "she" instead of giving the name, to avoid excessive repetition of the name in the text. The pronoun is used for sentences after the first in a paragraph, with certain exceptions.

Event Tag Variables - variables that can be used in all event tags.

Name Variables – produce the names of people

Variable
Result
Example
Principals - variables that refer to persons entered in a tag as Principals
[P]
Current Principal's full name, or a substituted pronoun Mary Jane Smith, or She
[P+]
Current Principal's full name Mary Jane Smith
[PG]
Current Principal's given name Mary Jane
[PF]
Current Principal, first word of given name Mary
[PL] *
Current Principal's last name Smith
[PS]
Current Principal, possessive name Mary Jane Smith's
[PGS]
Current Principal, possessive given name Mary Jane's
[PFS]
Current Principal, possessive first word of given name Mary's
[PLS] *
Current Principal, possessive last name Smith's
[PO]
Other Principal's full name John Edward Black
[POG]
Other Principal's given name John Edward
[POF]
Other Principal, first word of given name John
[POL] *
Other Principal's last name Black
[POS]
Other Principal, possessive name John Edward Black's
[POGS]
Other Principal, possessive given name John Edward's
[POFS]
Other Principal, possessive first word of given name John's
[POLS] *
Other Principal, possessive last name Black's
[P1]
First Principal's full name Mary Jane Smith
[P1G]
First Principal's given name Mary Jane
[P1F]
First Principal, first word of given name Mary
[P1L] *
First Principal's last name Smith
[P1S]
First Principal, possessive name Mary Jane Smith's
[P1GS]
First Principal, possessive given name Mary Jane's
[P1FS]
First Principal, possessive first word of given name Mary's
[P1LS] *
First Principal, possessive last name Smith's
[P2]
Second Principal's full name John Edward Black
[P2G]
Second Principal's given name John Edward
[P2F]
Second Principal, first word of given name John
[P2L] *
Second Principal's last name Black
[P2S]
Second Principal, possessive name John Edward Black's
[P2GS]
Second Principal, possessive given name John Edward's
[P2FS]
Second Principal, possessive first word of given name John's
[P2LS] *
Second Principal, possessive last name Black's
Witnesses - variables that refer to persons entered in a tag as Witnesses
[W]
Current Witness' name, or a substituted pronoun Tom Jones, or He
[W+]
Current Witness' name Tom Jones
[WO]
Other Witnesses' name(s) May Jones, Sue Jones, and Fred Jones
Subjects - variables that refer to the person who is the subject of a narrative, whether entered as Principals or as Witnesses
[S] *
Subject's full name, or a substituted pronoun Mary Jane Smith, or She
[S+] *
Subject's full name Mary Jane Smith
[SG] *
Subject's given name Mary Jane
[SF] *
Subject, first word of given name Mary
[SL] *
Subject's last name Smith
[SS] *
Subject, possessive name Mary Jane Smith's
[SGS] *
Subject, possessive given name Mary Jane's
[SFS] *
Subject, possessive first word of given name Mary's
[SLS] *
Subject, possessive last name Smith's
Roles - variables that refer to persons by Role, whether entered as Principals or as Witnesses, whether they are the subject or not
[R:Rolename]
Full name of the person(s) in the role, or a substituted pronoun John Edward Black, or He, or May Ellen Jones, Sue Mary Jones, and Fred Adam Jones
[R+:Rolename]
Full name of the person(s) in the role John Edward Black, or May Ellen Jones, Sue Mary Jones, and Fred Adam Jones
[RG:Rolename]
Given name of the person(s) in the role John Edward, or May Ellen, Sue Mary, and Fred Adam
[RF:Rolename]
First name of the person(s) in the role John, or May, Sue, and Fred
[RL:Rolename] *
Last name of the person(s) in the role Black, or Jones, Jones, and Jones

Notes:

1. In TMG, the variable [R:Rolename], if used in the Sentence for a person assigned that Role, refers only to that person. When used in the Sentence for any other Role it lists all persons assigned the Role.

2. In Second Site, the variable [R:Rolename] can either operate as described in Note 1 above, or it can list all people assigned the Role. You select which behavior is used on the Data > Names screen.

3. The other Role name variables always list all people assigned the Role.

 

* Not available in TMG 8

Parents Variables – create the name of a person's parents.

Variable
Result
Example
[PAR]
Current Principal's Parents , son of Tom Jones and Mary Smith
[PARO]
Other Principal's Parents , daughter of Robert White and Martha Royal
[PAR1]
First Principal's Parents names , son of Tom Jones and Mary Smith
[PAR2]
Second Principal's Parents names , daughter of Robert White and Martha Royal
[SPAR] *
Subject's Parents , son of Tom Jones and Mary Smith
[FATH]
Father of the current principal Tom Jones
[MOTH]
Mother of the current principal Mary Smith
[FATHO]
Father of the other principal Robert White
[MOTHO]
Mother of the other principal Martha Royal
[SFATH] *
Subject's Father Tom Jones
[SMOTH] *
Subject's Mother Mary Smith
[RPAR:Rolename] Parents of person in the role , son of Tom Jones and Mary Smith

Notes:

1. [PAR], [PARO], [PAR1], [PAR2] and [RPAR:Rolename] produce the comma and "son of" or "daughter of" phrase; the others do not.

2. Parent variables always use the parents' primary name; you cannot select a name variation.

3. [RPAR:Rolename] generally produces unusable output if there is more than one person with the specified role entered in the tag.

 

* Not available in TMG 8

Pronoun Variables – produce pronouns for people.

Variable
Result
Example
[PP]
Possessive pronoun for the current principal His, or Her
[OBJ]
Objective pronoun for the current principal Him, or Her
[SP] *
Nominative pronoun for the subject He, or She
[SPP] *
Possessive pronoun for the subject His or Her
[SM] *
Objective pronoun for the subject Him or Her
[RP:Rolename]
Nominative pronoun for the person(s) in the role He, She, or They
[RS:Rolename]
Possessive pronoun for the person(s) in the role His, Her, or Their
[RM:Rolename]
Objective pronoun for the person(s) in the role Him, Her, or Them

* Not available in TMG 8

Date Variables – refer to the date field.

Variable
Result
Example
[D]
Date 2 Feb 1923
[DD]
Date including the day of the week Fri. 2 Feb 1923
[Y]
Year 1923

Notes:

1. Format of dates is controlled by the setting in Preferences > Program Options > General.

2. Day and month are spelled out if called for on report Options, Dates tab.

3. The preposition "on" or "in" is placed in front of dates if the variable is enclosed in conditional brackets, provided there is nothing between the opening bracket and the variable. Examples:
   <[D]> produces:   on 2 Feb 1923
   < [D]> produces:  2 Feb 1923

 

Age Variables – produce the ages of people.

Variable
Result
Example
[A]
Age of the current principal in years at age 78
[AE]
Age of current principal in years, months, and days at age 78 years, 3 months, 5 days
[AO]
Age of the other principal in years at age 62
[AOE]
Age of the other principal in years, months, and days at age 62 years, 4 months, 12 days
[A1]
Age of the first principal in years at age 78
[A1E]
Age of first principal in years, months, and days at age 78 years, 3 months, 5 days
[A2]
Age of the second principal in years at age 62
[A2E]
Age of second principal in years, months, and days at age 62 years, 4 months, 12 days
[SA] *
Age of the subject in years at age 78
[SE] *
Age of subject in years, months, and days at age 78 years, 3 months, 5 days
[RA:Rolename]
Age of the person(s) in the role in years at age 78
[RE:Rolename]
Age of the person(s) in the role in years, months, and days at age 78 years, 3 months, 5 days

Notes:

1. The phrase "at age" is only produced if the variable is enclosed in conditional brackets, for example: <[A]>

2. If there is more than one person with the Role, the Role variables produce the ages of every person with that role, for example: at age 23, at age 45, and at age 38.

3. The "E" variables produce different results when the primary birth tag and the tag containing the variable both have less than a full day, month, and year date.

 

* Not available in TMG 8

Location Variables – refer to the location fields.

Variable
Result
[L]
Place data (all fields, as specified by Place Style or report options)
[L1] or [LA] or [ADDRESSEE]
Addressee field
[L2] or [LD] or [DETAIL]
Detail field
[L3] or [LCI] or [CITY]
City field
[L4] or [LCN] or [COUNTY]
County field
[L5] or [LS] or [STATE]
State field
[L6] or [LCR] or [COUNTRY]
Country field
[L7] or [LZ] or [ZIP]
Postal Code field
[L8] or [LL] or [LATLONG]
Latitude - Longitude field
[L9] or [LP] or [PHONE]
Telephone field
[L10] or [LT] or [TEMPLE]
Temple field

Note:

The preposition "at" or "in" (depending on the report options setting) is placed in front of locations if the variable is enclosed in conditional brackets, provided there is nothing between the opening bracket and the variable. Examples:
   <[L]> produces:   at San Francisco
   < [L]> produces:  San Francisco

 

Memo Variables – refer to Memo fields

Variable
Result
[M]
The Memo field
[M1]...[M9]
Segments of a split Memo
[WM]
The Witness Memo field
[WM1]...[WM9]
Segments of a split Witness Memo
<[M0]>
Forces a Memo field to not print

Notes:

1. Segments are created in Memo fields by separating the segments with double "bar" characters. Illustration:
    The first segment||the second

2. The Witness Memo variables can only be used in sentences for Witnesses.

 

 

Name Tag Variables - These variables may be used only in Name Tags

Variable
Result
[P]
Current Principal's primary name
[N]
Name of the current principal in the current tag
[PP]
Possessive Pronoun for the Current Principal
[OBJ]
Objective Pronoun for the Current Principal
[D]
Date
[M]
The Memo field
[M1]...[M9]
Segments of a split Memo
<[M0]>
Forces a Memo field to not print

 

Control Characters used in Sentences

There are several special characters used in Sentences to control how the variables are interpreted or otherwise control the output in narratives. They include:

Character
Result
Example
<   >
Called "Conditional Brackets" - they tell TMG to ignore whatever is inside the brackets if the referenced field is empty. If the brackets are not used, and the referenced field is empty, a term like "an unknown value" will appear in the output. <with [WO]>

Notes:

1. Text or punctuation can be included within the brackets, and it will also be omitted if the reference field is empty.

2. Only one variable should be included with the brackets.

3. TMG automatically manages spaces around brackets to avoid missing or multiple spaces.

4. For some variables, as noted in the above tables, the brackets also cause associated prepositions or other phrases to be included.

 
|
Allows different wording when there is a second Principal in the tag. The text before the bar is used if there is only one Principal, and that after is used instead if there is a second Principal. [P] <was|and [PO] were>
||
Allows for different Sentences to be used if the focus person his living or not, as marked with the Living Flag (values of Y and ? are considered living). The part before the double bars is used if the person is not living, and the part afterwards if they are. [P] was living <[L]>||[P] is living <[L]>

Notes:

1. The bar is found on the same key the "\" on most keyboards, usually below or above the Enter key. On the key it usually has a break in the middle, making it appear as two segments.

2. The single and double bars only apply to Principals. If the double bar is used in sentences for Witnesses, the Flag setting for the first Principal controls which part of the Sentence is used.

 
\
Allows characters that have special meaning to TMG, such as the three listed above, -, [, ], {, }, or \, to be interpreted as ordinary text and be output as entered. \- [M]

Note:

The backslash character can be used Tag, Witness, Citation, Source, and Repository Memos, Source Templates, Source Elements, and the Citation Detail

 
[+]
Joins the output of one Tag to that of the preceding one. [+] and was buried <[D]> <[L]>

Notes:

1. The [+] code must appear as the first characters in the Sentence.

2. See my article on Combining Output Sentences for considerations on use of this code.

 
[:NP:]
Suppresses automatic management of end-of-sentence punctuation. The following were listed:[:NP:]

Notes:

1. This code prevents removal of user-supplied final punctuation, and causes the automatic final period to not be applied.

2. It is a good practice to place this code at the end of the sentence.

 
[:NoBirthPlaces:]
Suppresses the list of display of birth places in the list of children in a Journal report. The children of [P] and [PO]<, all born in [L],[:NoBirthPlaces:]> were as follows:
[:NONE:]
Suppresses the "children" statement in a Journal report entirely. [:NONE:]

Notes:

1. These codes only function in the NarrativeChildren tag, and only for Journal reports.

2. See my article on Customizing the "Children of" Statement for discussion of use of these codes.

 


ReigelRidge Home Terry's Tips Home Contact Terry

 

 

Copyright 2000- by Terry Reigel