View Full Version : Linked endnotes in epub


virtual_ink
07-21-2011, 04:20 AM
I have a non-fiction book with a heap of endnote-references throughout. I'm splitting the book into separate xhtml files by chapter, and want the endnote-references to act as links to the relevant endnote in the 'Endnotes' chapter. I'd also need this to link back to the reference in the chapter. I have hundreds of endnotes and I'm trying to find the best/quickest way to do this is.

I'm working in IDCS5.5 and Textwrangler. This may be something better done on a code level or in Dreamweaver (which I have access to) - either way, any insights for a suggested approach would be much appreciated!

pholy
07-21-2011, 08:47 AM
One reason for putting the endnotes at the end of each chapter would be to avoid having to dump the current chapter, open the endnotes, and repeat in reverse to get back. On some readers, like my BeBook, the chapter opening delay can get annoying. I think, but I'm not sure, that the anchor code will be simpler, as well.

virtual_ink
07-21-2011, 08:27 PM
Thanks for the reply pholy. I can understand having endnotes at the end of chapters, but in this case I'd like to stick to the pbook format. In either case, I have looked at how to manually code the links with anchors - but am hoping there is a more efficient solution. Working with hundreds of endnotes, the time involved isn't really viable (unless there is a clever workflow/find replace/grep trick to make this quicker).

I'd be surprised if no one has built a script for such a thing.

Toxaris
07-22-2011, 04:06 AM
It depends on your source code. Usually I can do it via some RegExp. My Word macro for HTML does it automatically.

charleski
07-23-2011, 06:19 AM
This is one area where I've found it's easiest to compose the document in Word (which will fill in the links for you on endnotes) and then export to ePub using Atlantis Word Processor, which will preserve the endnote links. The result still needs to be cleaned up in Sigil (mostly to convert paragraph margins to em and to fix a few other things), but it's very usable.

roger64
07-23-2011, 09:43 AM
cancelled

saskir
07-30-2011, 08:33 AM
@pholy: Another thing why I wouldn't put endnots at th end of a chapter would be the time I need to get to the next one. if you don't need the endnotes you would be required to flip trough them for the next chapter.

DaleDe
07-30-2011, 12:27 PM
@pholy: Another thing why I wouldn't put endnots at th end of a chapter would be the time I need to get to the next one. if you don't need the endnotes you would be required to flip trough them for the next chapter.

That is a reason I would like them in the chapter. Most most books there are only a few and depending on pagination you might not even have an extra page. It also affords an opportunity to scan them quickly to see if there is something you missed. Unfortunately footnotes can be for documentation or might include explanatory information. There is no way to tell unless you follow the link. Having them at the end of the chapter will the chapter is still fresh on your mind is useful to not miss something useful.

Dale

pholy
07-30-2011, 06:58 PM
Thank you DaleDe -

I love it when somebody comes up with a good reason why my silly speed/efficiency hacks make sense and are actually useful :D

JSWolf
07-30-2011, 07:01 PM
One reason for putting the endnotes at the end of each chapter would be to avoid having to dump the current chapter, open the endnotes, and repeat in reverse to get back. On some readers, like my BeBook, the chapter opening delay can get annoying. I think, but I'm not sure, that the anchor code will be simpler, as well.

And then when you get to the part in the chapter with the endnotes, you have to page turn past it to get to the next chapter.

The proper way to do it is all the endnotes in one file with a style that does a pagebreak so when you go to the endnote, it is the only one shown.


That is a reason I would like them in the chapter. Most most books there are only a few and depending on pagination you might not even have an extra page. It also affords an opportunity to scan them quickly to see if there is something you missed. Unfortunately footnotes can be for documentation or might include explanatory information. There is no way to tell unless you follow the link. Having them at the end of the chapter will the chapter is still fresh on your mind is useful to not miss something useful.

Dale

I have to disagree. Having something in the middle of the book that has a very good chance of taking the reader out of the story is not a good idea at all.

JSWolf
07-30-2011, 07:03 PM
Please, don't put this document into Word. You have a rather good chance of having problems due tot he mess Word can make of it.

DaleDe
07-30-2011, 08:21 PM
And then when you get to the part in the chapter with the endnotes, you have to page turn past it to get to the next chapter.

The proper way to do it is all the endnotes in one file with a style that does a pagebreak so when you go to the endnote, it is the only one shown.




I have to disagree. Having something in the middle of the book that has a very good chance of taking the reader out of the story is not a good idea at all.

I don't use footnotes in stories so much unless the are biographies. They are for reference works like histories. Try my Miller's Church history uploaded in the ePub section. In it the footnotes are after each paragraph that they occur in. They don't get in the way of the "story" but are handy if the eBook reader doesn't support links.

Dale

Dale

DiapDealer
07-31-2011, 08:38 AM
I tend to put the linked endnotes immediately following the appropriate chapter/section, but I also provide a link at the very beginning of those notes (or more often at the end of the previous chapter) to jump past the notes to the next chapter/section.

JSWolf
08-01-2011, 09:38 PM
I don't use footnotes in stories so much unless the are biographies. They are for reference works like histories. Try my Miller's Church history uploaded in the ePub section. In it the footnotes are after each paragraph that they occur in. They don't get in the way of the "story" but are handy if the eBook reader doesn't support links.

Dale

Dale

Might not get in the way of the story, but would still be rather annoying. I think endnotes are the only real way to do so.

virtual_ink
08-02-2011, 02:07 AM
It's the author and editors choice where endnotes go in each specific book. I'm not an editor so I'm not entering a debate on the pros and cons of placement. I merely want an effective way to turn hundreds of endnotes into links (with return links), wherever they are in the document.

Specifically, I'd like to know if there is a good way to do this in IDCS5.5 or in xhtml (GREP, custom built scripts, find and replace - anything quicker than manually adding links to/returning to the endote references!)

@JSWolf, "The proper way to do it is all the endnotes in one file with a style that does a pagebreak so when you go to the endnote, it is the only one shown."

This sounds great!

Any suggestions on how this is done? Any tips on how to do this quickly in a book with hundreds of endnotes?

Adjust
08-02-2011, 06:20 AM
nevermind

saskir
08-02-2011, 06:11 PM
Oh this is also something I would find interesting cuz I hate to set all the links manually. Usually I set the footnotes with a number in []-brackets and use a unique class to show them how I want. If there would be a regex command to automatically add some code for it I would be delighted.

And which code to you use that every note gets a own page?

DaleDe
08-02-2011, 10:04 PM
And which code to you use that every note gets a own page?
this is simple in CSS. You just use a class for notes and include a page-break-before in the CSS file, same as you would for starting a new chapter on a new page. It is a bit cumbersome to wade through so you might want a jump on the first page to jump over all these separate pages.

virtual_ink
08-05-2011, 02:32 AM
Contrary to my earlier post, I will enter the debate by saying - here's a neat idea on footnotes/endnotes: http://newkindofbook.com/2011/07/nota-bene-reader-friendly-foot-and-endnote-designs/

"they stuff that material into a now-you-see-it, now-you-don’t part of the page canvas. The signal that extra info awaits is the universally recognizable plus sign, which morphs into the minus sign when the note text is onscreen."

But will this work in an epub?

Jellby
08-05-2011, 04:32 AM
Not in current ePUB, as there is no "canvas". But something similar would have been possible had any reader implemented the display:oeb-page-foot in such a way. Alas, they simply ignore it.

I'm sure it will be possible in ePUB 3, with all kinds of script tricks that you'd have to test and tweak for every different reader... :rolleyes:

Toxaris
08-05-2011, 04:40 AM
Probably, why support the easier display: oeb-page-foot which is already in the specs?

Sigh.

DiapDealer
08-05-2011, 07:58 AM
Probably, why support the easier display: oeb-page-foot which is already in the specs?

Sigh.
True.

And the wording will probably be the same in the ePub3 specs, so people will ignore the various parts as they see fit when creating/updating their reader engines. Just like the they did/do with the current ePub specs.

DaleDe
08-05-2011, 11:17 AM
Probably, why support the easier display: oeb-page-foot which is already in the specs?

Sigh.

oeb-page-foot is for footers, not footnotes. It is not intended to be linked to an item on the page and repeats on every page until changed. there is also a head tag in the specs for a header line. I would like to see these supported for what they are designed for, not bastardized into footnotes.

Actually the direction for footnotes that matches this discussion is to place the footnote in the title of a span around the footnoted text and then popup a box displaying the title text when the user clicks on the visual link. The visual link could be selected like a regular link but the popup box would appear instead of following the link. The title idea is similar to the wave a browser displays help when you hover over a word. e-Ink can do this sort of popup already as it does for displaying a menu.

Dale

virtual_ink
08-27-2011, 03:41 AM
Back to this old chestnut.

I'm currently adding a 'hyperlink destination' in the text via the Hyperlinks panel in ID, and then inserting a hyperlink in the endnote section, which links back to that text. And vice versa if required. Is this the currently best way to go about it?

DaleDe
08-27-2011, 12:54 PM
Back to this old chestnut.

I'm currently adding a 'hyperlink destination' in the text via the Hyperlinks panel in ID, and then inserting a hyperlink in the endnote section, which links back to that text. And vice versa if required. Is this the currently best way to go about it?

yes, it is. The only question is where the endnote goes. Some put in at the end of the chapter so that the eBook reader doesn't have to load another document and some put it at the end of the book so that they are all together.

Dale

Adjust
08-28-2011, 06:58 PM
I put footnotes at the end of chapters, and Endnotes I set up under a notes section at the back

virtual_ink
08-29-2011, 02:18 AM
Thanks ya'll.

Wish I could build a script that would identify superscript numerals, match them with numerals set in another style, and convert them all to hyper-linked references at the flick of a switch. Until then, books with 800 endnotes are going to drive me insane! At least I'm not alone in this.

DaleDe
08-29-2011, 12:32 PM
Thanks ya'll.

Wish I could build a script that would identify superscript numerals, match them with numerals set in another style, and convert them all to hyper-linked references at the flick of a switch. Until then, books with 800 endnotes are going to drive me insane! At least I'm not alone in this.

This is one area where Microsoft word does the right thing. Footnotes in word are converted with links both ways.

Dale

JSWolf
08-29-2011, 02:28 PM
I prefer the endnotes to be at the back. They can be in one slow but with page breaks to only show the relevant endnote.

laras
08-30-2011, 02:40 PM
The only way I know how to do this is to create an anchor and a hyperlink for each linking direction. I think InDesign would be better than Dreamweaver to do this, personally, since it exports well. And you can easily see the anchors and links by looking in the Edit in Story Editor view.

This will be a ton of work for you. I wish there were a more simple was to do a bi-directional link.

BobC
08-30-2011, 05:47 PM
This is one area where Microsoft word does the right thing. Footnotes in word are converted with links both ways.

Dale

Footnotes are one reason I prefer FB2 format. Using Coolreader footnotes can display at the bottom of the screen they are referred to from, very much like MS Word footnotes, which avoids having to click a link to view them and then return to the main text.

OOOFBtools provided some very useful stuff for manipulating text and creating footnotes. I have used these tools to build OOO Writer docs that can then be transformed into EPUB using the Writer2EPUB add-on. This approach can simplify building EPUBS with hundreds of footnotes. IIRC W2E does provide both way links between footnote and source text.

BobC