06-19-2016, 02:47 AM | #16 |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
06-19-2016, 08:12 AM | #17 | |
Grand Sorcerer
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
(For more information on popup footnotes, see this post.) My (valid) ePub3 test file uses onload, onclick and localStorage to save the id of the footnote reference and to dynamically generate backlinks that simulate the back button. The book contains 3 chapters with identical footnote links and a footnotes html file with dummy definitions. For debugging purposes the ePub will also display the id of the calling footnote reference and the href of the backlink via alert(). However, the only mobile app that it worked with was iBooks for iOS and the only PC ebook app it worked with was ADE 4.5.x. (It also works with Sigil 0.9.5 or higher.) However, since I only have very limited JavaScript skills, it's quite possible that there's a subtle JavaScript bug that I missed. I attached my file to his post so that ebook designers with much better JavaScript skills than me can have a look at it. BTW, if you open the book with an ePub app without JavaScript support, the footnotes won't have backlinks, but the footnote links should still work. |
|
Advert | |
|
06-19-2016, 04:25 PM | #18 | ||
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
Quote:
But yeah, if you're linking to content in the book, this workaround wouldn't apply. Quote:
Last edited by mattmc; 06-19-2016 at 04:29 PM. |
||
06-19-2016, 09:39 PM | #19 | |||
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Quote:
Hitch |
|||
06-20-2016, 04:43 AM | #20 |
Fanatic
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
|
I am also of the opinion that a piece of anything, if not correctly working, should not be bought and used. This is often referred to as "voting with the purse".
However, for now on I am stuck with some hardware ereaders that have a back function and with an otherwise excellent ereader for android that has not this. Meanwhile, searching the net I noticed that there might be a newer version of gitden, as many screenshots do show a back function. I prefer to stay with epub2.0. |
Advert | |
|
06-21-2016, 12:13 AM | #21 | |
Unicycle Daredevil
Posts: 13,923
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
Quote:
Spoiler:
|
|
06-21-2016, 02:58 AM | #22 | |
Fanatic
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
|
Quote:
For now I copy/paste the same note over and over and renumber it/them accordingly. Not a big problem. Not very elegant either. |
|
06-29-2016, 12:45 AM | #23 |
Not who you think I am...
Posts: 374
Karma: 30283
Join Date: Jan 2010
Location: Honolulu
Device: PocketBook 360 -- Ivory
|
I'm not expert enough to answer the following question, nor in a position to experiment but... as long as there was no more than one link to the common target from a single html page (ie: in the chapter) could you link in a different css for each chapter with a different set of css variables? (If there was more than one link in the chapter, you'd only be able to pick one variable to come back to even with this hacky idea.)
Then if there was no css linked in the target's html, could it inherit the css of the preceding html page? If so, you could set the variables in the chapter's linked css and the target's html would use them. So, in every chapter that you want a different return value you vary that value in the css variable. Probably wouldn't work, but if there is a way to force that inheritance, it might. @import, maybe? I'm probably way off base here -- surely when you jump between an epub's internal documents, all prior css is lost... 2¢, and worth every penny. Aloha. ps: @document in your master css with nested anchor tags for every origin link at the target? So when you leave chapter 17 for the target html you link to its <a href="target.html#chapter17"> anchor, and your CSS variable gets applied? I don't know if the URL can include anchors for @document. ... or maybe a unique string in that anchor, and use the regexp function of @document? pss: I bet variables don't work in most devices anyway. psss: @document and symbolic links? Last edited by capidamonte; 06-29-2016 at 01:20 AM. Reason: addendum |
06-29-2016, 12:55 AM | #24 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Sweetie, you intrigue me, you do. I may give that a go this weekend, if I get some free time. Hmmmmmm....although knowing Tex, he may leap into testing it first. :-) Hitch |
|
06-30-2016, 10:56 PM | #25 |
Not who you think I am...
Posts: 374
Karma: 30283
Join Date: Jan 2010
Location: Honolulu
Device: PocketBook 360 -- Ivory
|
Hey, Your Hitchness!
I didn't see your reply before I PSSSed. I actually think the best bet is @document with symbolic links. And this all requires the reader to support variables in the first place, of course. Since most readers are based on some sort of linux, symbolic links would give you the simple html address that would work with @document. Hope you are well, and mucho aloha. |
07-01-2016, 03:37 AM | #26 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
I just pulled my ancient carcass out of bed---pulled a 36-hour "shift," so I'm a bit ragged round the edges. I'll look at this again when I'm less bedraggled. Can't seem to do those long days like I used to! Hitch |
|
07-03-2016, 07:22 PM | #27 | ||
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
Quote:
Quote:
Unfortunately, the problem boils down to one of state. If you want a backlink to change based on where the reader came from, you want your application to have a state. Full EPUB2 compatibility, AFAIK, means no Javascript, and no JS means no state. No amount of tricky CSS styling will get you anywhere, as that stuff is stateless. Funny, as I'm about to hit Submit Reply, I actually understood what you meant by symlinks. If you could have each of your hyperlinks hit a symlink that went to the same document, but somehow "defined a different URI for where you were", you could then use the @document directive to use CSS to hide/show the appropriate backlinks. Huh. 10 points for cleverness, but yeah, symlinks are out and @document is an experimental CSS feature :/ |
||
07-03-2016, 07:36 PM | #28 |
Not who you think I am...
Posts: 374
Karma: 30283
Join Date: Jan 2010
Location: Honolulu
Device: PocketBook 360 -- Ivory
|
Your last paragraph is what I mean, yes. Did you actually try it?
There is definitely a file system, and the link file can be part of that system. The application that is running on your device is probably running a Linux kernel, and in Linux environment everything is accessible as a file. No state required, I don't think. Yes, @document is experimental. But do you know whether it is actually working in any devices or not? I've touched on these points in my original suggestion, and I still think it needs to be tried. It may well not work, for exactly the reason that @document may not be supported, CSS variables may not be supported. Should still be tried, because it's pretty simple and it just might work and it isn't difficult to test. Aloha, and thanks for responding. And for understanding what I was trying to suggest. |
07-03-2016, 10:36 PM | #29 | |
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
Quote:
Per this article: https://css-tricks.com/the-at-rules-of-css/ @document is compatible with almost nothing as of May 2015. Given that evidence, and my limited time, I think I won't work on it further...but I appreciate the out-of-the-box thinking |
|
07-04-2016, 12:05 AM | #30 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
If @document were supported in Safari, you might have a chance with the WebKit-based readers, but it isn't. See: https://bugs.webkit.org/show_bug.cgi?id=51172 |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
WANTED eReader that has epub Formate.... | Barbara1955 | Which one should I buy? | 22 | 10-12-2015 06:41 AM |
Wanted: Company who makes Epub | seglare80 | ePub | 14 | 03-13-2014 05:06 PM |
Suppose I wanted to make an epub??? | ProDigit | ePub | 97 | 04-17-2012 10:10 PM |
added epub, now wanted to get metdata | salines | Calibre | 12 | 11-24-2011 01:28 AM |
Wanted: EPUB testbed e-reader - what's good and cheap | Greg Anos | Which one should I buy? | 4 | 10-11-2010 10:58 AM |