Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-10-2016, 05:09 PM   #1
epubauthor
Junior Member
epubauthor began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2016
Device: none
Calibre ebook viewer - epub - links shown as footnotes

Hello,

I've noticed that in an epub file, links whose text contains <sub></sub text are displayed in the footnotes panel.
E.g.: <a href="../Text/07.xhtml#toc_marker-4-2">1.2 Title text X<sub>x</sub></a>
This one opens the destination in the footnotes panel.
All the links are in the TOC file. That is, an XHTML file with the TOC. The epub also contains a spine which works as expected (no sup/sub text shown though).
I'm using the latest Calibre version, 2.54.0 x86, on Windows 7 x64.

I remember this not being the case in some previous version - can't remember which one though. It does not happen in the 1.48 x86 version (on Windows XP x86).

In an older epub, I had footnotes displayed only on links as the one below:
<a href="../Text/15.xhtml#Anchor-94"><span class="endnote-marker char-style-override-1">1</span></a>

This, of course, is not a showstopper issue. I'm interested in hearing your thoughts.

Kind regards

p.s.
The captcha is too hard to solve! It took four tries! :-)
epubauthor is offline   Reply With Quote
Old 04-10-2016, 05:21 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 22,112
Karma: 22087764
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A
Not sure what your problem is

<sub> simply means [sub] subscript[/sub] the text

The rendering engine may not always honor the instructions
theducks is offline   Reply With Quote
Old 04-10-2016, 05:49 PM   #3
epubauthor
Junior Member
epubauthor began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2016
Device: none
Here is an example epub, to illustrate the issue.

p.s.
The captchas are getting increasingly difficult!
Attached Files
File Type: epub sub_as_footnote.epub (4.0 KB, 108 views)
epubauthor is offline   Reply With Quote
Old 04-10-2016, 06:17 PM   #4
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 11,065
Karma: 10563148
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Please post complaints regarding Mobileread in Feedback, Calibre Developers and Moderators cannot do anything about the behaviour of the forum itself.

The footnote display feature was introduced into the viewer in Release: 2.9 [07 Nov, 2014]. How do I know that, because I just did find 'footnote' on this captcha-free web page calibre - What's new

I suggest you open a book in the calibre book editor with endnotes that work as you would expect, and examine how they're implemented - the Tools->Reports->Links is very useful in this regard.

BR

Last edited by BetterRed; 04-10-2016 at 06:33 PM.
BetterRed is online now   Reply With Quote
Old 04-10-2016, 06:37 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,470
Karma: 10205098
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The viewer uses heuristics to detect the presence of footnote links. If you want to ensure a link is not detected as a footnote link, even if it uses sup/sub give it a epub:type="link" attribute.

Although I can probably improve the heuristic to handle this particular case better -- when a link contains non-empty text in addition to a sup/sub
kovidgoyal is offline   Reply With Quote
Old 04-10-2016, 06:38 PM   #6
epubauthor
Junior Member
epubauthor began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2016
Device: none
[SOLVED]

Well, I probably failed to view that page while searching for this behaviour.

So, this is the one that did it:
---
Release: 2.48 [01 Jan, 2016]
Bug Fixes
E-book viewer: When using heuristics to detect footnote links check for vertical-align set to top and bottom as well as sub and super
---

I've just noticed that I can use Clips in Sigil to perform modifications on the selected text. It's a single click action too, just like the sub and sup buttons! Nice!
I'm going to use css to apply the sup and sub format, instead of sup and sub tags.
Going to ReRTFM now...

Thank you BetterRed for providing directions.
I consider the matter solved.

Regards
epubauthor is offline   Reply With Quote
Old 04-10-2016, 06:48 PM   #7
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 11,065
Karma: 10563148
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Another tool you might find useful is this one - [SIGIL] Plugin for inserting endnotes in an epub 2.0

I don't think there's an equivalent for the calibre book editor, maybe it could be ported

And the calibre book editor equivalent of Sigil's clips is Snippets

BR

Last edited by BetterRed; 04-10-2016 at 06:55 PM.
BetterRed is online now   Reply With Quote
Old 04-10-2016, 06:49 PM   #8
epubauthor
Junior Member
epubauthor began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2016
Device: none
Hello kovidgoyal,

I read your answer after replying to BetterRed.
How can I use the epub:type="link" attribute?
I've tried <a type="link" href="../Text/07.xhtml#toc_marker-4-2">1.2 text with sub<sub>sub</sub></a> to no avail.

Regards
epubauthor is offline   Reply With Quote
Old 04-10-2016, 06:52 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,470
Karma: 10205098
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Code:
<a epub:type="link" href="../Text/07.xhtml#toc_marker-4-2">1.2 text with sub<sub>sub</sub></a>
Although, I have already fixed the heuristic for that case https://github.com/kovidgoyal/calibr...9fa0f2151ececa
kovidgoyal is offline   Reply With Quote
Old 04-10-2016, 07:02 PM   #10
epubauthor
Junior Member
epubauthor began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2016
Device: none
Hello kovidgoyal,

ok, the epub:type="link" works fine, although EpubCheck complains a bit... I do see though that it's probably a bug of EpubCheck, so no sweat.
I also see it was easy to adjust the heuristic check too! Nice one!

Regards
epubauthor is offline   Reply With Quote
Old 06-12-2018, 07:38 AM   #11
bobb40
Enthusiast
bobb40 has a complete set of Star Wars action figures.bobb40 has a complete set of Star Wars action figures.bobb40 has a complete set of Star Wars action figures.
 
Posts: 27
Karma: 274
Join Date: Jul 2011
Device: Kindle3, Kindle4, KoboGlo
Footnotes/Endnotes

Kovid -
The calibre viewer is the best around, but I want an ebook to be compatible with other viewers too. Your "fix" (epub:type="link") for disabling footnotes does work for getting to the footnote, but it causes "epubcheck" errors and it prevents simple return from a note to the main text. Please consider putting "footnotes" into "preferences", so that all footnote code is avoided by those who do not want it. Thanks.
bobb40 is offline   Reply With Quote
Old 06-12-2018, 08:18 AM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,470
Karma: 10205098
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
epub:type="link" comes from the epub standard. If epubcheck is complaining about it, epubcheck is broken, which is not surprising considering it is not maintained any more.

And if you want to return from such a link, you simply usethe back function, just as you would for any other link.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre ebook-viewer.exe changes EPUB file sizes? avid01 Calibre 23 04-11-2018 04:24 AM
Book links in ToC open as footnotes in Calibre Reader LadyKate Calibre 2 07-22-2015 09:02 PM
Touch Normal links becomes footnotes links in epub made with Calibre il_mix Kobo Reader 15 08-10-2014 01:19 PM
Calibre's ebook-viewer and embedded fonts in EPUB books gentoosiast Calibre 1 03-20-2013 07:53 AM
Create MediaWiki and RTF links for opening an ePub file with Calibre viewer johnsidi Calibre 1 12-17-2011 01:31 PM


All times are GMT -4. The time now is 03:43 PM.


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