06-01-2019, 06:04 AM | #1 |
Connoisseur
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
|
How to automate the HTML links for footnotes - endnotes
Is Calibre able to automate the HTML links for footnotes - endnotes (back and forth) ?
I mean ... : Into the text, links to the footnotes I place manually with such a tag : <a id="note-001"><sup>[1]</sup></a> In a single "notes" file, all endnotes are placed manually with such a tag : <a id="ret-001">1.</a> blahblah At this point I create the HTML links one by one with the Calibre built-in tool. It works fine. Uh ! it's a bit fastidious : 250 go-links and 250 back-links. I don't see a way to automate the links such as the Table of Matters. Calibres owns so many features, I may do an useless work. I did a convert test epub to epub, the HTML link is not created. Same test for table of content, except that a button exists to do the job from <h1> tag. Ladies, Gents, I would greatly appreciate any input from those who have done this already. Calibre has so many hidden killer features. I want to be sure I have to do this work manually with the "chain plus " icon. TIA, best regards |
06-01-2019, 07:23 AM | #2 | ||
Not Quite Dead
Posts: 189
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
|
Calibre does not have what you are probably hoping for, but you can do the job fairly easily with regex. In fact, with the Kindle Paperwhite, once you have the footnote referenced in the text, you are mostly done.
You have: Quote:
Quote:
Last edited by Brett Merkey; 06-01-2019 at 07:43 AM. |
||
06-01-2019, 05:35 PM | #3 | |
null operator (he/him)
Posts: 20,532
Karma: 26944418
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
06-02-2019, 02:18 PM | #4 |
Connoisseur
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
|
@Brett,
Thank you for your help. Regex is beyond my comfort zone. I have to study this language. The examples you gave me are precious as well as your advice to guide me in the right direction. The search syntax is perfect. The replacement syntax does not work. I have to dig. Err "no replace function exist..." As soon as I paste the replace formula, impossible to search and I get the error. When the replace box is empty, the search is OK. @BetterRed Thank you for the tip. I will test this alternate solution.I will choose the easiest way to build these HTML links. Best regards |
06-02-2019, 04:03 PM | #5 | ||
Not Quite Dead
Posts: 189
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
|
Quote:
Quote:
Yes, lots of little options, but I know the regex will work when you get those options right. |
||
06-03-2019, 05:02 AM | #6 | |
Connoisseur
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
|
Quote:
Waow ! It does it. Exactly as it is suppose to do. The french translation of the mode is : expression rationnelle ( the other two : normal and Fonction-Regex). That did not help me a lot. Puzzle is taking form now. Probably in two or three passes I will fix it firing in burst. Thank you again for your help, Brett. I'll do the job with Calibre built-in tools to get rid of it, and I will redo it with the Sigil plug-in version. Best regards |
|
08-26-2019, 07:48 AM | #7 |
Connoisseur
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
|
Just after the help provided in this topic I did the job with Calibre and regex.
A good training that is time consuming. To compare, I did the job again with the Sigil automated plugin. I had to correct my anchors by regex again. I spent less than half an hour to discover and to link 115 notes and 115 rearnotes. Once the syntax is correct the creation of the links is faster than it takes to blink. Thanks to all helpers. sigil plugin here: https://www.mobileread.com/forums/sh...d.php?t=288193 |
11-11-2020, 08:41 AM | #8 |
Connoisseur
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
|
FYI,
Sigil 1.3.0 build 2020.07.22 and FootNoteLinker 0.3.3 work fine. Sigil 1.3.0 build 2020.07.22 and FootNoteLinker 0.3.2 does not work. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
footnotes (endnotes) font too small | mark_e_h | Conversion | 0 | 12-28-2013 12:40 AM |
Moving endnotes/footnotes | alexul | ePub | 20 | 08-15-2012 04:52 AM |
Footnotes and Endnotes | Ken Irving | Writer2ePub | 2 | 01-02-2011 09:05 AM |
Footnotes/Endnotes | crutledge | Sigil | 17 | 07-17-2010 11:56 AM |
How do endnotes/footnotes work? | JSWolf | ePub | 4 | 04-22-2009 05:54 PM |