Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-10-2020, 11:14 AM   #1
7dau253mrwry4spf
Banned
7dau253mrwry4spf began at the beginning.
 
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 10:32 AM.
7dau253mrwry4spf is offline   Reply With Quote
Old 05-10-2020, 01:02 PM   #2
7dau253mrwry4spf
Banned
7dau253mrwry4spf began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Apr 2020
Device: none
Quote:
Originally Posted by 7dau253mrwry4spf View Post
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?
And why clicking on some links the preview appears and clicking on others the preview does not appear?

Last edited by pdurrant; 07-07-2020 at 10:31 AM.
7dau253mrwry4spf is offline   Reply With Quote
Advert
Old 05-10-2020, 01:11 PM   #3
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,156
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
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:
  • Style of the source link, at least putting [ and ] around it. Make sure it's big enough to tap, not like a paper book[3] as superscript, maybe [-3-]. The underlining is of course automatic.
  • Each footnote referred to once. If it's needed more often then repeat it as it must link back to source paragraph
  • Make entire footnote a link back to anchor at source paragraph OR end with the text [^BACK]
  • Put them all together as "endnotes" under a suitable heading at the end.

Last edited by Quoth; 05-10-2020 at 01:14 PM.
Quoth is offline   Reply With Quote
Old 05-10-2020, 02:11 PM   #4
7dau253mrwry4spf
Banned
7dau253mrwry4spf began at the beginning.
 
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 09:54 AM.
7dau253mrwry4spf is offline   Reply With Quote
Old 05-10-2020, 05:29 PM   #5
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,156
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
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.
Quoth is offline   Reply With Quote
Advert
Old 05-10-2020, 10:54 PM   #6
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
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.
davidfor is offline   Reply With Quote
Old 05-11-2020, 05:13 AM   #7
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,156
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
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.
Quoth is offline   Reply With Quote
Old 05-11-2020, 06:42 AM   #8
7dau253mrwry4spf
Banned
7dau253mrwry4spf began at the beginning.
 
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>
the "Imprint" page opens directly, while the "Foreword" page opens in the previewer;

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>
the "Organization of This Book" section opens in the previewer.

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?
7dau253mrwry4spf is offline   Reply With Quote
Old 05-11-2020, 08:37 AM   #9
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by 7dau253mrwry4spf View Post
@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>
the "Imprint" page opens directly, while the "Foreword" page opens in the previewer;
I am extremely surprised by that behaviour. I'd like to see the book to work out what is happening. Is it somewhere I can see?
Quote:
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>
the "Organization of This Book" section opens in the previewer.
Which, assuming link is before the target does fit my description above.
Quote:
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?
You mean apart from the link you posted above? That is the only official documentation for kepubs that I know of. And that is the only official description of how footnotes work. Almost everything else is guesswork based on experiments done by various people here. And that is why I suggested searching the forum.

But, really, if you know how to create a link and a target, then you know how to do it.
davidfor is offline   Reply With Quote
Old 05-11-2020, 09:17 AM   #10
7dau253mrwry4spf
Banned
7dau253mrwry4spf began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Apr 2020
Device: none
Quote:
Originally Posted by davidfor View Post
Is it somewhere I can see?
Sadly not.

Quote:
Originally Posted by davidfor View Post
Which, assuming link is before the target does fit my description above.
But it does not correspond to the behavior described by kobo in the linked document. I put the anchor out of the "div" tag just for the purpose of "breaking" rule no. 2:

Quote:
will display as a pop-up ... in cases where all the following criteria are met. ... 2: The content in the node is nine characters or more once stripped of the HTML tags.
The content of the <a> node is 0 characters.
7dau253mrwry4spf is offline   Reply With Quote
Old 05-11-2020, 09:45 AM   #11
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by 7dau253mrwry4spf View Post
But it does not correspond to the behavior described by kobo in the linked document. I put the anchor out of the "div" tag just for the purpose of "breaking" rule no. 2:



The content of the <a> node is 0 characters.
But, "Organization of This Book" is not. And I'm pretty sure that is what you saw in the popup.

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.
davidfor is offline   Reply With Quote
Reply

Tags
footnote links, kepub, link


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Footnotes, endnotes and links Sissinghurst Calibre 0 07-17-2019 04:30 PM
Links as unwanted footnotes jemandy Editor 1 07-21-2018 09:51 PM
cross links randomly become footnotes AlanHK Kindle Formats 13 11-14-2017 12:46 PM
Links in footnotes don't work Tindomerel Amazon Kindle 4 08-08-2016 03:36 PM
Touch Normal links becomes footnotes links in epub made with Calibre il_mix Kobo Reader 15 08-10-2014 01:19 PM


All times are GMT -4. The time now is 05:18 AM.


MobileRead.com is a privately owned, operated and funded community.