Cross-References

A cross-reference is a dynamic navigation link that lets you connect text from one place in a topic to another place. Cross-references are based on format commands that help you keep the look of links consistent.

In Contributor, cross-references can be added as links to other places in the same document. They cannot be added to other topics in a review package.

Automating Links Based on Commands

Cross-references are somewhat similar to text hyperlinks. However, cross-references differ from hyperlinks in a few ways. (1) They are based on format commands that help you keep the look of links consistent, using the MadCap|xref style. Commands are contained in brackets (e.g., {paratext}). (2) They are especially useful for print output because they let you automatically refer to specific areas and/or page numbers in the output. (3) Both the source and destination files must be part of the same target output within the same project.

Example Here is an example of a cross-reference format, using a combination of text and commands:

See {b}"{paratext}"{/b} on page {page}.

A format such as this might be translated in the output as something like this:

See "Dogs and Cats" on page 93.

If you are using autonumbers in your content (e.g., for figure or table numbers), you can create cross-reference formats that include the autonumbers.

Example You have created autonumbers in order to number all of your figures. Perhaps your autonumber format is set up to show the word "Figure" followed by an incremented number and a colon (e.g., Figure 4:, Figure 5:, Figure 6:). In addition, wherever you apply autonumbering in a topic, you might manually type a short description of the image (e.g., Properties Dialog). So in the output under the graphic, the user might see something like this:

Figure 4: Properties Dialog

Now let's say that you want to insert a cross-reference in another topic that points the user to the Figure 4 graphic. To do this, first of all you would probably want to insert a bookmark at that autonumber location so that you can point directly to that paragraph when you insert the cross-reference. Then you can create a special cross-reference format that includes the autonumber portion of that paragraph. The following two autonumber commands can be used:

{paranum} This command displays all of the content in the autonumber format, including any text before an autonumber, the autonumber itself, and any text after the autonumber. Using the example provided above, this command would display something like this in the cross-reference:

Figure 4:

{paranumonly} This command displays any text before an autonumber and the autonumber itself. However, it does not show any text after the autonumber (such as a colon). Using the example provided above, this command would display something like this in the cross-reference:

Figure 4

In addition, if you want to include any text that you manually add in the topic after the autonumber format, you can add the {paratext} command to the cross-reference format. Using the example provided above, this command would display something like this in the cross-reference:

Properties Dialog

Therefore, suppose your entire cross-reference format is this:

See "{paranum} {paratext}"

In that case, the output would display something like this:

See "Figure 4: Properties Dialog"

On the other hand, suppose your entire cross-reference format is this:

See "{paranumonly} {paratext}"

In that case, the output would display something like this (without the colon):

See Figure 4 Properties Dialog

Again, when you insert the cross-reference in a topic, make sure you select the format that you created, and also remember to link to the bookmarked paragraph where the autonumber appears.

Cross-Reference Commands

b

Start bold text

/b

End bold text

bg

Start new background color

/bg

End background color

color

Start new text color

/color

End text color

default

Reset all font changes

ext

File extension

family

Start new font family

/family

End font family

file

File name, including extension

filename

File name, without extension

h1

Text of first heading 1 paragraph

h2

Text of first heading 2 paragraph

h3

Text of first heading 3 paragraph

h4

Text of first heading 4 paragraph

h5

Text of first heading 5 paragraph

h6

Text of first heading 6 paragraph

i

Start italic text

/i

End italic text

page

Page number

pagecount

Page count

pageref

Context-sensitive page reference

paranum

The autonumber text of bookmarked paragraph.

paranumonly

The autonumber only of bookmarked paragraph

paratext

Text of bookmarked paragraph

paraxml

Text and markup of bookmarked paragraph

path

File path

size

Start new font size

/size

End font size

sub

Start subscript text

/sub

End subscript text

sup

Start superscript text

/sup

End superscript text

title

Title of document

u

Start underlined text

/u

End underlined text

url

File path, URL syntax

[variable]

Available variables can be entered in the cross-reference format.

What’s Noteworthy?

Note This feature is not supported for MadCap Lingo review package (LIREV) files.