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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-12-2020, 09:43 PM   #31
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: 15,477
Karma: 16370000
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 offline   Reply With Quote
Old 02-13-2020, 05: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: 29
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
Old 02-13-2020, 06: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: 1,437
Karma: 7010385
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, 10: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: 1,437
Karma: 7010385
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 10:33 PM.
Tex2002ans is offline   Reply With Quote
Old 02-13-2020, 11: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: 29
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 11:56 PM.
thymesnewroman is offline   Reply With Quote
Old 02-13-2020, 11: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: 29
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-14-2020, 12:36 AM   #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: 1,437
Karma: 7010385
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-14-2020, 12:42 AM   #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: 29
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 01:27 AM.
thymesnewroman is offline   Reply With Quote
Old 02-14-2020, 05:12 PM   #39
ps67
Addict
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: 263
Karma: 1124364
Join Date: Aug 2017
Location: Italy
Device: Kindle Paperwhite, Kobo Aura One
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:51 PM
Title page showing filename and not true book title... hikerguy Editor 3 03-30-2015 06:37 PM
API to link local file to a ebook page guru_r236 Development 1 05-22-2011 10:00 AM
How to disable conversion date in title and source link in page? siebert Recipes 18 11-26-2010 01:57 AM
How do I fix the title on a personal content Kindle book? ensyed Amazon Kindle 5 02-27-2010 04:45 AM


All times are GMT -4. The time now is 12:03 AM.


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