You are here: User Interface Elements - How to Use Each One > Inserting Cross References into Topics

Inserting Cross-References into Topics

Cross-references let you create "automated" links that are based on commands you provide. This allows you to keep links consistent and change them in just one place by using the <MadCap:xref> style. Cross-references can also be used to convert online links to "page number" references when you are producing printed output. For more information, see About Cross-References.

How to insert a cross-reference into a topic

  1. Open a topic.
  2. In the XML Editor, place your cursor where you want to insert the cross-reference.
  3. Select Insert>Cross-Reference. The Insert Cross-Reference dialog opens.

  4. In the Link to area, select a way to identify the topic or bookmark to which you want to link. Based on the option you choose, the section to the right gives you a list of selections or additional fields to complete.
  5. In the Cross-Reference Properties section, select the <MadCap:xref> style that you want to use for the cross-reference.

    Initially, you will see only the parent <MadCap:xref> tag in the list. In the XRef Format area to the right, you can see the current format associated with that tag. By default, it initially is: See "{paratext}". The command {paratext} means that the text of the paragraphed bookmark—or the text of the first paragraph found in the topic—will be displayed at that spot.

    You can: (1) use the parent <MadCap:xref> tag with its current format, (2) use the parent <MadCap:xref> tag and change the format to something else, (3) create a new class of the <MadCap:xref> tag and provide a custom format for it, or (4) use a class that you have already created previously.

    It is a good idea to create classes because you may eventually want to use multiple kinds of cross-references in your project. Each class that you create can be used to display cross-references in a different format. For more information, see Creating New Style Classes and About Styles and Style Sheets.

  6. If you want to use the parent <MadCap:xref> tag with its current format, or a class that you have created previously, click MadCap:xref or the name of the class, respectively. Then continue with Step 13.
  7. If you want to use the parent <MadCap:xref> tag but change the format, click MadCap:xref and then Edit. The Edit Cross-Reference Style Class dialog opens. Continue with Step 10.

  8. If you want to create a new class of the parent <MadCap:xref> tag, click New. The New Cross-Reference Style Class dialog opens.
  9. In the XRef Class field, give your new class a name.
  10. In the Stylesheet to modify field, select the appropriate style sheet (if different from the one shown). If you are using a master style sheet (recommended), only that style sheet is shown in this field. If you are not using a master style sheet, the style sheet that you select needs to be applied to the topic in which you are inserting the cross-reference. See Applying Master Style Sheets and Applying Style Sheets to Topics.
  11. In the Enter format field, provide the format for the style. This format can be a combination of text that you type and automated commands that you select. You can select commands from the list by double-clicking them. They are then added to the "Enter format" field.

    example

    If you want the cross-reference to include text (such as "For more information, see"), simply type it in this field. You can also double-click any of the commands to add them to this field. For example, you might want to add the text of the first paragraph in the destination file to the cross-reference format. The command for this is {paratext}. Descriptions for each command are displayed in the list.

    Some commands include a start tag and an end tag. For example, if you want a portion of the cross-reference to be displayed in bold, you would place your cursor in the "Enter format" field where want to start the bold font and double-click b in the list below. Then place your cursor where you want the bold font to end and double-click /b from the list.

    So in the end, your cross-reference format might include a combination of text and multiple commands, such as:

    For more information, see {b}{paratext}{/b}

    A format such as this one might display a link in the output like this:

    For more information, see My Destination Topic

    For additional information and examples, see About Cross-References.

    Note: For print-based output, you can create context-sensitive cross-references, which automatically change the text in the link based on the relationship of the cross-reference and the target location. See Creating Context-Sensitive Cross-References.

  12. Click OK.
  13. (Optional) In the Target Frame field of the Insert Cross-Reference dialog, click the drop-down arrow to select the way the linked destination will open. This option can be used to open the destination topic or file in a popup.
  14. (Optional) In the Screen Tip field, you can type a phrase that will appear when the end user hovers over the cross-reference in the output.
  15. Click OK.

    The cross-reference is added to the topic. You can change the appearance of the link (e.g., color, underline) by modifying the style (e.g., MadCap|xref or MadCap|xref.MyStyle) in the Stylesheet Editor.

  16. Press CTRL+S or click to save your work.

See Also

Downloads (PDF Format):

Flare Quick Guide

Flare Getting Started Guide

Flare What's New Guide

Flare Key Features Guide

Flare Transition From RoboHelp Guide

Flare Transition From FrameMaker Guide

Flare Styles Guide

Flare Printed Output Guide

Flare Shortcuts