Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-12-2020, 08:43 PM   #31
BetterRed
null operator (he/him)
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: 20,588
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by thymesnewroman View Post
Hi BetterRed.

Thanks for your reply.
After turning on Function Mode, what do I type in the Search Field and the Replace field?
After familiarising yourself with the doco, press the Create/edit button, then write some python. In essence the function you write does the Replace.

Post any queries in the Calibre Editor forum, that guarantees Kovid will see them.

BTW: you can use the calibre book editor stand-alone, no need to use it from the library manager.

BR
BetterRed is online now   Reply With Quote
Old 02-13-2020, 04:19 PM   #32
thymesnewroman
Enthusiast
thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.
 
thymesnewroman's Avatar
 
Posts: 30
Karma: 2077248
Join Date: Feb 2020
Device: Forma
Quote:
Originally Posted by Tex2002ans View Post
Thanks for the attachment.

I say go full nuclear. Wipe out all the crap links, substitute with good ones.

(I tested this on your "index_split_006.xhtml" and it worked perfectly on all footnotes in that chapter.)

Hi Tex,
Thank you for you easy-to-follow instructions. I did as you suggested and now the links work! Wow. Amazing.

I was just wondering about something. In other ebooks, when I tap on the number in the body of the text, The note pops up. Is there a quick way to modify our coding so that, rather than jumping to the notes section, I would see, for example, just footnote 15 in a pop-up box when I tap on the number 15 in the main body of the book?


thymesnewroman is offline   Reply With Quote
Advert
Old 02-13-2020, 05:27 PM   #33
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by thymesnewroman View Post
I was just wondering about something. In other ebooks, when I tap on the number in the body of the text, The note pops up.
Which program/app are you using to read?

Usually "popup footnotes" are an EPUB3 thing. And this is EPUB2.

Quote:
Originally Posted by thymesnewroman View Post
Is there a quick way to modify our coding so that, rather than jumping to the notes section, I would see, for example, just footnote 15 in a pop-up box when I tap on the number 15 in the main body of the book?
No, not that easily...

Quote:
Originally Posted by thymesnewroman View Post

Tex2002ans is offline   Reply With Quote
Old 02-13-2020, 09:30 PM   #34
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Tex2002ans View Post
Quote:
Originally Posted by thymesnewroman View Post
Is there a quick way to modify our coding so that, rather than jumping to the notes section, I would see, for example, just footnote 15 in a pop-up box when I tap on the number 15 in the main body of the book?
No, not that easily...
Actually, I lied.

If you're using Calibre to read this book, one of its heuristics looks for "superscript numbers" linking to each other.

Use this Regex:

Search: (<a href="#f[tn]\d+" id="f[tn]\d+">)(\[\d+\])</a>
Replace: \1<sup>\2</sup></a>

this will change my [1] link into a superscript <sup>[1]</sup>.

Then Calibre's reader will enable the footnote popups.

Last edited by Tex2002ans; 02-13-2020 at 09:33 PM.
Tex2002ans is offline   Reply With Quote
Old 02-13-2020, 10:39 PM   #35
thymesnewroman
Enthusiast
thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.
 
thymesnewroman's Avatar
 
Posts: 30
Karma: 2077248
Join Date: Feb 2020
Device: Forma
Quote:
Originally Posted by Tex2002ans View Post
Which program/app are you using to read?
I do most reading on the Kobo Forma.


I use Calibre's reader to read PDFs (because it's so slow on my Forma) or ePubs with lots of pictures (so I can appreciate the images in their color)

Last edited by thymesnewroman; 02-13-2020 at 10:56 PM.
thymesnewroman is offline   Reply With Quote
Advert
Old 02-13-2020, 10:51 PM   #36
thymesnewroman
Enthusiast
thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.
 
thymesnewroman's Avatar
 
Posts: 30
Karma: 2077248
Join Date: Feb 2020
Device: Forma
Quote:
Originally Posted by Tex2002ans View Post
Actually, I lied.

If you're using Calibre to read this book, one of its heuristics looks for "superscript numbers" linking to each other.

Use this Regex:

Search: (<a href="#f[tn]\d+" id="f[tn]\d+">)(\[\d+\])</a>
Replace: \1<sup>\2</sup></a>

this will change my [1] link into a superscript <sup>[1]</sup>.

Then Calibre's reader will enable the footnote popups.

I plan to do this Regex Search-and-replace and see if it will make my Forma do pop-ups.
thymesnewroman is offline   Reply With Quote
Old 02-13-2020, 11:36 PM   #37
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by thymesnewroman View Post
I plan to do this Regex Search-and-replace and see if it will make my Forma do pop-ups.
Don't think so.

If I remember correctly, to get popups on Kobos, you need it in KEPUB format + use EPUB3 footnote code.

That would require more complicated markup...
Tex2002ans is offline   Reply With Quote
Old 02-13-2020, 11:42 PM   #38
thymesnewroman
Enthusiast
thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.thymesnewroman ought to be getting tired of karma fortunes by now.
 
thymesnewroman's Avatar
 
Posts: 30
Karma: 2077248
Join Date: Feb 2020
Device: Forma
Quote:
Originally Posted by Tex2002ans View Post
Don't think so.

If I remember correctly, to get popups on Kobos, you need it in KEPUB format + use EPUB3 footnote code.

That would require more complicated markup...
Just to let you know, I have a Calibre plugin that automatically converts my epub's into kepubs when I send the books to my device.
But that still leaves the ”epub3 footnote code” issue.

I'll be happy with the code you've kindly shared.

Last edited by thymesnewroman; 02-14-2020 at 12:27 AM.
thymesnewroman is offline   Reply With Quote
Old 02-14-2020, 04:12 PM   #39
ps67
Guru
ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.
 
Posts: 732
Karma: 7025494
Join Date: Aug 2017
Location: Italy
Device: Kindle Paperwhite, Kobo Elipsa, Pocketbook Color PB633, Inkpad Color
You can read the Kobo EPUB Guidelines, this is the part of footnotes:

https://github.com/kobolabs/epub-spe...kobo-platforms
ps67 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
4 issues: title length, title renaming, image resizing, link to single post avid01 Feedback 9 09-10-2016 09:51 PM
Title page showing filename and not true book title... hikerguy Editor 3 03-30-2015 05:37 PM
API to link local file to a ebook page guru_r236 Development 1 05-22-2011 09:00 AM
How to disable conversion date in title and source link in page? siebert Recipes 18 11-26-2010 12:57 AM
How do I fix the title on a personal content Kindle book? ensyed Amazon Kindle 5 02-27-2010 03:45 AM


All times are GMT -4. The time now is 01:40 PM.


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