Answers.Body: <p>This is what I've found thus far.</p>
  
  <h2>Cross-Platform</h2>
  
  <p>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.</p>
  
  <p><em>Pros: Cross-platform compatibility. EPUB 2 compliant.</em></p>
  
  <p><em>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.</em></p>
  
  <h2>iBooks</h2>
  
  <p>iBooks supports Javascript, so you could build a homebrew JS solution.  I haven't fully explored this yet.</p>
  
  <p>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 <a href="http://www.idpf.org/accessibility/guidelines/content/semantics/epub-type.php" rel="nofollow"><code>epub:type</code></a> attribute.</p>
  
  <p>When you make footnote/glossary hyperlinks, and use the special <code>epub:type</code> attributes, iBooks will create a popover to display your content, rather than navigating to it, which is spiffy!</p>
  
  <p>Details and examples on how to use this are given by Liz Castro on <a href="http://www.pigsgourdsandwikis.com/2012/05/creating-pop-up-footnotes-in-epub-3-and.html" rel="nofollow">her blog</a>, 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 (<a href="http://www.pigsgourdsandwikis.com/2012/05/creating-pop-up-footnotes-in-epub-3-and.html?showComment=1403276367007#c8986249974770424737" rel="nofollow">apparently</a> 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 <code>&lt;aside&gt;</code> tags to be hidden, as well.</p>
  
  <p><em>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.</em></p>
  
  <p><em>Cons: Only supported by iBooks.</em></p>
  
  <h2>Kindle</h2>
  
  <p>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.</p>
  
  <p><em>Note that I'm not familiar with the dictionary format that's used in Kindle, or how you would create one.</em></p>
  
  <p>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.</p>
  
  <p>The exact behavior varies slightly between the Kindle devices and the Kindle App:</p>
  
  <ul>
  <li>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. <em>(Tested on Kindle Paperwhite 2.)</em></li>
  <li>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. <em>(Tested on iOS 7 with latest Kindle App version.)</em></li>
  </ul>
  
  <p>One issue with this is if your glossary contains <em>phrases</em>, 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.</p>
  
  <p><em>Pros: The normal method of looking up definitions can show your glossary definitions.</em></p>
  
  <p><em>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.</em></p>
  
  <h2>Nook</h2>
  
  <p>Unexplored.</p>
  
  <h2>Kobo</h2>
  
  <p>Unexplored.</p>
  
  <h2>Other</h2>
  
  <p>Unexplored.</p>
  
  <h2>Fin.</h2>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-01T00:12:59.043Z
Answers.LastActivityDate: 2014-07-01T00:12:59.043Z
Answers.UserDisplayName: Matt Mc
Body: <p><em>Copied from an identical <a href="https://stackoverflow.com/q/24472753/700471">Stack Overflow Question</a>. (Didn't know there's an eBooks stack exchange now, woot!)</em></p>
  
  <h2>The Puzzle</h2>
  
  <p>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:</p>
  
  <ul>
  <li>The e-ink Kindle family</li>
  <li>The Kindle App on iOS, Android (including Kindle Fire) and anywhere else</li>
  <li>iBooks for iOS</li>
  <li>The Nook</li>
  <li>The Nook App for iOS, Android, and anywhere else</li>
  <li>Kobo, possibly (haven't looked into this much)</li>
  </ul>
  
  <p>So we're going for maximum compatibility with different eReaders, I hope that's clear.</p>
  
  <p>Now, here's the issue:</p>
  
  <p><em>The eBook file has a unique custom glossary which should be easily accessible to the reader.</em></p>
  
  <p>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.</p>
  
  <h2>Hyperlinks</h2>
  
  <p>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).</p>
  
  <p>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.)  </p>
  
  <p><strong>This is the best solution I have been able to concoct so far.</strong></p>
  
  <p>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).</p>
  
  <p><em>(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.)</em></p>
  
  <h2>Modify Built-In Software</h2>
  
  <p>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.</p>
  
  <p>Personally I know of no way that this can be done, but I'm asking in case anyone knows.</p>
  
  <h2>Javascript</h2>
  
  <p>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.</p>
  
  <p>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 <a href="http://blog.safaribooksonline.com/2010/06/24/javascript-and-interactivity-in-ibooks/" rel="nofollow noreferrer">this example</a> to get an idea.)</p>
  
  <p>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.</p>
  
  <p>Anyway, this obviously doesn't have cross-platform support into the Kindle family, but I'm throwing it out there as an option.</p>
  
  <h2>In Summary</h2>
  
  <p>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.</p>
  
  <p>Any potential way of solving this puzzle is welcome!</p>
  
  <p>P.S. Wish I had 150 rep so I could make the tags "glossary" and "dictionary" -_-</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-30T00:49:21.643Z
Comments.Text: 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.
Comments.UserDisplayName: Tom
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-30T09:48:41.543Z
Comments.Text: 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?
Comments.UserDisplayName: mau
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-30T20:41:22.263Z
Comments.Text: @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.
Comments.UserDisplayName: Matt Mc
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-25T14:42:17.450Z
Comments.Text: Any update on this? With technical advancements?
Comments.UserDisplayName: ANS Vijay
Tags: <kindle><epub><mobi><apple-books><hyperlinking>
Title: EPUB & Kindle File Glossary and Dictionary Selection
UserDisplayName: Matt Mc
ThreadText: # EPUB & Kindle File Glossary and Dictionary Selection
  
  (Asked by: username_0 on 2014-06-29)
  
  *Copied from an identical [Stack Overflow Question](https://stackoverflow.com/q/24472753/700471). (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](http://blog.safaribooksonline.com/2010/06/24/javascript-and-interactivity-in-ibooks/) 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" -\_-
  
  **Tags:** kindle, epub, mobi, apple-books, hyperlinking
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_2**: 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?  
  > **username_0**: @username_2 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.  
  > **username_3**: Any update on this? With technical advancements?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2014-07-01. Score: 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`](http://www.idpf.org/accessibility/guidelines/content/semantics/epub-type.php) 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](http://www.pigsgourdsandwikis.com/2012/05/creating-pop-up-footnotes-in-epub-3-and.html), 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](http://www.pigsgourdsandwikis.com/2012/05/creating-pop-up-footnotes-in-epub-3-and.html?showComment=1403276367007#c8986249974770424737) 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  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.
  
  
  ---
  
  