Overview
Use the Printer Codes section to configure the output for several TMG printer codes.
For most printer codes you may choose one of four actions:
- Remove printer code – The printer code will be removed from TMG text values.
- Keep printer code – The printer code will be left as-is in TMG text values.
- Substitute text – The printer code will be converted to a text value.
- Substitute HTML – The printer code will be converted to an HTML value.
For most printer codes, the default behavior is "Substitute HTML". Text values are a better choice for some printer codes and some printer codes do not lend themselves to HTML values. For those printer codes, the default behavior is "Substitute text".
Edit a printer code to change the default behavior.
For single printer codes like [:CR:]
, the Edit Printer Code window includes:
- A reminder of the TMG printer code value, such as
[:CR:]
or[:TAB:]
. - A read-only HTML value which will be used in place of the code if you choose the "Substitute HTML" option.
- An editable text value which will be used in place of the code if you choose the "Substitute text" option.
For paired printer codes like [BOLD:]
and [:BOLD]
, the Edit Printer Code window will show HTML and Text fields for both the start code (.e.g, "[BOLD:]
") and the end code (.e.g, "[:BOLD]
").
If you want to convert a printer code to HTML, but you want to use a different value than supplied in the read-only HTML field provided by TMG to GEDCOM, add the HTML in the text field and set the action to "Substitute text".
Content Codes
Some TMG printer codes surround data that must be modified to implement the meaning of the printer code. For example, the "HID" printer code omits the text that it encloses. For these printer codes, TMG to GEDCOM uses Content Code items. The Actions for Content Codes are as follows:
- Remove printer code and content – The printer codes and the text they enclose will be removed from TMG text values.
- Keep printer code and content – The printer codes and the text they enclose will be left as-is in TMG text values.
- Substitute text for codes – The printer codes will be converted to text values. The enclosed text is left as-is.
For Content Codes, the "Code (start)" value marks the beginning of the enclosed text and the "Code (end)" marks the end of the enclosed text.
Reverse Start and End
If you specify the usual "end code" for a Content Code as the "Code (start)" value, and specify the usual "start code" as the "Code (end)" value, the text removal is reversed. So, for example, some Second Site users use this technique in text values:
[HID:][SS:]Text for Second Site only[:SS][:HID]
If you want the text enclosed by [SS:]
and [:SS]
to be included in the GEDCOM output, add a Content Code item as follows:
- Title:
SS
- Action: Remove printer code and content
- Code (start):
[:SS]
- Code (end):
[SS:]
The code definitions used above will reverse the effects of the enclosing [HID:]
and [:HID]
codes.
Special Text Values
Several escape values may be used in text fields to enter white space values such as newline sequences.
\r\n
– This sequence is converted to the two-character, carriage return and linefeed sequence.\r
– This sequence is converted to the carriage return character.\n
– This sequence is converted to the linefeed character.\nb
– This sequence is converted to the "non-breaking space" character,U+00A0
.\sp
– This sequence is converted to the space character,U+0020
.