Macro Language Reference > Macros > Text (Frame Level) > trefhead
  
trefhead
Description
Inserts a running header reference at the text cursor position. The text for the running header reference is called for by a show string inserted with tshow, usually in the header or footer frame of a page.
 
Example 289. Example of header references
The following are two examples of header references set using the trefhead macro.
The first example below shows the macro to a simple header reference in a text stream called strm0, extracts 3 words for group 1 while still showing the text at point of insertion (the options 1 and 0 being the 8 and 6 respectively in the resulting reference). The use of this macro will result in the code <?"|3w",8,1> being placed in the stream.
trefhead 1"|3w"1
The second macro is similar to the first but it includes the ignore flag(s) for reference (1) and attribute (4) tags:
trefhead 1"|3,5w"1
The running header call from the above reference, generated from the tshow dialog box, would be <?show $1"strm0">.
Syntax
trefhead group:n? reference:s? ( show_text:n? )
trefhead
[no parameter]
Invoke the Running Header Reference dialog box.
group
Running header group(s) (optional): number from 1 to 5
reference
A string containing either the text to be used as the running header or an indicator of how many characters or words are to be automatically extracted from the text for use as a running header. If the first character of reference is a | (bar) then a number of words or single characters are extracted from the main text, for example:
s: Extract 1 character
|4s: Extract 4 characters
w: Extract 1 word
|3w: Extract 3 words
Ignore flag(s) can also be included in the reference parameter if required, i.e.
|1 flag s: ignore flag when extracting 1 character
|3 flag w: ignore flag when extracting 3 words
The ignore flag(s) are listed below (note: these are cumulative):
1: <xslt.entity name="reference"/> tags
2: <style> tags
4: ?attributes>
8: End of paragraphs,
16: Maths <$$><$>
32: SGML <!......>
show_text
Ø|0
Do not show text at point of insertion
1
Show text at point of insertion. This is a useful feature in publications such as directories or dictionaries where keywords can be automatically extracted from the text for use as a running header without being removed from the page.