![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Nov 2018
Device: none
|
Endnotes within Endnotes
I’m a newbie. I’m probably asking a question that’s been asked before, but I was unable to locate it using the forum Search or Google.
I have document with endnotes embedded to endnotes. (Footnotes to footnotes.) That is, some of the endnotes have their own endnote references. In at least some instances, there are endnotes to endnotes to endnotes. In Microsoft Word, I overcame this using cross-links. All the embedded (secondary and tertiary) endnotes are listed in main document following the primary endnote, then shrunk to font size 1 and colored white to make them as inconspicuous as possible. In the primary endnote, I cross-linked to each endnote. I converted my DOCX to EPUB with Calibre, but it doesn’t recognize the cross-links. And the “disappeared” endnotes show up in the main text. So I located a secondary endnote in the converted EPUB and used the Calibre HTML editor to cut-and-paste that secondary endnote from the main text into the primary endnote where I want it. That worked great: I can go to the primary endnote, click on the secondary endnote, and I go to the secondary endnote. So far, so good. Now my problem arises. I click on the secondary endnote number (in the secondary endnote) to return to the primary endnote, and instead of going back to the primary endnote, I go back to the main text. Does anyone have any idea about what I need to do to return to the primary endnote instead of the main text? |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,244
Karma: 11708297
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
The only way you will be able to correct this is to get your hands dirty in the actual HTML. Back in 2013, I posted an EPUB I converted with 3 sets of footnotes:
Feel free to take that apart and see how I did it. It had many footnotes in footnotes. For example, Chapter 9: Within Normal Text: Spoiler:
Footnotes At End of HTML File: Spoiler:
So the [1] (Red) footnotes point back/forth to each other, and the [a] (Blue) footnotes point back/forth to each other. You'll have to go through your code, copy/paste them to their proper locations, and come up with all the proper HTML code to link them back and forth. ... and what happens in the Word DOCX if someone clicked the cross-link? How are people supposed to read these footnotes in footnotes if they're size 1 and white text? Last edited by Tex2002ans; 11-21-2018 at 01:59 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | ||||
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Nov 2018
Device: none
|
Quote:
For instance in the file index_split_006.html there is a primary (first-level) footnote (endnote) 31 with two explanatory secondary (second-level) footnotes (endnotes) numbered 32 and 33. The existing code in index_split_006.html reads (with line-breaks added to make it more legible), Quote:
Quote:
Quote:
In my Word Document, the embedded footnotes follow immediately after the main footnote, [31][32][33] in this example. In footnote 31, text “32” and “33” are put in their proper positions in footnote 31, superscripted, then cross-linked to the real footnotes 32 and 33. That highlights them and makes them accessible by clicking on them. Then the text for the real footnote markers in the main body of the book (not the footnotes themselves) is reduced to font size 1 and colored white: the real markers are no longer visible. It appears to anyone reading the text that there is nothing there but a clickable marker for footnote 31 (followed perhaps by an unusually wide space), while the secondary “footnotes” appear to be in their proper (cross-linked) places in footnote 31. It looks fine in Word and prints correctly, except for the space behind the footnote marker for [31], which is small enough to escape notice. But this method does not transpose to EPUB or MOBI after conversion. |
||||
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 629612
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Hello, @Alcuin7.
You misunderstood the explanation of @Tex2002ans. It's all about getting the right anchor (the "id" atribute). All you have to do is reference the FILE (.html) and the ID in the link, so it will take you anywhere you like inside your book. Working with your examples, we have this: MAIN TEXT FILE - FIRST-LEVEL FOOTNOTE File: index_split_006.html Code:
<sup class="block_25"> <sup id="back_note_31" class="calibre10"> <a href="index_split_051.html#note_31" title="31" class="calibre2">31</a> </sup> </sup> File: index_split_051.html Code:
<sup id="id_Ref489614211" class="text_6"> <sup id="back_note_31_a" class="noteref1"> <a href="index_split_052.html#note_31_a" title="31-a" class="calibre2">31-a</a> </sup> </sup> File: index_split_051.html Code:
<sup id="id_Ref489614248" class="text_6"> <sup id="back_note_31_b" class="noteref1"> <a href="index_split_053.html#note_31_b" title="31-b" class="calibre2">31-b</a> </sup> </sup> Also, notice that the TEXT of you footnotes are located on other files. The footnote 31 text is located on the file index_split_051.html; 31-a is on index_split_052.html; and 31-b is on index_split_053.html. Now, you must reference each footnote based on their location (the html file) and ID. With that in mind, you should arrange it like this: TEXT FILE FOR THE FIRST-LEVEL FOOTNOTE File: index_split_051.html Code:
<p id="note_31"><a href="index_split_006.html#back_note_31">31.</a> TEXT OF THE FOOTNOTE 31. HERE IS THE REFERENCE FOR THE FIRST NOTE: 31-a. LATER ON, THIS IS THE REFERENCE FOR THE SECOND NOTE: 31-b. TEXT FILE FOR THE SECOND-LEVEL FOOTNOTE File: index_split_052.html Code:
<p id="note_31_a"><a href="index_split_051.html#back_note_31_a">31-a. </a> TEXT OF THE FOOTNOTE 31-a</P> ![]() The same goes for 31-b: TEXT FILE FOR THE SECOND-LEVEL FOOTNOTE File: index_split_053.html Code:
<p id="note_31_b"><a href="index_split_051.html#back_note_31_b">31-b.</a> TEXT OF THE FOOTNOTE 31-b</P> To see this in action, look at the file attached. EDIT: Obs.: When you put the ID inside the link element (<a>), Calibre will threat it like a pop-up footnote, wich is great in most cases, but can be problematic in your case, with nested footnotes. To avoid this, I placed the ID inside the paragraph element (<p>) or SUP. Last edited by thiago.eec; 11-22-2018 at 11:57 AM. Reason: Change the ID location to avoid pop-up footnotes |
![]() |
![]() |
![]() |
#5 | ||||||||||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,244
Karma: 11708297
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
If you understand the basics of HTML, you should be able to parse each chunk. Clean/Minimalist Footnote In the text: Quote:
Quote:
Text: id = ft1, points to fn1. Footnote: id = fn1, points to ft1. Endnote Since you have to point to a completely different file, the code gets a little hairier, but the logic is the same. In the text: Quote:
Quote:
Text: id = ftCh1.1, points to Endnotes.xhtml file + looks for fnCh1.1. Endnote: id = fnCh1.1, points to Chapter01.xhtml file + looks for ftCh1.1. Note: Calibre conversions create a hideous spaghetti nest of code. First thing I would do is start renaming files from the unintelligible index_split_000.html -> Chapter01.html. That will make the code much easier to read. You'll then be able to more easily see what's pointing to what. Quote:
(I personally just prefer Sigil 95% of the time.) Quote:
As long as the EPUB code works perfectly, you should be able to input the EPUB into KindleGen/Kindle Previewer, and get a working MOBI. Quote:
You can leave it up to the device/user to choose which alignment they like to read. Note: Again, Calibre conversion creates a nest of "calibre##" CSS classes. You'll have to figure out which calibre## effect which parts of your book. Quote:
You are saying there's 3 levels of footnotes, but I don't know if you're just numbering them 1-999 due to Word's limitations... or if your book would be better served with 3 distinct sets of footnotes! Your book may be completely different, and it's hard to tell without seeing the DOCX firsthand. Note: I was just specifying the code that my example PDF->EPUB used. 3 distinct sets of footnotes: - Author - Translator - Editor Nowadays, I went with a simpler: [1] + [T1] + [E1]. (You can see my 2018 remake here.) For ebooks, I highly recommend against using the print-style symbols (*, †, ‡). Alphabetical [a]-[z] is fine, but you have to watch out that you don't have more than 26 of a type of footnote in a chapter. (I once thought that would work for a book, but there was one chapter that had 50+, so [aa]-style becomes unwieldy.) Your book might be different, but I highly recommend them all being in some sort of sequential order... and be human-understandable. :P Even thiago.ecc's example of 31-a works fine for secondary footnotes. Tertiary footnotes could potentially be 31-a-a... but at this point, I would probably recommend rethinking your document... since this becomes a hideous spaghetti nest and becomes too hard to follow/read. Books are ultimately meant to be read by humans. :P Quote:
LaTeX has many packages that handle multiple sets of footnotes (bigfoot, manyfoot). Quote:
Then I also merge all files that need to be merged. For example, your Endnotes file might be split into 100 "index_split_459" pieces. I merge them all into a single one and call it Endnotes.xhtml. Again, this makes the code so much easier to read/manipulate (and you can always split it in the future). ![]() Last edited by Tex2002ans; 11-22-2018 at 12:08 PM. |
||||||||||||
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 629612
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
|
|
![]() |
![]() |
![]() |
#7 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,244
Karma: 11708297
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
IF you wanted to use EPUB3-style footnotes, you would have to use <aside> + some epub:type code. See Doitsu's Footnote test EPUB (and surrounding discussion about pop-up footnotes in that topic). |
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Nov 2018
Device: none
|
Remember, I’m a newbie at electronic books. An old programmer (almost 40 years), but this is a new environment for me.
If I may press your patience, Tex2002ans and thiago.eec, I think I see several different ideas that I would like to gather together. Footnote/Endnote identification
Two-thirds of the book is endnotes/footnotes. There is a primary text with the normal short, regular, footnotes; many detailed explanations; and several side-excursions. Some of the detailed explanations and almost all the side-excursions also require footnotes. This explains the document’s complexity. Many of the references come from Microsoft Word. <sup id="id_Ref489614211" class="text_6"> is one of these. I assume that I can dispense with these in EPUB and eliminate them to simplify my code? Calibre converts the document into chapters, appendices, and a great many other divisions that make some sense. Many of the others make no sense. Am I required to follow Calibre’s divisions, or can I reassemble my own? Won’t that disrupt the order of the final product? Where are these files index_split_000.html, index_split_001.html, …, stored? Do I merge/break/insert/rename within Calibre, or can I export them and deal with them outside Calibre? What is your normal procedure? BTW, Tex2002ans, if you made the Say page for FEE, I think I used that writing my book, along with a great deal of material from Mises.org. |
![]() |
![]() |
![]() |
#9 | ||||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,244
Karma: 11708297
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Level 1 should be numbered footnotes: 1, 2, 3. I personally think this is the easiest to understand/read/reference. Level 2 could potentially be: 1a, 1b, 1c. Note: As an alternative to English letters, Greek letters could be used: α, β, γ, [...]. But I've only seen this in Physics/Maths, where people may be more familiar with the order of Greek characters. Level 3... I HIGHLY recommend against this, this is 99% a sign your work is going to be too confusing. The information would be suited better:
... This sounds like a serious issue with organization of the material. Perhaps a lot more of that material can be put into supplemental Appendices, or new chapters. And I know sidenotes... I'm extremely sidenote-/parentheses-happy. (Have you seen my posts on MobileRead?). But even I know where there's a limit! When you start reaching notes about notes (Level 2), you really have to start relooking at making those points in your main text (or Level 1 footnote). Or just say: "More on this, see Jean-Baptiste Say, Chapter 3." Think about it just like a Nested List. Once you start reaching 3+4 levels deep, probably time to think about a different way to present the info (Table, Chart, Graph, [...]). Quote:
Personally, I strip EVERYTHING and make human-readable code. Word-cruft: Code:
<sup id="id_Ref489614211" class="text_6">1</sup> Code:
<sup>1</sup> Code:
<a id="ft1" href="#fn1">[1]</a> With names like id_Ref489614211 + id_Ref489674211, your eyes will go cross-eyed. Quote:
These 3 settings can be tweaked in Calibre when you convert a book + go under EPUB Output. Note: Under Structure Detection, Calibre splits files based on Xpath. So it'll look for common words like "Chapter/Book/Prologue" and split there. Quote:
On the far left side of Sigil/Calibre, you see your list of your HTML files. That's the order EPUBs will read. Quote:
So let's say you rename your: Gibberish_split_001.xhtml -> Chapter01.xhtml any links that pointed to Gibberish_split_001.xhtml will now point to Chapter01.xhtml. You can also easily drag/drop files around, Right Click to Rename/Merge, etc. etc. Quote:
![]() Last edited by Tex2002ans; 11-23-2018 at 11:11 PM. |
||||||
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,518
Karma: 22718641
Join Date: Dec 2010
Device: Kindle PW2
|
BTW, different apps/devices render footnotes differently. For example, iBooks requires footnotes to be properly defined, while the Kindle firmware (or KindleGen) uses heuristics and will usually display back-linked text as popup footnotes.
This works great for non-nested footnotes, however, if footnotes are nested, users usually can't tap links in footnote popup windows to display sub-footnotes. I've created a simple epub3 test file with two different footnote sections. The fist topic contains a link to non-nested footnote definitions: Spoiler:
while the second topic contains a link to nested footnote definitions: Spoiler:
(I used <div> instead of <aside> for backwards compatibility with epub2 readers.) iBooks will display only the first footnote definition, if the definitions aren't nested. If they're nested, it'll display the footnote definition and all nested sub-footnote definitions, however tapping links in the popup window doesn't work. iBooks also seems to ignore styles in footnote popup windows. eInk Kindles ignore nesting levels and will display only the first footnote definition. Users will need to tap Go To Footnotes to display sub-footnotes. However, if a sub-footnote link is tapped, its definition will be displayed in a popup window. |
![]() |
![]() |
![]() |
#11 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 629612
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
iBooks does ignore the CSS classes, but it honors the style attribute within the element (at least some properties, anyway).
I use this code for my footnotes: Spoiler:
The footnote text will be justified on iBooks pop-up. The "hack" using display:inline associated with hidden attribute is to prevent the number of the footnote appearing in duplicity on iBooks as well. iBooks generates a number title for each footnote, but since it doesn't accept classes inside the note, the css property will be ignored, while the hidden atribute will still be honored. This way, only the number on the pop-up title will be displayed. The "hack" above does not affect other Reading Systems (at least not the ones I've tried), because the CSS class property (display:inline) overrides* the HTML atribute (hidden). * See: http://www.hwg.org/resources/faqs/cs...tml#precedence Last edited by thiago.eec; 11-24-2018 at 07:35 AM. |
![]() |
![]() |
![]() |
#12 | ||||
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,986
Karma: 152280763
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Quote:
Quote:
Hitch |
||||
![]() |
![]() |
![]() |
#13 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,244
Karma: 11708297
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Side Note: Long story short, Footception is not a good layout. See discussion about this on the LaTeX Stack Exchange:
https://tex.stackexchange.com/questi...hin-a-footnote https://tex.stackexchange.com/questi...-footnote-text Also, Word just isn't capable of doing this, you would need advanced tools that can generate multiple sets of distinct footnotes. Like the bigfoot package in LaTeX: https://tex.stackexchange.com/questi...sted-footnotes For book design/readability... it's almost always bad, bad, bad! And trying to hack this together in Word... atrocious, atrocious, atrocious!!! Quote:
I stripped his DOCX down to a page and attached a sample DOCX: AlcuinFootception[TexTest].docx Note: ... and as expected, the numbering on his manually formatted "footnotes within footnotes" couldn't cope. ANY sort of adding/removing of footnotes is going to bamboozle the manual "level 2 footnotes". * * * From what I could tell, the footnotes were 1-999 because of Word's limitations to 1 level of footnotes. His "invisible footnotes" were done using Word's Footnote functionality, similar to this: Spoiler:
Note: I already explained this to Alcuin in PM, but these "invisible footnotes" are also an AWFUL solution for Search/Replace/Accessibility reasons. So 3, 5, 6 appear at the bottom of the page in sequential order below the linebreak. And then the footnote text below the linebreak: Spoiler:
The bold 117 points to the "invisible" 117 (you can Ctrl+Click it in Word and jump to location). Now, onto the bug. When you use Word's Save as HTML, this clickable link DOES NOT export to the HTML. It creates a simple <sup>117</sup> (same with Calibre's DOCX->EPUB). So where you would EXPECT: Spoiler:
You just get: Spoiler:
I see a similar issue with his Cross Reference links within Footnotes too. The DOCX lets you Ctrl+Click like this: Spoiler:
but Word HTML export + Calibre's DOCX->EPUB turns into a plain: Spoiler:
URLs within footnotes look to be working fine, it's just these cross-links that don't appear in the HTML. Very odd... anyone else more familiar with Word's Cross-Links functionality? Does HTML Export work for normal Cross-Links that are in normal text? Note: And Alcuin's "cross-links" jump to the wrong location. They point to the "invisible" footnotes in the main text, NOT the footnotes themselves. So the HTML generated would be wrong anyway... Quote:
Better to rewrite your document to include only a single level of footnotes. Quote:
It should be similar to something like Gitden Reader (or a Kobo). You have the Left + Justified buttons, but you also can just turn it OFF (Publisher Default). User setting should override anything Left + Justified + without alignment set. And then shouldn't effect anything Center + Right aligned. This is a common enough issue in ebooks, I would have assumed all newer devices (ESPECIALLY Kindles) should have this functionality. It's just absolutely baffling to me. Last edited by Tex2002ans; 11-25-2018 at 12:21 AM. |
|||
![]() |
![]() |
![]() |
#14 | ||||||||||
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,986
Karma: 152280763
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Quote:
I forget now the "big experience" I had with this, but years ago, we struggled with a huge project that was a mess, over this very thing--that you couldn't just use the x-reffing capability, from point A to point B, product-wise. (like, Word to OO or whatever). I think it's that the x-reffing or index markers are done in a way that's not uniform or transportable. But honestly, Tex, I don't remember it that clearly and we should ask Tox. What he doesn't know about Word isn't worth knowing, in terms of the export to HTML. I'll go find him and ask him for some insight. Quote:
Quote:
Quote:
Quote:
Quote:
That would be nice. Of course, you could also end up allowing users to override specific formatting (like blockquotes) too, and that would suck. Quote:
Quote:
Off to find Toxaris.... Hitch |
||||||||||
![]() |
![]() |
![]() |
#15 |
null operator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,411
Karma: 24342256
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Cross References in Word are implemented via Word Fields, the primary use of which is MailMerge and Excel integration. Word Fields can be nested. But I don't think foot/chapter/end notes use Word Fields, hence they don't inherit Field nestability.
BR |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Endnotes on old Kindles | AlexBell | Kindle Formats | 4 | 01-11-2015 02:16 AM |
pop-up endnotes | roger64 | Calibre | 34 | 11-23-2014 07:46 PM |
Pop-up endnotes | crutledge | ePub | 16 | 06-17-2014 03:41 AM |
Endnotes | Siam | Sigil | 14 | 03-17-2013 02:05 PM |
mobi endnotes | kphoenix | Kindle Formats | 0 | 01-24-2011 06:51 PM |