Macro Language Reference > Macros > Text (Frame Level) > ttagsort
  
ttagsort
Description
Sorts the contents of a text stream by paragraph or other 'block', either alphabetically or via an alternative sort map, which can specify a different sort order.
 
Example 295. Sort all tags in a stream into alphabetical order
The example below would sort all the tags in the text stream strm0 into alphabetical order.
ttagsort "strm0"
Syntax
ttagsort sort order:b? stream:t? separator:n? sort map:t? sort embd digits:o? ignore punctuation:o? ignore tags and refs:o?
ttagsort
[no parameter]
Invoke the Sort text stream dialog box.
sort order
Precede stream with a - (hyphen) character to reverse the order in which text is sorted, e.g. Z-A.
stream
The name of the text stream to be sorted.
separator
The character to be treated as an 'end of record' marker for sorting: define the character via its position in PTC ALD character set. For example, enter 10 to denote a paragraph end, 261 to denote a page break.
sort map
The name of a map specifying an alternative sort order. Maps may either be internal streams or external maps located in the smaps.3ad file.
sort embd digits
How to treat embedded digits during sorting:
0
Character by character
1
As numbers
ignore punctuation
0
Include all punctuation in the text stream
1
Ignore all punctuation in the text stream
ignore tags and refs
0
Include all tags and references in the text stream
1
Ignore all tags and references in the text stream