
: Automating Footnote Links I'm working with Dreamweaver, InDesign and BBEdit, so a solution that works with any of these programs would be great. I'm converting a book that's in the public domain
I'm working with Dreamweaver, InDesign and BBEdit, so a solution that works with any of these programs would be great.
I'm converting a book that's in the public domain to an ebook. Each chapter has a series of superscript numbers that reference footnotes at the bottom of each page. I'm going to move all the footnotes to an appendix at the end of the book, then hyperlink the superscripts to the appropriate location.
Each chapter's footnotes begin with 1, 2, 3, etc. So I'll probably need to distinguish between chapters by linking to something like #1 -1 and #2 -1 for the first footnote in chapters 1 and 2, for example.
Anyway, I'd like to know if there's a way to automate the hyperlinking process. Some typical text would look like this:
<p>Some authorities reported greater casualties <sup>4</sup>, while at least one reported fewer <sup>5</sup>.</p>
After I finish linking to my footnotes, that text would probably look something like this:
<p>Some authorities reported greater casualties <sup><a href="#1-4" title="1-4">4</a></sup>, while at least one reported fewer <sup><a href="#1-5" title="1-5">5</a></sup>.</p>
I just wondered if anyone knows of a way to automate the linking process, using regular expressions, or one of the software programs I'm using. Each chapter is in a separate HTML file, and I can process one chapter at a time. I should also note that some footnotes are irregular, including letters (e.g. 14, 14a, 14b).
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @BetL

: Should every paragraph tag have a CSS style (InDesign)? I'm working on my first epub, and I would like to use the following CSS scheme: Most paragraph tags would have no class assigned and

: How to search for audiobooks narrated by the author? How should I search for audiobooks narrated by their author? Are they ‘auto-narrated’, ‘self-narrated’, ‘author-narrated’, or something
1 Comments
Sorted by latest first Latest Oldest Best
First, I don't think footnotes translate easily to HTML. Endnotes are way easier and more appropriate.
The problem here is that HTML isn't semantically rich enough to do these things automatically. You need to manually do the numbering.
I use docbook XML to create citations and endnotes. Very easy to do. Then I use docbook XSLT to output everything in clean HTML. That is a powerful solution, especially if you are comfortable using XSLT. www.sagehill.net/docbookxsl/Footnotes.html
Another out of the box solution is to edit source in Markdown language and then convert everything to HTML. I see that Pandoc has a footnote solution rmarkdown.rstudio.com/authoring_pandoc_markdown.html#footnotes
It would be worth looking into what capabilities Adobe Indesign has for creating footnotes/endnotes. They have an Export-to-epub capability, and maybe the output renders the footnotes/endnotes in a nonsucky way.
Failing that, regular expressions are the way to go. But you might look into this: www.w3.org/TR/html5/common-idioms.html#footnotes
At the risk of trying to simplify your need, a lot can be said for just doing it manually rather than trying to change your production process. This is true especially if you already know the number for each footnote -- like, are you just reproducing the footnote number from a public domain work? Maintaining under 100 citations manually might be less trouble than you think.
Free books android app tbrJar TBR JAR Read Free books online gutenberg