Thank you so much for making this plugin! I think it will help me on a project, but I'm having trouble and I hope I can get your help to better understand it.
Below is some background, but the tl;dr is: I want to use your plugin to programmatically change the formatting of footnotes by inserting the footnotes into the ebook main text, and then re-create the footnote documents in a way that updates their formatting. However, I don't know how to translate the existing HTML to the "Advanced Options" input table in your plugin. I am also open to better or alternative solutions if you have any for me.
Background:
I recently discovered KOReader can present a properly formatted footnote in an EPUB3 ebook at the foot of the current page instead of purely as a link. I just bought the entire collection of Terry Pratchett books, and I'm trying to "fix" their footnotes. The collection is mixed between EPUB2 and EPUB3, but I'm going to convert them all to EPUB3, which should make them all a little more similar.
For example, here's an (anonymized) footnote and link from the book "Sourcery":
Code:
<!--Inline text with numbered footnote link-->
<p class="para"><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.277.1">This is some text that needs a footnote</span><a class="nounder" href="9780061807145_Footnote.xhtml#fn2" id="fn_2"><span class="sup"><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.278.1">*</span></span></a></p>
<!-- Footnote content in a separate xhtml document, with appropriate headers etc.-->
<p class="footnotePara"><a class="nounder" href="9780061807145_Chapter_1.xhtml#fn_2" id="fn2"><span class="sup"><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.3.1">*</span></span></a><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.4.1"> This is the content of the footnote. </span></p>
Ideally, I think the final result should look something like this (just an example from the internet I modified for testing):
Code:
<!--Inline text with numbered footnote link-->
<p>This is some text that needs a footnote.<a href="FN_Section0001.xhtml#fn2" epub:type="noteref" id="fn_2">[1]</a></p>
<!-- Footnote content in a separate xhtml document, with appropriate headers etc.-->
<body>
<aside epub:type="footnote" id="fn2">
<p><a href="9780061807145_Chapter_1_split_000.xhtml#fn_2">↩</a>This is the content of the footnote. </p>
</aside>
</body>
However, so far my attempts to make these changes programmatically have all but failed. If I manually copy/paste in the "correct" footnote code, it works fine, but if I try to tinker with the existing code to add the EPUB type, I struggle to get consistent results.
I want to use your plugin to identify footnotes, reintegrate the text to the main document, and then extract them back into the footnote.xhtml documents using into the appropriate format.
Assuming that your plugin works the way I think it does, here's the information I've used for the "Advanced Options":
1. The name of the xhtml footnote section
-I think this is where all the footnotes are written if in a single file.
-9780061807145_Footnote.xhtml
2. Footnote heading
-I'm not sure what this is, so I left it blank. I think, though, this would be something like this, right?
Code:
<title>Sourcery Footnotes</title>
3. The class name for the footnote heading
-Not sure what this would be either, so I would leave this as "Footer"
4. ID for each footnote
-I think this is the ID for the actual footnote, in the example above, fn2
-fn
5. Class name for each footnote
-I think this is the overall class name for the footnote, which I think is "footnotePara"
6. ID for each hyperlink
-I think this is the ID for the hyperlink to the footnote, in the example above, fn_2
-fn_
7. Class name for highlighting footnotes in the main body of the text
-either "nounder" or "sup", but unsure
8. Include epub:type elements
-I think I should turn this on to add the epub:type attributes.
I know I've got something wrong because whether I run "Insert footnotes" or "Reinstate footnotes," nothing happens. Any idea what I'm missing?
Anyway, thank you taking a look at this and for any help you can provide! I really appreciate it.