Contents | Start | End | Previous: KB0398: How do I add captions that automatically use the chapter number and figure number? | Next: KB0400: How do I get the correct spacing in figures with captions?


KB0399: How do I add a link or cross-reference to an automatically-numbered caption?

See also:
How do I add captions that automatically use the chapter number and figure number?
Working with fields in the Jutoh manual
Cross-reference dialog in the Jutoh manual
Caption dialog in the Jutoh manual
Sequence editor dialog in the Jutoh manual

You can use sequences to create an automatically numbered figure caption, and then link to that caption using a cross-reference.

To add a caption to an image:

  1. Place the cursor just after the image to be captioned, but in the same paragraph.

  2. Select the menu command Format | Insert | Caption or use the keyboard shortcut Shift+Alt+N.

  3. Choose "Figure" as the category. "Figure" is a sequence that will automatically number from 1.

  4. Type your caption, e.g. "My Picture", and a label (bookmark) to identify the figure with later, e.g. mypic.

  5. Check Insert box, to add a box around the image and caption.

  6. Click OK.

Your caption will read "Figure 1: My Picture". To make a cross-reference (link) to it, do the following:

  1. Go to where you want to link from, and put your cursor after the relevant text, e.g. "see".

  2. Select the menu command Format | Insert | Links | Cross-Reference or use the keyboard shortcut Shift+Alt+X.

  3. In the Cross-reference dialog that shows, choose "Figure" from the list of reference types.

  4. In Items, choose the relevant item, e.g. "mypic: Figure 1: My Picture".

  5. In Format, choose Text (for "Figure 1: My Picture") or Category and number (for "Figure 1"), as you prefer.

  6. Check Hyperlink.

  7. Click OK.

You will now have a link that keeps updated even if the figure number and caption change. Use Book | Update to update the fields if things get moved about or edited.


Contents | Start | End | Previous: KB0398: How do I add captions that automatically use the chapter number and figure number? | Next: KB0400: How do I get the correct spacing in figures with captions?