View Single Post
Old 11-22-2018, 06:29 AM   #4
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: 929
Karma: 1177583
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>
FIRST-LEVEL FOOTNOTE FILE - SECOND-LEVEL FOOTNOTE
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>
FIRST-LEVEL FOOTNOTE FILE - SECOND-LEVEL FOOTNOTE
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>
ATTENTION: Notice that I moved your second-level footnotes references out of the main text file to the first-level footnote file, since those notes do not relate to the main text, but only to that particular note.

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>
Notice that now you will not reference the main text file (index_split_006.html). Instead, you will reference the first-level footnote file (index_split_051.html). Also, the ID is the one for the 31 footnote, since 31-a is related only to that note, and not to the main text.

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.
Attached Files
File Type: epub Footnotes (v2).epub (2.9 KB, 220 views)

Last edited by thiago.eec; 11-22-2018 at 11:57 AM. Reason: Change the ID location to avoid pop-up footnotes
thiago.eec is online now   Reply With Quote