TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Kathryn Marshall inquired:
>I use two different paragraph formats for chapter numbers and chapter
>titles. I'd like to create a cross-reference format that inserts:
> "Chapter X, Chapter Title". For example, See Chapter 2, Getting Started
>for more information.
>
>Is there any way to do this without creating TWO separate
>cross-reference formats (what I'm doing currently). It's annoying
>because I have to insert the cross reference twice -- once for the
>chapter number and again for the chapter title.
Yes, there is a way. Assuming the chapter-number paragraph tag is called
"Chapter Number", and assuming it is autonumbered, then you can use the
cross-reference format
<$paranum[Chapter Number]>, <$paratext>
with the chapter title as the target of the cross-reference. This produces
something like
Chapter 1, This Is The Title
The key is putting a paragraph style name in the square brackets. This
makes FrameMaker find the preceeding style with that name, and extract
information from that paragraph instead of from the target paragraph. Very
useful.
In this case, the first part of the cross-reference format,
"<$paranum[Chapter Number]>", pulls the autonumbering out of the first
paragraph with style "Chapter Number" that FrameMaker finds, searching
backwards from the target of the cross-reference.
If you want to pull out the _text_ of a heading, without the autonumbering,
you can use
<$paratext[xxxx]>
where "xxxx" is the name of the paragraph style.
You can also pull out _just_ the number (without any text that may be part
of the autonumbering format). If, for example, the "Chapter Number" style
has the word "CHAPTER" in all caps as part of the autonumber, but you
wanted mixed-case for the cross-reference, you can use
Chapter <$paranumonly[Chapter Number]>, <$paratext>
(You will probably want to put a non-breaking space between the word
"Chapter" and the number. The procedure for doing that varies slightly from
platform to platform. The FrameMaker manual gives info in Appendix A.)