![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 260
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
hyperlink endnotes
A new feature in calibre lets you produce hyperlinks with a saved template. I have searched the user documentation of calibre and have not seen a tutorial to this. I am confused on how to use this. I would be grateful if someone could provide detailed instructions how to make use of this. I cannot understand the far-right panel "choose a location (anchor) in the file" nor how to set up in general. Best regards, Pop
|
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,541
Karma: 20170320
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You pick a file on the left, the right panel gets populated with all linkable locations in the file (anchors), you pick one and calibre will insert the link for you. If there are no linkable locations in the destination file, then the right list will beblank.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,244
Karma: 11708297
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
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>
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> Code:
<p>This is a link to Chapter 2, Heading 2.</p>
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> Quote:
Now you can see all your important information located within the link: Quote:
Last edited by Tex2002ans; 01-03-2019 at 12:55 AM. |
|||
![]() |
![]() |
![]() |
#4 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 629612
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Hyperlink template
Quote:
Since your post title is about endnotes, let me give you an example: Take a look at this normal text inside a chapter: Code:
<p>This is a normal text with an endnote reference1</p>
Since you want to format endnotes, here is an example of a template for an endnote on a EPUB3 file: Code:
<a href="_TARGET_" class="notes" epub:type="noteref" role="doc-noteref" title="Endnote reference" id="noteref__TEXT_">_TEXT_</a> The only thing I suggest is not to use <sup> on you code. Use css 'vertical-align' instead: Code:
a.notes { vertical-align: super; line-height: normal; font-size: smaller; } |
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,055
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
I think it'd be helpful if there were a _FILENAME_ placeholder similar to _TARGET_ and _TEXT_ since the_TEXT_ parameter (1, 2, 3, …) might be used in more that one file
I believe that having the option to create the id like this would make it much easier when the user adds the 'back to' link in the end notes So in chap_01.xhtml when inserting a hyperlink using the template Code:
<p>text text text more text<a id="chap_01_noteref_.1." href="endnotes.xhtml#endnote_chap_01_.1.">[1]</a> some more text</p> <p>text text text more text<a id="chap_01_noteref_.2." href="endnotes.xhtml#endnote_chap_01_.2.">[2]</a> some more text</p> <p>text text text more text<a id="chap_01_noteref_.3." href="endnotes.xhtml#endnote_chap_01_.3.">[3]</a> some more text</p> Code:
<p>text text text more text<a id="chap_02_noteref_.1." href="endnotes.xhtml#endnote_chap_02_.1.">[1]</a> some more text</p> <p>text text text more text<a id="chap_02_noteref_.2." href="endnotes.xhtml#endnote_chap_02_.2.">[2]</a> some more text</p> <p>text text text more text<a id="chap_02_noteref_.3." href="endnotes.xhtml#endnote_chap_02_.3.">[3]</a> some more text</p> Seems like it would make it easier when generating the 'back to' in Endnotes Code:
<p><a id="endnote_chap_01_.1." href="chap_01.xhtml#chap_01_noteref_.1.">[1]</a> - Footnote One in Chapter 1</p> <p><a id="endnote_chap_01_.2." href="chap_01.xhtml#chap_01_noteref_.2.">[2]</a> - Footnote Two in Chapter 1</p> <p><a id="endnote_chap_01_.3." href="chap_01.xhtml#chap_01_noteref_.3.">[3]</a> - Footnote Three in Chapter 1</p> <p><a id="endnote_chap_02_.1." href="chap_02.xhtml#chap_02_noteref_.1.">[1]</a> - Footnote One in Chapter 2</p> <p><a id="endnote_chap_02_.2." href="chap_02.xhtml#chap_02_noteref_.2.">[2]</a> - Footnote Two in Chapter 2</p> <p><a id="endnote_chap_02_.3." href="chap_02.xhtml#chap_02_noteref_.3.">[3]</a> - Footnote Three in Chapter 2</p> |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 629612
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
Also, it would be great to SAVE those templates. So we could select then from a drop-down menu, or maybe using code snippets (ctrl+j, on Windows). This way we could have various templates for diferent situations: footnote/endnote reference, footnote/endnote backlink, links to external resources, etc. |
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,055
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
|
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,541
Karma: 20170320
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
sure easy to add.
|
![]() |
![]() |
![]() |
#9 |
Interested in the matter
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 406
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
|
![]() |
![]() |
![]() |
#10 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 629612
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
![]() |
![]() |
![]() |
#11 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,541
Karma: 20170320
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
there's no option to save but the field has a drop down with recently used templates
|
![]() |
![]() |
![]() |
#12 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 629612
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,541
Karma: 20170320
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yes because it will be in the next release.
|
![]() |
![]() |
![]() |
#14 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 629612
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
![]() |
![]() |
![]() |
#15 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,055
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hyperlink to PDF | Macsurfcat | ePub | 4 | 04-18-2013 04:20 PM |
Hyperlink an image | scheife | ePub | 2 | 03-07-2013 07:43 AM |
Remove color behind hyperlink | mufc | Recipes | 4 | 11-24-2010 07:56 AM |
Hyperlink | adachim | Kobo Reader | 0 | 11-02-2010 10:57 PM |
Hyperlink? | fcoulter | Sigil | 3 | 03-28-2010 10:31 AM |