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 06-23-2013, 05:17 PM   #1
Spolle
Junior Member
Spolle began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2013
Device: none
Question Hypertext and EPUB?

I consider writing some interactive stories. EPUB looks like a good platform.

However, the normal page turning is a problem. This means that if the users clumsy fingers misses the hyperlink text, he will instead go forward (or backward) one page. I could, of course, duplicate each page. This will cause the book to be twice as big, but would mean that "going forward" one page won't make any difference. However, this would be a bother to do manually, and I don't know any way to script it.

Is there any 'legal' way to expand the clickable area of a hyperlink beyond that of a simple text area? I know that I could do nasty hacks like put a <table> inside a <a>, but this not the kind of coding e-book readers will expect.

Is it possible to disable page turning by toying with content.opf or toc.ncx? So that the book thinks there is no next page, or that the next page is the same page?

Is it possible to avoid page breaks in certain areas of the text? (this is to avoid that the user misses a hyperlink option because it is on the next page.)

If anyone has any experience in using hypertext inside EPUB books, I would love to hear about it.

Thanks for reading this far!
Spolle is offline   Reply With Quote
Old 06-23-2013, 09:04 PM   #2
mrmikel
Book Twiddler
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 1,994
Karma: 1405001
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
If by hypertext you mean links in the book, they are used all the time. You just have to point back to where it came from, since some older readers do not have a back button.

Avoiding page breaks can be a bit of a problem since the user can zoom to a large text size. You might succeed but leave big gaps of empty space since you have forced the whole paragraph onto the next page.

Sigil, the epub editor has buttons to provide both links and anchors. But you have to do them yourself. You could make the link text larger or color it differently or include the following and leading space, but the colors will not show up on a number of e-ink readers. Image maps don't work either.

Many many links can slow things down on e-ink readers as opposed to tablet computers.

If you must lay things out exactly, then a pdf might be the way to go. How much pdf internal links would be honored by a reader I don't know.
mrmikel is offline   Reply With Quote
 
Enthusiast
Old 06-23-2013, 09:22 PM   #3
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: 36,622
Karma: 17734032
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Make sure the links in the ePub are large enough to be easily touched.

One book I've recently fixed up to make the links big enough, I change the superscripted numbers to [1] [2], etc. also removing the superscript so they were the same size as the main text. No problem touching them to move to the footnote.
JSWolf is offline   Reply With Quote
Old 06-24-2013, 03:32 AM   #4
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: 6,075
Karma: 4571547
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Spolle View Post
However, the normal page turning is a problem. This means that if the users clumsy fingers misses the hyperlink text, he will instead go forward (or backward) one page.
That's only a problem if the ebook reader turns pages by touching. I guess most of them nowadays do, but it's not something inherent to the ebook format. Besides, some readers (mine, for instance) let you select links without using the touchscreen, which is a possible workaround.

Quote:
I could, of course, duplicate each page.
No, you couldn't, because you don't know where each page starts and ends, that depends on the font family and size, screen size, orientation, margins, linespacing... all of those could change from reader to reader.

Unless you are creating one of those concoctions called "fixed-format" ePub. A PDF would be much better in this case.

Quote:
Is there any 'legal' way to expand the clickable area of a hyperlink beyond that of a simple text area? I know that I could do nasty hacks like put a <table> inside a <a>, but this not the kind of coding e-book readers will expect.
You can add more text to the link, like instead of "see chapter <a href...>3</a>" you could write "<a href...>see chapter 3</a>". But if you are thinking of extending the active link area above and below the text, without affecting the normal text layout... I think that would be tricky, and I wouldn't expect it to work correctly in many readers.

Quote:
Is it possible to avoid page breaks in certain areas of the text? (this is to avoid that the user misses a hyperlink option because it is on the next page.)
In theory, you can use "page-break: avoid" inside a block's CSS. In practice, this is often not properly supported.
Jellby is offline   Reply With Quote
Old 06-24-2013, 02:04 PM   #5
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: 36,622
Karma: 17734032
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
This one very good reason why Sony did it right. They decided on a swipe for page turns and not just a tap. This means that trying to tap on a link won't cause a page turn by mistake.
JSWolf is offline   Reply With Quote
Old 06-24-2013, 07:08 PM   #6
Spolle
Junior Member
Spolle began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2013
Device: none
Thanks guys, for this goldmine of info! :-)
Spolle is offline   Reply With Quote
Old 06-26-2013, 04:53 AM   #7
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 63,180
Karma: 41305389
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
The "<spine>" section of the OPF file defines the "browsing sequence" of pages in the book. I believe (although I haven't tried it) that you could stop the user from paging forward from one "topic" to the next by NOT having those files listed in the "spine". Hyperlinks would still work, but not paging.
HarryT is offline   Reply With Quote
Old 06-26-2013, 06:07 AM   #8
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,900
Karma: 4632610
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by HarryT View Post
The "<spine>" section of the OPF file defines the "browsing sequence" of pages in the book. I believe (although I haven't tried it) that you could stop the user from paging forward from one "topic" to the next by NOT having those files listed in the "spine". Hyperlinks would still work, but not paging.
AFAIK, that won't work in ADE and epubcheck will display a warning for each hyper-linked .html file without a spine entry.
Theoretically, a linear="no" spine entry attribute should prevent pages from being displayed when paging through a book, but, AFAIK, only iBooks and some other epub 3 reading systems actually observe this attribute.
Doitsu is offline   Reply With Quote
Old 06-26-2013, 06:13 AM   #9
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 63,180
Karma: 41305389
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
That's a pity. As I say, I haven't actually tried it - it was merely a thought.

I believe it does work for Mobi, if that's of any interest for the OP.
HarryT is offline   Reply With Quote
Old 06-26-2013, 08:16 AM   #10
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: 6,075
Karma: 4571547
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by HarryT View Post
I believe (although I haven't tried it) that you could stop the user from paging forward from one "topic" to the next by NOT having those files listed in the "spine".
That would make the ePub invalid. The spec says that all HTML files must be listed in the spine.

Quote:
Originally Posted by Doitsu View Post
Theoretically, a linear="no" spine entry attribute should prevent pages from being displayed when paging through a book, but, AFAIK, only iBooks and some other epub 3 reading systems actually observe this attribute.
And Calibre, if I remember correctly. That's a pity, because it would be a very useful attribute for endnotes, especially when they are at the end of each chapter.
Jellby is offline   Reply With Quote
Old 06-27-2013, 10:50 PM   #11
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: 36,622
Karma: 17734032
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
What I do is put the footnotes/endnotes at the end of the spine so when I read forward, I won't be having to skip past them.
JSWolf is offline   Reply With Quote
Old 06-28-2013, 07:43 AM   #12
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: 6,075
Karma: 4571547
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by JSWolf View Post
What I do is put the footnotes/endnotes at the end of the spine so when I read forward, I won't be having to skip past them.
Of course, that's what I do as well, but even in that case it would be nice if readers obeyed the linear="no" attribute, especially if the notes are not included in the global page count.
Jellby 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
A New Epub Creator: txt to epub, word to epub oxen ePub 118 06-02-2014 09:44 PM
InDesign creates hypertext element that won't validate Eweforia ePub 0 04-20-2012 11:01 AM
epub to epub conversion problem with regex spanning multiple input files ctop Conversion 2 02-12-2012 01:56 AM
Mobi hypertext link not working newbi Calibre 5 11-16-2011 05:36 PM
epub, ePub, EPUB, warum blos ePub? flowoeB Lounge 5 11-27-2009 09:37 AM


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


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