Getting the Most Out Of Cross-References

We all love hyperlinks—they take us where we need to go, and we never actually have to know how to get there. They do the driving! But sometimes it’s still important to know the specific destination, and that’s where cross-references (the granddaddy of hyperlinks) come in. This article explores the details of cross-reference creation in InDesign so you can help your readers easily navigate to anywhere they need to go.
A cross-reference, often shortened to x-ref, is basically a pointer to another part of your document. You see these all the time, for example, with lines like “For more information, see XYZ on page 32.” What makes using cross-references in InDesign so useful is that page numbers will be kept current and up to date even as your content (and the pages that content appears on) changes. You set these up using the Cross-References panel, which since the January 2014 release of InDesign CC (9.2) is no longer part of the Hyperlinks panel.
To create a cross-reference, place your cursor in your text where you want the x-ref to appear, and click the Create New Cross-Reference button in the Cross-References panel (this command is also found in the panel’s flyout menu). You could also choose Type > Hyperlinks and Cross-References >Insert Cross-Reference, or Interactive > Insert Cross-Reference from the contextual menu. Your first option in the New Cross-Reference dialog box allows you to specify whether the cross-reference destination is a paragraph style, such as a heading, or from a text anchor you’ve created and inserted into your text.
Text Anchor destinations
If you want your cross-reference(s) to point to a text anchor, you’ll save yourself some frustration by creating those anchors first, because you can’t access the Hyperlinks panel (to create a new anchor) while you’re inside the New Cross-Reference dialog box—heck, you can’t even scroll your document! To create a text anchor, in the Hyperlinks panel choose New Hyperlinks Destination > Text Anchor.
Figure 1: Creating a text anchor using the New Hyperlink Destination command.
Assuming you’ve already created your text anchors, simply choose the destination document and text-anchor names from the drop-down menus, and the x-ref will be created.
Paragraph destinations
The other Link To: destination option for an x-ref is Paragraph. With this option selected, you choose which document you want to link to, select the paragraph style applied to the text of your destination on the left (another reason to format all your text with paragraph styles), and then select the destination paragraph in the list that appears on the right.
Figure 2: Setting up a cross-reference with the Link To: Paragraph option.
The sequential, modal process in the New Cross-Reference dialog box may feel a bit tedious and frustrating, but the good news is that your cross-reference is being created on the fly in the background as you choose your options.
Cross-Reference Formats
There are many ways to determine the look of your x-ref using the Cross-Reference Format options, such as Page Number Only or Full Paragraph & Page Number. You need only select from the list in the Format pop-up menu.
However, if you want to customize the look of your cross-reference, you can open the Cross-Reference Formats dialog box by clicking the Create Or Edit Cross-Reference Formats button ( ) to the right of the Format drop-down menu (see figure below). Clicking the Building Block button (
) allows you to edit the definition of the cross-reference with predetermined building blocks or code tags (indicated by the angle brackets). You can also apply a character style to your entire x-ref. Also in the figure, I’ve added the word see before the cross-reference, used a non-breaking space instead of a regular space, and applied my Cross Reference character style to highlight the cross-reference in blue.
When you’re editing a custom x-ref format, you can use the Building Block button to access basic code tags, such as Page Number and Paragraph Text. This also provides other tags that allow you to customize your cross-reference, such as Partial Paragraph and Character Style. For instance, if your cross-reference links to a long headline that uses a colon, such as InDesignSecrets: The world’s #1 resource for all things InDesign, you could use the Partial Paragraph tag: <fullPara delim="" includeDelim="false"/>
to include only the part of the paragraph up to the colon by entering a colon between the quote marks and making sure the includeDelim
value is false
so as not to include the colon itself. Note that there seems to be a bug in InDesign CC 2015 that causes curly quotes to be inserted into the code, rendering it invalid! To work around this problem, use a plain text editor to write the code, and then copy and paste it into the dialog box. You could further customize the look of the x-ref by using the Character Style tag: <cs name=""></cs>
to enclose the Partial Paragraph tag and apply a character style named “Italic,” for example. Your final definition would then look like this:
see <cs name="Italic"><fullPara delim=":" includeDelim="false"/>
and the result for your cross-reference would be:
</cs> on page ^S<pageNum/>
see InDesign Secrets on page 23
Just like the Find/Change dialog box, the Special Characters button ( ) allows you to choose from InDesign’s list of special characters, such as the non-breaking space that I used (
^S
).
Unfortunately, unlike many of InDesign’s dialog boxes, there is no Preview option to see the results of your definitions; however, the Save command works in a similar fashion, showing your changes without closing the dialog box. If you don’t like a change you’ve made, simply edit it within the Definition window, and click Save again to update the definition. Click OK when you are happy with the appearance of your cross-reference.
Keep in mind that any adjustments made to a cross-reference format apply to all cross-references with that name—if you wanted some x-refs with a character style and others without, you would need to name and use two different cross-reference formats. Finally, don’t forget you can save yourself time by choosing Load Cross-Reference Formats from the panel’s flyout menu to load x-refs made in another document into the one you are working on.
The final section of the New Cross-Reference dialog box allows you to specify appearance options for x-ref links within a PDF. These characteristics are a sort of limited version of a character style, and appear only when the Include > Hyperlinks setting is used when creating the PDF in InDesign.
Figure 4: Cross-references can be inverted, inset, or outlined when a user mouses over them in an interactive PDF, according to options set in the PDF Appearance section of the New Cross-References dialog box.
What to watch out for when working with Cross References
On the surface, creating cross-references is fairly straightforward, but there’s a lot that can trip up a new user. Here are some of the pitfalls I’ve encountered (and the solutions I’ve found to most of these setbacks).
- It’s not immediately obvious how to apply a character style to a cross-reference. The trick is to click the Edit Cross-Reference Formats button (
), which opens a dialog box where you can choose a character style.Figure 5: You have to edit the cross-reference format to apply a character style.
- Deleting cross-references essentially converts the x-ref to text, often with the wrong page number! To remedy this problem, select the cross-reference first, and then choose Type > Text Variables > Convert Variable to Text, and then delete the cross-reference.
- The Definition section of the Cross-Reference Formats dialog box is clunky and difficult to use. For starters, the text is incredibly tiny and hard to see. One solution is to copy and paste your cross-reference code between a plain text editor (or code editing application) and the dialog box.
Figure 6: Working in a dedicated code editing application like TextWrangler (top) can be a lot easier on your eyes than the Cross-Reference Formats dialog box.
- I find navigating cross-references frustrating too. If you select a cross-reference in the Cross-References panel, the “Go to source of the selected cross-reference” and “Go to destination of the selected cross-reference” icons become active at the bottom of the panel. However, you can only go to the source if you click on it first. If you click on the destination first, the icons become inactive…and you can’t then go to the source! (Granted, you can go to the source by clicking on the page number in the panel, or navigate to it manually.) It’s a small annoyance, but still, the icons should always work, regardless of which order you choose them.
- Finally, the cross-reference feature is often the cause of slowdowns in InDesign, especially with x-refs that span from one document to another. If feasible, opening all the documents containing your cross-references can help in this situation.
The Bottom Line
Cross-references were a good and welcome addition to InDesign when they were added in CS4. Over the years, however, the feature has seen minor attention at best. But if your needs are basic and you understand its quirks and peculiarities, the cross-references feature will see you to your next page, your next document, and beyond.
Sidebar:
When you need more power than InDesign’s built-in Cross-References
Let’s face it, InDesign’s built-in cross-references feature comes up short at times. Fortunately, other companies have stepped up to offer solutions for when InDesign alone just can’t get the job done.
Cross References Pro
DTP Tools (dtptools.com), $12.90/month; $119/year for DTP Tools Cloud
Cross References Pro is billed as a modular system which responds to every referencing need, inspired by a similar feature in Adobe FrameMaker and improved thanks to the greater flexibility of the InDesign environment. Each reference and its components can have a specific character style, and each reference part can be set to appear only in selected languages. The plug-in is scriptable, is compatible with InDesign and InCopy CS3 and later, and supports saving in both .IDML and older .INX formats. In InDesign CC and later, the Cross References Pro plug-in is part of the DTP Tools Cloud bundle.
Sonar Bookends InXref
Virginia Systems (virginiasystems.com), $195
Sonar Bookends InXref uses a “labeling” system to mark both where referenced page numbers are to be inserted and where the material being referenced is found. These labels can be created at any time, in any order, meaning you can create a reference to “Chapter 2” even if Chapter 2 doesn’t yet exist. The cross-references can be resolved any time, in seconds, with a single command, and more than one file can be cross-referenced at one time.
Quick Reference Script
In-Tools (in-tools.com), Free
To use Quick Reference, just select the source text, and you get a list of potential destinations. Quick Reference will do the rest of the work by searching your document for the text you selected. It looks for a match, and then gives you a list of all the places in the document where that match was found. (If the document is part of a book, and the book panel is currently open, the script will look through all book documents, too.) Select the instance you want to use, choose a format (all the formats found in the New Cross-Reference dialog box are there), and click Create. The script puts a text anchor in the “target” text, and then creates a cross-reference to that anchor.
This article was last modified on April 5, 2023
This article was first published on December 4, 2015