05-10-2020, 12:14 PM | #1 |
Banned
Posts: 23
Karma: 10
Join Date: Apr 2020
Device: none
|
Common links and footnotes
How do you write, within a kepub, a link pointing to any part of the book and a link pointing to a footnote? What is the feature that distinguishes the two types of links?
Last edited by pdurrant; 07-07-2020 at 11:32 AM. |
05-10-2020, 02:02 PM | #2 | |
Banned
Posts: 23
Karma: 10
Join Date: Apr 2020
Device: none
|
Quote:
Last edited by pdurrant; 07-07-2020 at 11:31 AM. |
|
05-10-2020, 02:11 PM | #3 |
Reading till the spring
Posts: 12,656
Karma: 96845225
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
The simplest is [square brackets and identifier] Don't use a superscript like paper or people can't tap on it. Make sure each footnote is only used once and has the link back to the paragraph start. Anchors are best at the start of a paragraph. Then stick all the footnotes at the end under a suitable heading.
There is a FANCIER way, but not everything supports it. I don't especially produce kepub as that's purely an artificial Kobo format. What I've described will work in old mobi, azw/kf8, KFX, epub2, kepub and epub3. Probably in any format and any ereader that supports user links in the text. So in summary I'd only distinguish the regular link and footnote by:
Last edited by Quoth; 05-10-2020 at 02:14 PM. |
05-10-2020, 03:11 PM | #4 |
Banned
Posts: 23
Karma: 10
Join Date: Apr 2020
Device: none
|
I'm building an ebook that must also be read on kobo devices. the ebook contains links that need to direct to other parts of the book and footnotes.
How do you write a link that directly opens another page? How do you write a link that points to a footnote and which must open the preview? Last edited by pdurrant; 07-07-2020 at 10:54 AM. |
05-10-2020, 06:29 PM | #5 |
Reading till the spring
Posts: 12,656
Karma: 96845225
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
What I suggest above works on a Kobo and most other ereaders.
Links inside an ebook use anchors, they are easily created in a wordprocessor at the start of any heading or paragraph. The anchor is named by you such as f22 for footnote 22 or ch11 for "Chapter 11: Five Have a Picnic". Then the URL in the link is #f22 or #ch11 You are best to build a table of contents this way and then the ebook creation (such as Calibre) uses it to build the system TOC / NCX. There is a way to do popup windows, but support is poor. I'd use it if it was universal. Kobo eBooks is less than 10%. The regular epub works the same on a Kobo as any other ereader that uses epubs. The kepubs is mostly extended rendering and is ONLY on Kobo. Use any wordprocessor with styles for paragraphs and headings. The use of Anchors (bookmarks) and Links is the same in all. If a footnote is less than two lines just use a paragraph style that is right justified, slightly smaller alternate font and put the text inline as a new paragraph with [ around it] Regular footnotes are distracting to the flow of reading. It's worse in ebooks even if the popup kind. There is no concept of a fixed page. Page boundaries change according to font, margin, resolution, screen size. Save Docx, use Calibre to create the ebook. Or if it's complex (links are not), use Sigil. |
05-10-2020, 11:54 PM | #6 |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
@7dau253mrwry4spf: You don't have full control over whether a link is interpreted as a footnote and hence gets the popup, or as a navigation link. A lot of it is based on heuristics the software uses to decide. But, basically, if the destination looks like a footnote type destination (later in the book, not to a file or heading, destination text isn't to long), it will be treated as a footnote and displayed in the popup. Otherwise it will be a navigation link. Links to headings, or without an anchor will always be navigation links.
The kepub renderer does at least partly support the epub3 footnote syntax. You can try that to force it, but, I can't remember exactly how well it works. There has been a lot of discussion of footnote links over the years. I don't believe that anything has changed recently, so a search will find more details. |
05-11-2020, 06:13 AM | #7 |
Reading till the spring
Posts: 12,656
Karma: 96845225
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
So if you do as I suggest and the paragraphs used as footnotes are not too long and not heading level (body text type in the wordprocessor style) then if the epub2 is exported by Calibre as a kepub using the Kobo Extended Driver (or maybe even just renamed), then automagically the footnotes will be popup footnotes, but linked pages where the anchor/bookmark is at the start of a heading or a large paragraph will be just navigation.
|
05-11-2020, 07:42 AM | #8 |
Banned
Posts: 23
Karma: 10
Join Date: Apr 2020
Device: none
|
@davidfor
I read this paragraph on the kobolabs page, especially the "Warning" section; however it seems that the kobo aura one behaves differently: given the following code taken from a real ebook (epub2 converted to kepub with calibre) Code:
<li><a href="colophon.xhtml">Imprint</a></li> <li><a href="foreword.xhtml">Foreword</a></li> Again, given the following code Code:
<!-- code from "toc.xhtml" --> <li><a href="preface.xhtml#toc_6">Organization of This Book</a></li> <!-- code from "preface.xhtml" --> <a id="toc_6"></a> <div class="section">Organization of This Book</div> Is there a technical document that teaches me how to write the code of a link that opens in the previewer (as for the footnotes) and how to write the different code of a link that directly opens the pointed page? |
05-11-2020, 09:37 AM | #9 | |||
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Quote:
Quote:
But, really, if you know how to create a link and a target, then you know how to do it. |
|||
05-11-2020, 10:17 AM | #10 | ||
Banned
Posts: 23
Karma: 10
Join Date: Apr 2020
Device: none
|
Sadly not.
Quote:
Quote:
|
||
05-11-2020, 10:45 AM | #11 | |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
What I didn't explicitly say, but, I thought I made clear is: We don't know what all of the rules are. The ones in that document are the official rules. But, experiments have shown that they aren't complete. Some questions that I asked to Kobo showed they were not complete, but, they are the only guide we have. In your example, I think what is happening is the the software sees the target and searches for the enclosing block tags and they that fit the rules of being a footnote and hence uses a popup. Or, because the anchor is not in a block, takes the following block (the div) and see that that matches the rules. Without seeing more code, I can't say more than that. And for me to see the code, you can do a few things. If you use calibre, the ScrambleEbook plugin can produce a version of the book that can be posted. You could also produce a sample that reproduces it. Reducing the book down to the minimum to show the problem and changing a few words might do it. Or upload the book somewhere and send my a PM with the link. And if the point of this is to define a set of footnotes for your book, then follow the rules in that document. It even has an example that will work. Putting the id for the target in a paragraph or list item tag or whatever is the best way to do it. |
|
Tags |
footnote links, kepub, link |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Footnotes, endnotes and links | Sissinghurst | Calibre | 0 | 07-17-2019 05:30 PM |
Links as unwanted footnotes | jemandy | Editor | 1 | 07-21-2018 10:51 PM |
cross links randomly become footnotes | AlanHK | Kindle Formats | 13 | 11-14-2017 01:46 PM |
Links in footnotes don't work | Tindomerel | Amazon Kindle | 4 | 08-08-2016 04:36 PM |
Touch Normal links becomes footnotes links in epub made with Calibre | il_mix | Kobo Reader | 15 | 08-10-2014 02:19 PM |