Macro Language Reference > PIs > Formatting Instructions > yank
  
yank
Description
This command is used in a similar way to the <?char> and <?word> commands, i.e. within paragraph style definitions and hash callouts to call text from the paragraph text into the paragraph style (a call-in). The <?yank> command, however, has an additional search string option which enables you to specify the actual character(s) you want to call in.
 
Example 392. Use yank to change typeface when a certain element is encountered
The example below will change the typeface to Times New Roman when it encounters <tag>, ignoring <?commands> and <$$> during the search:
<?yank 1,0,20,"/\60\tag\62\/c"><?tf="times–i">
Syntax
<?yank no of yanks:n? ( option:n ignore_flags:n search_strg:n )>
no of yanks
The number of times to execute the search string.
option
The way in which the characters should be extracted from the stream:
0
Cut (default)
1
Copy
ignore_flags
Which tags or codes should be ignored during the formatting of the <?yank> command. The numbers are cumulative so, for example, if you want to ignore all tags and codes, use the value 63.
1
&references;
2
<style_tags>
4
<?commands>
8
Ends of paragraphs, ie.
16
<$$> <$>
32
<!comments>
search_string
Regular search string syntax (see search for further information) with one exception: c is the only permitted option when used with the yank function, e.g.:
/\60\body\62\/c
Additional Information
An example of yanking from within show strings using the <?yank> command is illustrated in the last example of <?showifdef>.
Related Links