Macro Language Reference > Macros > Tag > ttagren
  
ttagren
Description
Renames a tag. Frames or pages that contain references to the tag under its old name also have their references renamed. Style tags are renamed, but the codes that refer to them in the text are not changed unless you specify an update text option.
 
Example 279. Rename a style tag and update associated text streams
The example below uses ttagren to rename the body style tag as small and updates the text so that all paragraphs tagged as body are tagged with small:
ttagren "body", "small", 1
 
Example 280. Rename a tag and change its type
The example below renames the small style tag as S and changes it to a reference type tag:
ttagren "small", "S.rf"
 
Example 281. Change tag type
This macro will change a standard .Tx stream called script into a .Sc stream.
ttagren "script" ".sc"
Syntax
ttagren old name:t? ( new name:t? ) update text:n?
ttagren
[no parameter]
Invoke the Rename or move tag(s) dialog box.
old name
The name of the tag to be renamed. This must be a tag name that already exists. If it does not the Rename Tag dialog box will appear to allow you to enter the correct name, or select from a drop-down list of tags.
new name
Either the new name for the tag, a tag type code (see ttagmk), or a new name for the tag with a tag type code.
* 
The new name can be the same name as old name if you want to change the upper/lower case representation of a tag, e.g. to change body to BODY.
update text
0
Do not update any uses of old name within text streams
1
Update text by performing a search for all references to old name and replacing it with new name.
Related Links