Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-30-2020, 05:22 PM   #31
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 3,962
Karma: 39874205
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by ghmerrill View Post
But in the case of citations, one might often (in various technical applications) want to cite a source in a number of places. So the link/display of the target in that case is trivial, but then how do you get back to the citing location (since there are multiple ones linking to the same target and parameter passing in HTML is ... er ... absent?)?
Kindles can display a back button that can return you to where you were after following a link. I assume the most other reading apps have something similar.
jhowell is offline   Reply With Quote
Old 09-30-2020, 06:39 PM   #32
ghmerrill
Enthusiast
ghmerrill began at the beginning.
 
ghmerrill's Avatar
 
Posts: 49
Karma: 10
Join Date: Mar 2017
Location: Central NC
Device: Various
Quote:
Originally Posted by jhowell View Post
Kindles can display a back button that can return you to where you were after following a link. I assume the most other reading apps have something similar.
Really? How does that work? I don't see how linking to the same destination from several different locations is supported by the model they present of how to code reference and footnote links. I haven't seen any examples of it. Can you provide details or a reference for how to do that?

I mean:

(1) I link from location x to note A. I click back (or cancel or whatever) in the popup and go back to location x.
(2) I link from location y to note A. I click back (or cancel or whatever) in the popup and go back to location y.

Thanks.
ghmerrill is offline   Reply With Quote
Advert
Old 09-30-2020, 07:04 PM   #33
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 59,929
Karma: 56644595
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by jhowell View Post
Kindles can display a back button that can return you to where you were after following a link. I assume the most other reading apps have something similar.
But not every piece of software has a back button. ADE 2.0.1 does not. So you have to code for the lack of a back button. So if a footnote is referenced multiple times, you have to have it multiple times. And if you have a footnote within a footnote, you have to go back twice.

Yes it's a pain in the butt, but it's doable. You have to code sometimes for the lowest common denominator.
JSWolf is offline   Reply With Quote
Old 09-30-2020, 08:14 PM   #34
ghmerrill
Enthusiast
ghmerrill began at the beginning.
 
ghmerrill's Avatar
 
Posts: 49
Karma: 10
Join Date: Mar 2017
Location: Central NC
Device: Various
Quote:
Originally Posted by JSWolf View Post
So if a footnote is referenced multiple times, you have to have it multiple times.
Actually you don't. You just need distinct IDs in the note for each time. You can get this with nested <div> elements without duplicating the note text itself.
ghmerrill is offline   Reply With Quote
Old 09-30-2020, 08:19 PM   #35
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 3,962
Karma: 39874205
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by ghmerrill View Post
Really? How does that work? I don't see how linking to the same destination from several different locations is supported by the model they present of how to code reference and footnote links. I haven't seen any examples of it. Can you provide details or a reference for how to do that?
A single citation linked from multiple places is not going to work like a popup footnote.

See the second icon in the attached image of the Kindle standard toolbar. It works like the back button on a web browser.
Attached Thumbnails
Click image for larger version

Name:	main-toolbar.jpg
Views:	19
Size:	29.8 KB
ID:	182366  
jhowell is offline   Reply With Quote
Advert
Old 09-30-2020, 08:31 PM   #36
ghmerrill
Enthusiast
ghmerrill began at the beginning.
 
ghmerrill's Avatar
 
Posts: 49
Karma: 10
Join Date: Mar 2017
Location: Central NC
Device: Various
Quote:
Originally Posted by jhowell View Post
A single citation linked from multiple places is not going to work like a popup footnote.

See the second icon in the attached image of the Kindle standard toolbar. It works like the back button on a web browser.
I don't see how this corresponds to the case I described -- which is multiple footnote links to a single footnote. Not a single footnote link to multiple footnotes -- which makes no sense to me.

Can you provide an example in the basic implementing HTML of what you're talking about? I just don't get the relevance of the toolbar display when (I thought) we're talking generic footnotes in standard etext. I'd like a description of HOW this works (whatever it is) rather than a picture of a UI in which maybe it's been implemented. Thanks.
ghmerrill is offline   Reply With Quote
Old 09-30-2020, 08:41 PM   #37
ghmerrill
Enthusiast
ghmerrill began at the beginning.
 
ghmerrill's Avatar
 
Posts: 49
Karma: 10
Join Date: Mar 2017
Location: Central NC
Device: Various
Quote:
Originally Posted by jhowell View Post
A single citation linked from multiple places is not going to work like a popup footnote.
Actually, I should have focused on just this. A single citation (e.g., in a References file) linked from multiple places in a book works fine as a popup foonote -- if you code it with nested <div> elements each of which has a unique ID and appropriate code for the backlinks included in each <div>.

Still not sure how the tool bar is relevant to this.
ghmerrill is offline   Reply With Quote
Old 09-30-2020, 08:45 PM   #38
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 8,585
Karma: 39207265
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by ghmerrill View Post
I don't see how this corresponds to the case I described -- which is multiple footnote links to a single footnote. Not a single footnote link to multiple footnotes -- which makes no sense to me.

Can you provide an example in the basic implementing HTML of what you're talking about? I just don't get the relevance of the toolbar display when (I thought) we're talking generic footnotes in standard etext. I'd like a description of HOW this works (whatever it is) rather than a picture of a UI in which maybe it's been implemented. Thanks.
If I have a single footnote references from multiple locations, the back button allows me to return to the location of the link that referenced the footnote (in theory...).

As for examples, exercise your Google-fu. The topic has been discussed to death on MobileRead on several occasions. See Multiple references to the same footnote from a decade back or a slightly more recent Cross References: How to Handle the Backlinks of Multiple Links to One Anchor? .
DNSB is online now   Reply With Quote
Old 09-30-2020, 08:55 PM   #39
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 3,962
Karma: 39874205
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by ghmerrill View Post
I don't see how this corresponds to the case I described -- which is multiple footnote links to a single footnote. Not a single footnote link to multiple footnotes -- which makes no sense to me.
That makes no sense to me either. Perhaps you should reread what I actually wrote.
jhowell is offline   Reply With Quote
Old 09-30-2020, 09:26 PM   #40
phillipgessert
Connoisseur
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 96
Karma: 773484
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
Quote:
Originally Posted by ghmerrill View Post
Will "know" WHAT?
That you can tap on things presented as a print facsimile and expect anything in particular to happen. Here online if I encountered an entirely unadorned asterisk* I would not expect anything to happen if I clicked it, despite being generally aware that the web is pretty interactive. For many folks a given ebook is their first, and they’ll surprise you with how little it’s safe to assume.



*I’d glance to the bottom. You’re welcome to your preferences, though; as you’ve welcomed others to theirs.
phillipgessert is offline   Reply With Quote
Old 09-30-2020, 09:56 PM   #41
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 8,710
Karma: 94771937
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by ghmerrill View Post
Actually you don't. You just need distinct IDs in the note for each time. You can get this with nested <div> elements without duplicating the note text itself.
So, each "back" link option, at the foot/endnote is uniquely and distinctly coded, so that the person using it knows which one to click? Is that right?

Hitch
Hitch is offline   Reply With Quote
Old 09-30-2020, 11:22 PM   #42
ghmerrill
Enthusiast
ghmerrill began at the beginning.
 
ghmerrill's Avatar
 
Posts: 49
Karma: 10
Join Date: Mar 2017
Location: Central NC
Device: Various
Quote:
Originally Posted by Hitch View Post
So, each "back" link option, at the foot/endnote is uniquely and distinctly coded, so that the person using it knows which one to click? Is that right?

Hitch
Caveat: I THINK all the code below is correct -- unless I've made a stupid typo. But I know it works since I tested it thoroughly in Sigil and in the Kindle Previewer. So ...

What you're suggesting in my comment seems to be what was my first idea: have an explicit backlink for each citation to the note. That does have certain advantages (but minimal, I think). Then I realized I didn't need explicit backlinks to make the popups work in Kindle (or Epub more generally).

The person doesn't SEE distinct backlinks. They just work because ... er .. that's how they work, as you'll see. And since it's absolutely vanilla HTML, they work in Kindle with popup notes as well. Here are some example templates for the code:

Here's code for footnote 1 in Chapter 1 (in a file Chapter_1.xhtml). It's referencing a note/citation in a file References.xhtml in the relative ../Text directory:

Here's a citation in Chapter_1.xhtml:

In Chapter_1:

<sup><a id="Ch_1" href="../Text/References.xhtml#Div_1_target" epub:type="noteref"></a>1</sup>

Here's a citation (footnote 2 in Chapter_2.xhtml) to the SAME note/reference from a different location (Chapter_2.xhtml):

In Chapter_2:

<sup><a id="Ch_2" href="../Text/References.xhtml#Div_2_target" epub:type="noteref"></a>2</sup>
Note the only difference is in the <a> element id and the reference to the (second) <div> in the References file.

Then wherever the footnote/reference text is (In this case in a file References.xhtml in the relative path ../Text), the code will look like this:

In ../Text/References.xhtml:


<p id="MyExampleNote">

<div id="Div_1_target">
<div id="Div_2_target">

Footnote text goes here, and here's the backlink to the CH_1 citation:

<a class="link" href="../Text/Chapter_1.xhtml#Ch_1"></a>
</div>
/* and here's the backlink to the Ch_2 citation: */
<a class="link" href="../Text/Chapter_1.xhtml#Ch_2"></a>
</div>
</p>
The key here is that a <div> is just a block marker which provides you with a distinct ID that you can use as a target of a link. And you can nest <div> elements to your heart's content. Each one has it's own backlink to the specific <a>-reference that went to that <div>. And only the footnote text gets displayed (subject, on the Kindle, to their stripping out of various structure, links, and whatever).

Note that the <p>...</p> is one thing that will work as a note structure, but of course others MAY work as well. However, list elements don't seem to result in the desired behaviors. The best approach is to stick with the <p> elements as illustrated or just go with vanilla <div> elements and any formatting code you may want to throw in between them.

Last edited by ghmerrill; 10-01-2020 at 12:34 PM.
ghmerrill is offline   Reply With Quote
Old 10-01-2020, 03:28 AM   #43
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,254
Karma: 11323261
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by DNSB View Post
Given that footnotes do not exist as such in a ebook
KOReader can display footnotes as footnotes (at the bottom of the current screen)

Quote:
Of course, this runs into fun when a single endnote may be referenced from multiple locations
That is only a problem for "back to text" links, not for "go to note" links. And it's only a problem if the reading application does not have a "back to previous location" function (such applications should be forbidden). I've worked around this problem by providing multiple "back to ..." links in the note. (By the way, I've also done the equivalent in a paper book, providing back references for citations, e.g. "[cited in pages x, y and z]".)
Jellby is offline   Reply With Quote
Old 10-01-2020, 06:53 AM   #44
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 59,929
Karma: 56644595
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by ghmerrill View Post
Caveat: I THINK all the code below is correct -- unless I've made a stupid typo. But I know it works since I tested it thoroughly in Sigil and in the Kindle Previewer. So ...
Forget Kindles. Deal with software that does not have popup footnotes or a back button. Correct code does not always mean it's the right code.

Let's say you have 3 references to the same footnote. How are you going to make it easy to go back? You would have to have three back buttons. And you would have to have them labeled so it's obvious where they go back. But, what if the reader doesn't know which one is the correct one to press? These are things you are not taking into account and that's why your way is all wrong and you need this footnote three times.

Last edited by JSWolf; 10-01-2020 at 06:58 AM.
JSWolf is offline   Reply With Quote
Old 10-01-2020, 08:26 AM   #45
ghmerrill
Enthusiast
ghmerrill began at the beginning.
 
ghmerrill's Avatar
 
Posts: 49
Karma: 10
Join Date: Mar 2017
Location: Central NC
Device: Various
Quote:
Originally Posted by JSWolf View Post
Forget Kindles.
Yeah. Good advice. I've never liked the OS on them anyway. I feel you, bro.

Quote:
Let's say you have 3 references to the same footnote. How are you going to make it easy to go back? You would have to have three back buttons.
So the code I just provided and the experience I've had using it must involve some pretty heavy hallucinations, I guess. Well, that can happen when you get older.

Quote:
And you would have to have them labeled so it's obvious where they go back. But, what if the reader doesn't know which one is the correct one to press?
That's a good observation. Don't know how I didn't think of it. I do have a vague recollection of a lengthy argument with my wife about possible approaches, pros and cons, etc. But somehow we must have missed this.

Quote:
These are things you are not taking into account and that's why your way is all wrong and you need this footnote three times.
I just hate it when I do that. Don't try that code I posted on a Kindle. I'm so embarrassed.

But thanks. The best idea here has been to forget the Kindle. I'll definitely be going in that direction, and so my work in this thread is now done.
ghmerrill is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF -> Mobi: Remove underline from links aschiller Conversion 3 11-05-2019 07:39 AM
From Sigil to Kindle Previewer Conversion Problems! oiver55 Sigil 33 03-09-2015 07:57 PM
Remove underline from links in epub Amalthia Calibre 6 02-10-2014 08:41 AM
Image links without underline slicknick001 Kindle Formats 17 12-20-2013 07:16 AM
Book Designer - Links underline just ONE word? pitolee Sony Reader 21 12-05-2008 10:08 AM


All times are GMT -4. The time now is 11:55 PM.


MobileRead.com is a privately owned, operated and funded community.