The Anchor facility provides a way to create links to specific sections of the book. For each link, there are two steps:
- Add an Anchor using one of the methods described in the Dropping an Anchor section.
- Link to an Anchor using one of the methods described in the Linking to an Anchor section.
- Add one or more links to the anchor location using the Anchor Link User Item or the Anchor Link Text Code.
You may use letters, digits, or the period, dash, or underscore characters in the Anchor Name. You may not use spaces, quotes, or other punctuation characters.
Anchor Names must be unique within your book. If you use two or more Anchor User Items with the same Anchor Name, Gedcom Publisher will process only the first one that it finds.
Dropping an Anchor
You may create an anchor three ways:
- By adding an Anchor User Item.
- By entering an Anchor Name on a Heading User Item or a Text User Item.
- By adding an Anchor Text Code. For details, see the Anchor Text Code help page.
- You may add an Anchor Link item. The link is added to the current chapter as a list item.
- You may add an Anchor Link Text Code to create a link to the Anchor in a Text User Item.
Anchor User Item
Add an Anchor User Item just above the location of the content that is the target of the link. The Anchor does not create any visible output.
Here is an example where we add an anchor above a Text User Item named "John Smith's Immigration Ordeal".
First, create an Anchor item. We'll use the Anchor Name, "john-smith-immigration".
We add the Anchor above the content that is the target of the links we will create later. If the Anchor is not the correct location, use the arrows below the list to move it.
In the example above, a link to the Anchor is also a link to the chapter because the Anchor is at the top of the chapter content. In the following example, the Anchor is still above the Text User Item for "John Smith's Immigration Ordeal", but that text is later in the chapter, and the content may appear on a separate page in the book.
Linking to an Anchor
There are two ways to create a link to an Anchor.
Anchor Link User Item
Here is an example of using an Anchor Link User Item.
First, add an Anchor Link User Item.
The Title text can be anything you want, but the Anchor Name value must match the Anchor Name of one of your Anchors.
Here is the Anchor Link User Item positioned after a Text User Item.
Here is the output produced by the User Items above:
Anchor Link Text Code
Here is an example of using an Anchor Link Text Code.
First, edit the Text User Item where you want to add the link. Add the Anchor Link Text Code following the instructions on that help page.
The text can be anything you want, but the Anchor Name value must match the Anchor Name of one of your Anchors.
Here is the output produced by the Anchor Link Text Code above: