View Single Post
Old 10-25-2017, 04:39 AM   #9
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Sella174 View Post
I think what AlanHK is trying to do is make it possible for the reader to quickly jump to the glossary and then back to the text.
I would recommend rereading the initial post + looking at the code samples themselves.

The issue is that there are multiple types of links:
  • Type A: One-Way Link (these work as intended)
    • boson -> Kozuch Theory
    • fermion -> Kozuch Theory
  • Type B: One-Way Links which happen to point to each other later on
    • boson -> fermion
    • fermion -> boson
  • Type C: "Bidirectional" Links
    • All the different types of "footnote code" you can come up with

Amazon's heuristics are just thinking the AlanHK's Type B is a very poorly coded Type C. So instead of jumping you to that point in the book, it tries to be "helpful" and treat it as a pop-up footnote instead.

Quote:
Originally Posted by AlanHK View Post
Of course it's their fault: they create a footnote from my text because they imagine that's what I might be doing, not because I asked for one. Their guidelines have "Amazon requires formatting footnotes with bi-directional hyperlinks". Which is fine. But then the arrogant jerks make the reverse also true. I can see their motive to automagically enable older books with bidirectional footnotes to use popup footnotes. But they provide no way to override their assumption.
This would be a case where a properly coded EPUB3 with epub:type="footnote" would be able to tell the parser what you meant or didn't mean... but the thing is, the vast majority of books are/were coded like garbage and aren't marked up semantically (which is why Amazon created those footnote heuristics in the first place).

What happens if the ID you are jumping to isn't in the same <p> as the one-way links?

Spoiler:
Code:
<p id="boson"><b>boson</b></p>

<p>All elementary particles can be classified as either bosons or <a href="#fermion">fermions</a>; the bosons include photons and gluons. The quantum wave function for two or more identical bosons is unchanged if any two particles are swapped, and the wave function for a single boson is unchanged if the particle is rotated by 360 degrees. Bosons have a spin which is an integer multiple of the fundamental unit of angular momentum. In <a href="#KozuchTheory">Kozuch Theory</a>, all these properties arise from the topology of the particle’s wormhole.</p>

<p id="fermion"><b>fermion</b></p>

<p>All elementary particles can be classified as either <a href="#boson">bosons</a> or fermions; the fermions include electrons and quarks, and composites of three quarks like protons and neutrons. The quantum wave function for two or more identical fermions reverses phase if any two particles are swapped; this leads to the Pauli exclusion principle, which gives a zero probability for two fermions being in exactly the same state. The wave function of a single fermion reverses phase if the particle is rotated by 360 degrees, and is only restored exactly by two full rotations. Fermions have a spin which is an odd-integer multiple of half the fundamental unit of angular momentum. In <a href="#KozuchTheory">Kozuch Theory</a>, all these properties arise from the topology of the particle’s wormhole.</p>


If you want the term on the same line, maybe you can try do some CSS float magic.

Or maybe the <dl> might tell the heuristics "this ain't no damn footnote".

In this case, you know that your glossary code is correct, and it is just the heuristics that are guessing poorly.

I would be interested to test the Amazon footnote heuristics to its limits, but I don't own a Kindle. There has to be some distance and criteria where the algorithm says "nope, that's not a footnote".

Although I suspect a non-standard solution to try to get around the heuristics would be very hackish, and could break with a future firmware update.

Quote:
Originally Posted by Sella174 View Post
unless the Kindle has some dynamic bookmark method that can be set when going to the glossary, kind of like a finger at your place in the paper book.
This is a separate issue.

On your typical ereader, you may only get one/none "back". It is very easy to move forward, and go from:

fermion -> boson -> Kozuch Theory -> fiber bundle

But if you pressed back, you may go from fiber bundle -> Kozuch Theory. If you press back again, you would jump back to the device's Library/Home Screen.

On something like a browser, they typically allow you to stack tens/hundreds of "backs". So you would easily be able to jump back/forward from:

fermion <-> boson <-> Kozuch Theory <-> fiber bundle <-> [...]

Side Note: Hitch has also written extensively about a semi-related problem, "Many to One" links. It mostly comes up with Indexes, but it seems like it could be a serious issue in Glossaries as well.

Last edited by Tex2002ans; 10-25-2017 at 05:35 AM.
Tex2002ans is offline   Reply With Quote