Macro Language Reference > PIs > Text > <?tcmap>
  
<?tcmap>
Description
Assigns a character map to a text stream, which will enable the mapping of individual characters or strings within the text to other characters and/or strings during formatting.
 
Example 517. Refer to character map stream
Use the syntax below to refer to your character map stream, where "character_map_ stream_name" is the name of your character map stream:
<?tcmap="character_map_ stream_name">
 
Example 518. Sample character map stream syntax
/hello/goodbye/
This will map any occurrences of 'hello' to 'goodbye'.
/this/that/
This will map any occurrences of 'this' to 'that'.
Syntax
<?tcmap map_name:s?>
<?tcmap>
[no parameter]
Invoke the Character - map dialog box.
map_name
The name of the character map stream: a text stream with a .mp file extension.
Additional Information
Character mapping works in a similar way to ligatures in that PTC ALD replaces the characters in the WYSIWYG view according to the character map but the original characters still appear when viewing the text in the edit bar.
A character map stream contains a similar syntax to the search and replace functionality and, during formatting, PTC ALD first breaks the text into words, then passes these words through the character map and finally applies ligatures and kerning, thus producing the final font characters to draw.
 
If you are replacing one string with another string, the first string must be matched identically. If this first string contains any processing instructions, this match will not be made. In this instance the string plus its processing instructions will be output as literal text.