Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 02-26-2023, 06:56 PM   #1
RMOP
Connoisseur
RMOP began at the beginning.
 
Posts: 84
Karma: 10
Join Date: Dec 2008
Device: Kindle Paperwhite, TabPRO 8.4, Galaxy Light, Sony PRS-300
Endnotes - how?

I'm not a regular here, and rarely edit ebooks. But, in working with one today, I could NOT find how to add Endnotes. Somehow, sometime, this ePub book (created from a .DOC file 10+ years ago) is nowshowing up with the previously added Endnotes as just a group of numbered entries at the end of the last chapter. In place of whatever formatting was present at the the time I created this book I find only the numbers corresponding to each footnote in the appropriate locations in the text of the book, just enclosed in square brackets [1] like this. But nothing to link them to the actual notes. There's only a dozen or so, so I don't mind inserting them by hand, but I cannot find the tool in the Calibre Editor for this. Just doesn't seem to be there. What am I missing, please? Many thanks.
RMOP is offline   Reply With Quote
Old 02-26-2023, 09:55 PM   #2
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,555
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I use Sigil for this, it has a couple of specific tools that help -- Insert->ID and Insert->Link.

Can't see anything similar in the calibre editor (surprisingly)… maybe I missed it.

The Sigil manual should provide you with sufficient detail to fix what you have using the calibre book editor - Sigil User Guide - look for the Links and IDs section in the ToC.

BR
BetterRed is online now   Reply With Quote
Old 02-26-2023, 10:06 PM   #3
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
There's no tool in Calibre to create footnotes/endnotes. You'll have to do it manually. This is what I do for my footnotes:

For the source of the footnote (the place in the text that's pointing at the actual note), I use:
Code:
<a id="fn1" href="#fn1a" epub:type="noteref"><sup>n</sup></a>
That goes right next to the text that you want to have a footnote on. If you're not using epub3, the 'epub:type="noteref"' bit won't work, so just leave it off. Basically, all that does is set up an id on an anchor (the a id="fn1" bit (each footnote will need its own id so the footnote can link back to this location) and link to where the footnote is (the href= bit (again, unique ids, I just tack on an "a" to the end of the anchor id -- if the footnote is in the same file (chapter), then you can get by with the "#" -- if it's in a different file (perhaps an Endnote file near the end of the book), you'll need to insert the actual file name in there -- Calibre should give suggestions as you type).

For the target note, I use:
Code:
<aside id="fn1a" class="footnote" epub:type="footnote"><p><a href="#fn1"><sup>n</sup></a>.thenote.</p></aside>
Epub3 is needed for the aside and the epub:type= bits. If you're using epub2, then ignore the epub:type bit and use a div in place of the aside. The id will be the one the href in the source targeted and the href will use the href back to the source id.

EDIT: Oops. Forgot to mention, the 'class="footnote"' is for whatever css class you set up to format the footnote the way you want it. And, if you are using epub3, the epub:type should be "endnote", not "footnote" if that's what you're setting up.

Last edited by enuddleyarbl; 02-26-2023 at 10:15 PM.
enuddleyarbl is offline   Reply With Quote
Old 02-27-2023, 09:29 PM   #4
RMOP
Connoisseur
RMOP began at the beginning.
 
Posts: 84
Karma: 10
Join Date: Dec 2008
Device: Kindle Paperwhite, TabPRO 8.4, Galaxy Light, Sony PRS-300
Quote:
Originally Posted by enuddleyarbl View Post
There's no tool in Calibre to create footnotes/endnotes. You'll have to do it manually. This is what I do for my footnotes:

Code:
<a id="fn1" href="#fn1a" epub:type="noteref"><sup>n</sup></a>
if the footnote is in the same file (chapter), then you can get by with the "#" -- if it's in a different file (perhaps an Endnote file near the end of the book), you'll need to insert the actual file name in there

Code:
<aside id="fn1a" class="footnote" epub:type="footnote"><p><a href="#fn1"><sup>n</sup></a>.thenote.</p></aside>
EDIT: Oops. Forgot to mention, the 'class="footnote"' is for whatever css class you set up to format the footnote the way you want it. And, if you are using epub3, the epub:type should be "endnote", not "footnote" if that's what you're setting up.
Many thanks. I've made substantial progress, and re-reading your instructions revealed what I am missing. ALL of my endnotes are at the end of the last chapter, meaning that w/o explicitly naming the file containing that chapter, the endnote links work ONLY for those which are ALSO in that last chapter.

I feel like I'm trying to build a piece of fine furniture using a axe and sledge hammer, so out-of-practice am I in a skill which I never pretended to master. So, I'm still a bit fuzzy about what the link should look like when making explicit reference to the file containing the endnotes.

Would, for example #fn1a" be replacged with the actual filename (index_split_018) of that last chapter? or what? I know I'm close since I have the three endnotes working within that last chapter. Just not exactly sure what it should look like. Here are the two snippets of the current (non-working) code for an endnote from a prior chapter:

Code:
<a id="fn14" href="#fn14a" epub:type="endnote"><sup>14</sup></a>”</p>
Code:
<div class="calibre1"><div class="s1"><p class="calibre2"><aside id="fn14a" class="endnote" epub:type="endnote"><p><a href="#fn14"><sup>14</sup></a><i> “Depart, Christian soul, out of this world, in the name of the Father…”</i></p>
Your patience is appreciated.
RMOP is offline   Reply With Quote
Old 02-28-2023, 04:09 AM   #5
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by RMOP View Post
Would, for example #fn1a" be replacged with the actual filename (index_split_018) of that last chapter?
You need to point the file and the id, like this: index_split_018.xhtml#fn14.

Assuming your file with the note reference is 'index_split_18.xthml' and your endnotes are in file called 'endnotes.xhtml', then you would have this:

Code:
<a id="fn14" href="endnotes.xhtml#fn14a" epub:type="endnote"><sup>14</sup></a></p>
Code:
<div class="calibre1"><div class="s1"><p class="calibre2"><aside id="fn14a" class="endnote" epub:type="endnote"><p><a href="index_split_018.xhtml#fn14"><sup>14</sup></a><i> “Depart, Christian soul, out of this world, in the name of the Father…”</i></p>
thiago.eec is offline   Reply With Quote
Old 02-28-2023, 09:58 AM   #6
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
Adding a bit to what thiago.eec just said, if you've got the ids set in their respective id= lines, as you enter text in the href="" areas, Calibre should pop up a list of the various ids you can use. You ought to be able to cursor down to the one you want and right arrow out of it to select it. If it's not there, then you'll have to type the information. But, copy/paste should make things easier. If the endnotes are not randomly formatted, you might be able to speed things up with a search/replace on their formatting.

Also, and this could just be a matter of a partial copy/paste to the forum, you haven't closed your aside or divs in your 2nd code snippet.

And, I'll also mention that if the book doesn't have too many endnotes and if they're not big honkin' one, I just cut/paste them up to where they're referenced (getting rid of the filename in the hrefs). I even put them directly following the referencing paragraph instead of at the end of the chapter.
enuddleyarbl is offline   Reply With Quote
Old 02-28-2023, 01:04 PM   #7
RMOP
Connoisseur
RMOP began at the beginning.
 
Posts: 84
Karma: 10
Join Date: Dec 2008
Device: Kindle Paperwhite, TabPRO 8.4, Galaxy Light, Sony PRS-300
Well, thank you again, very much. That did the trick (once I remembered to add the .xhtml extensions to the files being refereced - duh). I also created a new file "Endnotes.xhtml" and moved the endnotes there. Tidier.
RMOP is offline   Reply With Quote
Old 02-28-2023, 03:49 PM   #8
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Shameless plug: you might find my Sigil footnotes plugin helpful.
Doitsu is offline   Reply With Quote
Old 02-28-2023, 06:54 PM   #9
RMOP
Connoisseur
RMOP began at the beginning.
 
Posts: 84
Karma: 10
Join Date: Dec 2008
Device: Kindle Paperwhite, TabPRO 8.4, Galaxy Light, Sony PRS-300
Quote:
Originally Posted by Doitsu View Post
Shameless plug: you might find my Sigil footnotes plugin helpful.
Thank you. Yes. I'll be checking it out. I only had 17 endnotes, but it was a real thrash to get that bit of xhtml just so. Whew. I recall that the original endnotes were produced in a .DOC file, so Calibre converted it just fine, probably to .MOBI, if I recall. But somehow the derivative .ePUB from THAT didn't convert the endnotes properly. But, I'll have to learn ePub anyway, as Kindle no longer accepts .MOBI format for the Send to Kindle bit.
RMOP is offline   Reply With Quote
Old 03-14-2023, 04:50 PM   #10
RMOP
Connoisseur
RMOP began at the beginning.
 
Posts: 84
Karma: 10
Join Date: Dec 2008
Device: Kindle Paperwhite, TabPRO 8.4, Galaxy Light, Sony PRS-300
Quote:
Originally Posted by Doitsu View Post
Shameless plug: you might find my Sigil footnotes plugin helpful.
Well, I downloaded the plugin and attempted to add it to Calibre. However, I got an error message:

calibre, version 6.14.0
ERROR: Unhandled exception: <b>InvalidPlugin</b>:The plugin in 'Z:\\DATA\\Calibre\\FootnoteLinker_v0.3.3.zip' is invalid. It does not contain a top-level __init__.py file

calibre 6.14 embedded-python: True
Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19045')
Python 3.10.1
Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 51, 0) && DeDRM (7, 0, 3) && Package KFX (from KFX Input) (1, 51, 0) && KFX metadata reader (from KFX Input) (1, 51, 0) && KFX Input (1, 51, 0)
Traceback (most recent call last):
File "calibre\gui2\preferences\plugins.py", line 325, in add_plugin
File "calibre\customize\ui.py", line 513, in add_plugin
File "calibre\customize\ui.py", line 64, in load_plugin
File "calibre\customize\zipplugin.py", line 298, in load
File "calibre\customize\zipplugin.py", line 393, in _locate_code
calibre.customize.InvalidPlugin: The plugin in 'Z:\\DATA\\Calibre\\FootnoteLinker_v0.3.3.zip' is invalid. It does not contain a top-level __init__.py file

No clue how to resolve this, but I'd like to try this plugin. Any help, please? Thanks.
RMOP is offline   Reply With Quote
Old 03-14-2023, 04:55 PM   #11
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by RMOP View Post
No clue how to resolve this, but I'd like to try this plugin. Any help, please? Thanks.
Unfortunately, this plugin will only work with Sigil. (I mentioned it, because many epub creators use both Calibre Editor and Sigil.)

Last edited by BetterRed; 03-14-2023 at 05:07 PM. Reason: spelling: may -> many
Doitsu is offline   Reply With Quote
Old 03-14-2023, 05:58 PM   #12
RMOP
Connoisseur
RMOP began at the beginning.
 
Posts: 84
Karma: 10
Join Date: Dec 2008
Device: Kindle Paperwhite, TabPRO 8.4, Galaxy Light, Sony PRS-300
Quote:
Originally Posted by Doitsu View Post
Unfortunately, this plugin will only work with Sigil. (I mentioned it, because many epub creators use both Calibre Editor and Sigil.)
OK. My ignorance has been marginally reduced. Thanks. I'll take a look at Sigil. Thanks again.
RMOP is offline   Reply With Quote
Old 03-18-2023, 05:09 AM   #13
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: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by BetterRed View Post
Can't see anything similar in the calibre editor (surprisingly)… maybe I missed it.
There is no dedicated button for this. inserting ids is trivial to do. And the calibre editor autocompletes for you when you type the href of a link, popping up a list of files and anchors automatically, without needing to press a button. Not to mention that there is an insert hyperlink button as well, if you prefer a dedicated tool.

Last edited by kovidgoyal; 03-18-2023 at 05:14 AM.
kovidgoyal is online now   Reply With Quote
Old 03-18-2023, 10:43 AM   #14
RMOP
Connoisseur
RMOP began at the beginning.
 
Posts: 84
Karma: 10
Join Date: Dec 2008
Device: Kindle Paperwhite, TabPRO 8.4, Galaxy Light, Sony PRS-300
Quote:
Originally Posted by kovidgoyal View Post
There is no dedicated button for this. inserting ids is trivial to do. And the calibre editor autocompletes for you when you type the href of a link, popping up a list of files and anchors automatically, without needing to press a button. Not to mention that there is an insert hyperlink button as well, if you prefer a dedicated tool.
Thanks. Well, now that I'm working w the code again, I find it tedious but otherwise trivial to insert endnotes. As long as I put placeholders for all needed endnote anchors and don't miss any (and have to re-number things), it's not too painful for a dozen or so endnotes.
RMOP is offline   Reply With Quote
Old 03-18-2023, 04:41 PM   #15
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,311
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by RMOP View Post
Thanks. Well, now that I'm working w the code again, I find it tedious but otherwise trivial to insert endnotes. As long as I put placeholders for all needed endnote anchors and don't miss any (and have to re-number things), it's not too painful for a dozen or so endnotes.
Wait till you get asked to look at a scholarly publication where the author added close to a thousand footnotes/endnotes (some of the footnotes had 3 or more footnotes) and now wants someone to convert them to properly linked notes. For free and with a tight deadline. "The computer should be able to do all that..."

TANSTAAFL

Can't find the source of the other quote I likely misquoted horribly:

There's only one thing I do for free and that is nothing.
DNSB is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with endnotes/footnotes? r_avital ePub 4 10-28-2019 03:11 PM
hyperlink endnotes rjwse@aol.com Editor 15 01-07-2019 09:37 AM
Endnotes within Endnotes Alcuin7 Editor 22 11-30-2018 01:41 PM
Endnotes Siam Sigil 14 03-17-2013 02:05 PM
difficulty with endnotes Oldpilot Sigil 5 11-16-2010 03:17 PM


All times are GMT -4. The time now is 07:08 PM.


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