Sigil User Guide

0.7.2

— Linking your Text —

Sigil allows you to easily link text to other parts of your book, such as chapter names and notes, so that readers can select the link and jump to the identified text.

IDs

In order for Sigil to create a link from certain words in your book to other locations in your book, you first need to give a name or ID to the text you want your link to go to.

If the target for your link is just the top of a file, then you don’t need to do anything since you can use the filename as the target ID.

But if you want to point to specific words in your book, then you need to assign a name or ID to the text.

An ID is just a unique name, like note1 that you will assign to a some of your text so that you can refer to it. ID names must be unique within an HTML file (and start with a letter), but its best if they are unique throughout the whole EPUB in case you move text around.

IDs and links are usually created with the HTML anchor tag ("a") – so the ID is often considered the anchor ID for a link, hence the button used for inserting IDs.

Create an ID

To create an ID, select some text in your book and click on the Insert ID button insert-id_22px:

tutorial-link-insert-id

This will open the Insert ID dialog where you can type the name of your ID:

tutorial-link-insert-id-dialog

You won’t see any change to your text in Book View, but if you click on your text and click on the Insert ID button again you will see the ID listed.

In order to remove an anchor tag and its ID in Book View you will need to select all the text and delete it and retype it. Or use Code View.

Links

A link is a way to point to your ID, and when selected by the reader it "jumps" the reader to the location of the ID.

To create a link in Sigil, select some text to use for the link and click on the Insert Link button insert-hyperlink_22px:

tutorial-links-insert-link

This will open the Select Target dialog which shows you the IDs in your book that you can link to:

tutorial-links-insert-link-dialog

You will notice a number of different IDs in the list. At first it might not look like yours is there, so to find it, it helps to understand what a link looks like:

When you select a link you will see that the Target text box shows the actual link that will be used. Click OK, or double-click on an entry, and the link will be created for your text.

If you click on the newly created link in your text you will jump to where the ID is. You can then click the Back button back-to-link-style_22px to return to where you clicked the link.

Reverse Linking

Most ereaders have a Back button that you can select once you follow a link to take you back to the original linked text. But for those that don’t, you can create a link from your destination back to your original source text. This is often called reverse linking.

Reverse linking is just like any other kind of linking – it just means you have to create a link from the source text to your destination note, and also from your destination note back to your source text – so both source and destination will need IDs and links, and will be mirror versions of each other:

note

For example, in the typical case of creating endnotes:

Table of contents

previous page start next page