top of page


Using CatBase and our specially-created script for InDesign, you can automatically build any number of cross-references in your publications.

Let's look at a typical example:

Cross-References in a Product Catalogue

In our Demo Database we have a Project for a fictitious bakery, The Sweet Tooth Fairy. Each product can be included in multiple categories, with one of them specified as the Main Category. For example, the Purple Party Cake is in three categories:

  • Cakes (main category)

  • Birthday

  • Party


When the catalogue is created, we don't want to replicate all the product's details under all three category headings. What we want to do is include all the details under the main heading, and include a cross-reference (eg "See Page 2") to this entry under the additional headings. We need those cross-references to be dynamically linked so that they will always show the correct page number for the linked product, even if the layout is changed. Cross-references can be created manually in InDesign, but if you have a lot of them, that can be very tedious.


Using CatBase and our specially created script for InDesign, creating lots of dynamic cross-references is a piece of cake!


A Step-by-step Guide to Creating Cross-References in a Product Catalog

In our Demo database, in the Sweet Tooth Fairy database project, there's a Publishing Stylesheet called Cross-Refs Example:

Paragraphs 1, 2 and 3 are the significant ones for this Tutorial:

  1. Product name

  2. Cross-refs

  3. Omit record if cross-ref


Paragraph 1: Product Name

  • Expand Paragraph 1 by clicking its expansion symbol:

This Paragraph is comprised of two Rules. The first Rule defines what to do if the current Category is the main category, and the second Rule defines what to do if it isn't. To see how this works:

  • Double-click the first Element. The Rule states "If it's the Main Category then publish Product name otherwise say '' "  (say nothing).

So, as each record is being published, if the Category that it's being published under at that moment is the Main Category for the product, then CatBase will output the Product name.

  • Go to the Hyperlinks and Cross-Refs tab:

Cross-Ref Type

There are two cross-reference types:

  • Cross-Reference Destination: This will serve as the item that cross-refs will refer to. In our example, the Destination will be the instance of each product when it's listed in its Main Category.

  • Cross-Reference Source: This is a link to a Cross-Reference Destination.


Character Style to apply to the cross-ref tags

When the data is published, CatBase will create a tag that looks like this:

           <d=Anchor 84A14>

This is what the Make Xrefs script will use to create the cross-refs in InDesign. If you don't choose a Character Style for the tag, it will be set in the same font and style as the rest of the paragraph. Although the tags will be deleted when you run the Make Xrefs script, they do take up some space and can cause the layout to appear confusing or wrong initially, which can be a bit disconcerting. To avoid this, you could create a Character Style that uses a very small font and select that for the cross-ref tags.


Click the Save button to close the Element window.

Now double-click the second Rule element in Paragraph 1.

This Rule states "If it's not the Main Category then publish Product name otherwise say '' " (say nothing).

  • Go to the Hyperlinks and Cross-Refs tab.

Nothing is selected.


When the catalogue is being published, when a product is included under its Main Category CatBase will publish the Product Name and a Cross-Ref Destination tag; if it isn't the Main Category for that product, it will just publish the Product Name.


Paragraph 2: Cross-Refs

This is where we're going to add the "See ..." cross-ref for products that are in additional categories.

  • Expand Paragraph 2 by clicking its expansion symbol:

This Paragraph is comprised of one Element: a Rule

  • Double-click on the Rule Element to open it.

  • Click the Edit Rule button:

As each record is being published under each of its Categories, CatBase will look at this Rule. If the current Category being published is not set as the Main Category for the product, CatBase will publish the text "See "; if it's the Main Category, it will omit this Paragraph.

  • Click the Cancel button to close the Rule window.

  • On the Elements window, go to the Hyperlinks and Cross-Refs tab:

Cross-reference source

Cross-Ref Type: Cross-Reference Source is selected. This means that this Element will be a link to a Cross-Reference Destination - in our example, that will be the entry for that Product under its Main Category.

Character Style to apply to the cross-ref tags: See the explanation above

We're telling CatBase that if the conditions of the Rule are met (ie, the current Category in which the product is being published is NOT the product's Main Category), then create a cross-reference link to the product's Destination tag.

  • Click the Cancel button to close the Rule window.


So, in Paragraph 2 we've told CatBase how to decide, each time a record is published, whether to include a cross-reference source tag.


Finally, if the Category currently being published is not the Main Category for a product, we do not want to include all the rest of the info for that product.


Paragraph 3: Omit the rest of the record if it's a cross-ref

  • Click the expansion symbol next to Paragraph 3. There's one Rule Element.

  • Double-click the Rule element.

  • Click the Edit Rule button:

We're telling CatBase that if the Category currently being published is NOT the Main Category for the product currently being published, then omit everything else in this Publishing Style - the picture, description, etc.


OK - let's see how it works!


Publishing the Data with Cross-References

  • Go to the Publishing main tab.

  • Expand the Publishing Projects topic on the left.

  • Select the Cross-References Example project:

  • Click the Publish Now button at the bottom of the window.

  • CatBase publishes the data, and lets you know when it's done.

  • Go to InDesign.

  • Open the document template Sweet Tooth Fairy Catalogue.idml (you'll find this in the Sample Documents folder).

The Make Xrefs Script for InDesign

We have created a script for InDesign which will turn the cross-reference tags in your CatBase-published data into proper, active cross-references. You can get a demo version of the script from our Downloads page, and purchase a licence for it in our online shop.

Install the Make xRefs script as explained in the documentation. It should then appear as an option in your InDesign Scripts panel.


Import the data into the InDesign document

  • Click in the text box in the InDesign document.

  • Choose Place ... from the File menu.

  • Locate the file that you just published in CatBase. It will be named "cross-refs_example.txt" and can be found in a folder called Data Exports on your Desktop.

  • Select the file and click Open.

  • InDesign imports the data. 

You'll see the cross-reference tags in two flavours:

  • The Destination tags are next to the Product Names for some of the products (the ones that are listed under their Main Category):

                                            <d=Anchor 84A14>

  •  The Source tags appear under the names of Products that are not in their Main Category:

                                      See <s=Anchor 84A22>


To turn these tags into cross-references:

  • Open the Scripts palette (Window->Utilities->Scripts)

  • In the User scripts list, you should see the Make Xrefs script (if you don't, you haven't installed it!)

  • Double-click the Make Xrefs script to run it.

This dialogue appears:

Make Xrefs script options
  • Change the settings if you want to. 

  • Click OK.

The script runs and when it's done, it tells you how many cross-references were created. (Note: It can take a few minutes to complete the script).


Your cross-references are now active:

Cross-references in Adobe InDesign

You can see the cross-reference in InDesign:

  • Open the Cross-References palette (Window->Type & Tables->Cross-References):

Edit Cross-References in InDesign

If the text moves around within the document, or the page numbers change, the cross-references will automatically be updated.


Creating a PDF

If you save the document as a PDF, be sure to select the Hyperlinks checkbox in the Export PDF dialogue. The cross-refs will then be active in the PDF.

bottom of page