7

Copied from an identical Stack Overflow Question. (Didn't know there's an eBooks stack exchange now, woot!)

The Puzzle

I am working on an eBook file, or series of files, which should be compatible with the maximum range of eReaders on the market. This would include, for example:

  • The e-ink Kindle family
  • The Kindle App on iOS, Android (including Kindle Fire) and anywhere else
  • iBooks for iOS
  • The Nook
  • The Nook App for iOS, Android, and anywhere else
  • Kobo, possibly (haven't looked into this much)

So we're going for maximum compatibility with different eReaders, I hope that's clear.

Now, here's the issue:

The eBook file has a unique custom glossary which should be easily accessible to the reader.

Although it is one thing to have a glossary in the back of the eBook, all of the modern eReaders have some kind of dictionary functionality that is very accessible (put your cursor on a word, long-press on a word, etc.) so the glossary needs to be just as accessible to encourage usage by readers.

Hyperlinks

One way to do this would be hyperlinking each (or the first) occurrence of a term to the glossary entry in the back, and having hyperlinks in the glossary that go back to the occurrence(s).

Hyperlinks are supported by EPUB, as well as MOBI / AZN / KF8 / etc. for Kindle. The links can be styled so that they are unobtrusive (not underlined, dark gray or black, etc.)

This is the best solution I have been able to concoct so far.

However, having the hyperlinked words look different from the rest of the text could be distracting to the reader. If I use this method, and the hyperlinks are styled to look like the rest of the text, the reader will not know whether to navigate (press) so they will simply use the built-in dictionary (long-press).

(Also note that the newest Kindle software (latest Kindle Paperwhite) shows a little "Footnotes" popup window instead of navigating to the glossary. This is great, except for the fact that it says "Footnote", whereas it should say "Glossary", but this seems to be a Kindle software default--any hints on how to change this would be awesome.)

Modify Built-In Software

If there is any way to let the software know (iBooks / Kindle App / other software) that the book has a custom glossary, so that the default behavior is modified, this would be ideal. In other words, when you long-press the word, you don't just get the default popover (as in the Kindle software or iBooks) but you also get some way to look at the glossary definition.

Personally I know of no way that this can be done, but I'm asking in case anyone knows.

Javascript

Javascript is theoretically supported in EPUB 3, but in reality, out of the major eReading options, iBooks has support, and possibly Kobo (haven't looked into it) but nothing else does. Certainly not the rather antiquated MOBI format, and the KF8 format officially does not support JS.

The idea behind using JS would be to create a custom popover, whenever you tap or long-press a word that has a glossary entry. The custom popover would ideally allow you to choose between the built-in dictionary and the glossary entry. (See this example to get an idea.)

It seems like this would be feasible only in iBooks, and perhaps Kobo, to show the glossary entries. (The popover would just have the hyperlink in it, basically.) In iBooks, I'm not sure how I would activate the built-in dictionary from my own custom JS popover, because the default popover you get in iBooks is the iBooks app's own hook into the text, based on your long-press.

Anyway, this obviously doesn't have cross-platform support into the Kindle family, but I'm throwing it out there as an option.

In Summary

In summary, I'm looking for a way to allow a reader easy access to a glossary in an otherwise standard eBook file (EPUB, Kindle family) across a wide range of eReading options. The eBook will be purchased in a normal eBook store and downloaded through normal methods. An App is not a solution, because of their limited distribution capabilities.

Any potential way of solving this puzzle is welcome!

P.S. Wish I had 150 rep so I could make the tags "glossary" and "dictionary" -_-

  • Unfortunately, at this point options are limited. I would probably go for hyperlinks, personally. If you do that, I'd suggest doing this only for the first usage of the term and then giving a reciprocal link so that readers can get back to where they were from the glossary. Standard typographic convention for that is to bold the glossary term, in my experience. – Tom Jun 30 '14 at 0:49
  • I'd second the suggestion of having a backlink from the glossary to the text, but I am not sure it is possible in your case. There may be more than one link to a single term in the glossary, right? – mau Jun 30 '14 at 9:48
  • @mau Yes, initially how I'd thought of the linking was for the first occurrence of a word in the text to link to the endnote, with a backlink to that point. But when you get into linking every occurrence of the word (there could be 100 or 500), backlinking becomes infeasible. – Matt Mc Jun 30 '14 at 20:41
1

This is what I've found thus far.

Cross-Platform

The most cross-platform solution to providing an accessible glossary would be using hyperlinks (styled so as to be somewhat unobtrusive) that link to a glossary in the back. Only the first occurrence of a word would be hyperlinked in this way, and the glossary entries would contain links that send the reader back to that occurrence of the word.

Pros: Cross-platform compatibility. EPUB 2 compliant.

Cons: Only the first word can be linked. Glossary terms must be styled to be different from the rest of the text, which could be distracting.

iBooks

iBooks supports Javascript, so you could build a homebrew JS solution. I haven't fully explored this yet.

iBooks also touts support for EPUB 3. The EPUB 3 specification includes a bunch of new markup, including special attributes that define hyperlinks as "footnote" or "endnote" hyperlinks, specifically the epub:type attribute.

When you make footnote/glossary hyperlinks, and use the special epub:type attributes, iBooks will create a popover to display your content, rather than navigating to it, which is spiffy!

Details and examples on how to use this are given by Liz Castro on her blog, but the overall implementation would be similar to the cross-platform method. The main difference is that your glossary entries would go at the bottom of the chapter instead of in the back of the book (apparently iBooks doesn't support this if your link target is outside of the current HTML document). You may or may not have to CSS the <aside> tags to be hidden, as well.

Pros: You can show the glossary entry for every occurrence of the word, because you are not navigating (and therefore don't require backlinks). It's also just cooler than the cross-platform method.

Cons: Only supported by iBooks.

Kindle

One way to have a custom glossary on the Kindle would be to create a separate ebook file, in a dictionary format, and provide it for free on the Kindle Store. In the front of the book, provide a link to that item so that your reader can download it to their Kindle or Kindle App.

Note that I'm not familiar with the dictionary format that's used in Kindle, or how you would create one.

Then, the reader would have to set that dictionary as their active one while reading. Any time they clear a word (using the standard long-press gesture), it will show the glossary definition, if there is one.

The exact behavior varies slightly between the Kindle devices and the Kindle App:

  • On a Kindle, when you look up a word and it's not in your "active" dictionary, it will attempt to show a definition from your "default" dictionary. (Tested on Kindle Paperwhite 2.)
  • In the Kindle iOS App, when you look up a word and it's not in your "active" dictionary, it shows "no definition found", and the user will have to switch to another dictionary. (Tested on iOS 7 with latest Kindle App version.)

One issue with this is if your glossary contains phrases, and not just single-word terms. The long-press feature of the Kindle works by highlighting the word that your finger is on, and showing the definition for that word. Therefore if your glossary had the phrase "mad as a hatter", and your reader long-presses "mad", they would not find your custom definition. A potential workaround for this would be to index any phrases in your glossary by the first word in that phrase, so "mad as a hatter" is indexed under "mad". I'm not 100% sure if this is possible yet, but I will probably be looking into it soon.

Pros: The normal method of looking up definitions can show your glossary definitions.

Cons: Requires that the user download a second book to gain access to the glossary. May require that the user switches between dictionaries. Only works on the Kindle family. Not every Kindle device has been tested.

Nook

Unexplored.

Kobo

Unexplored.

Other

Unexplored.

Fin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.