Macro Language Reference > Macros > Text (Frame Level) > ttjoin
  
ttjoin
Description
Joins two text streams together by copying the contents of a specified text stream to the end of the current stream and then deleting the original. Frames that contained the specified text stream are updated to contain the current stream.
 
Example 300. Join two text streams
The macro shown below will append Chapter2 to the end of Chapter1 (assuming that Chapter1 is the name of the current text stream):
ttjoin "Chapter2"
 
Example 301. Join all text streams in a document in alphabetical order
The ttjoin macro can be especially useful when automated with a script. The example below uses tflist to join all the text tags in a document in alphabetical order based on their name:
^blank=
tflist 1,"t"
:loop
?=^tflist,^blank trun 0
ttjoin "^tflist"^
tflist
{loop
Syntax
ttjoin stream name:t
stream name
The name of the text tag to be moved to the end of the current text stream.
Related Links