Quote:
Originally Posted by rjwse@aol.com
I cannot understand the far-right panel "choose a location (anchor) in the file" nor how to set up in general.
|
Example. Let's say you want to create a link that jumps to a specific location in the book.
The way you achieve this is to give parts of your book a unique name. In HTML, this is called an "id" anchor.
Chapter02.xhtml:
Code:
<h2 id="HeadingCh2-2">This is Heading 2</h2>
This is the important information you need:
- It's located in file Chapter02.xhtml
- Has an id of HeadingCh2-2
Now let's say elsewhere in your book, you wanted to create a link that jumps to this location.
Code:
<p>This is a link to Chapter 2, Heading 2.</p>
First, you select whatever text you want to link:
Code:
<p>This is a link to Chapter 2, Heading 2.</p>
Then you push the
Insert Hyperlink button (looks like a chain).
Now you want to tell it where to link to.
The Insert Hyperlink Screen
On the left-hand side, you have a list of Files. Select which one you want the link to jump to (in this case, Chapter02.xhtml).
(Optional) On the right-hand side, you'll see all the "id"s in that file. So it will display all "id"s located in Chapter02.xhtml. Like Kovid said, if no "id"s exist, this side can be completely blank.
Scroll down and select the one you want to jump to.
This will prepopulate all the bottom boxes for you.
After
Once you push
OK, Calibre will convert your previous code
Code:
<p>This is a link to Chapter 2, Heading 2.</p>
into:
Quote:
<p>I want this to point to <a href="Chapter02.xhtml#HeadingCh2-2">Chapter 2, Heading 2</a>.</p>
|
This is an <a> tag. In HTML, <a> is used for links.
Now you can see all your important information located within the link:
Quote:
<p>I want this to point to <a href="Chapter02.xhtml#HeadingCh2-2">Chapter 2, Heading 2</a>.</p>
|
- Red tells you the link will jump to Chapter02.xhtml.
- This is what you selected in the left-side box.
- (Optional) Blue tells you the link will jump to the id HeadingCh2-2.
- This is what you selected in the right-side box.