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 12-29-2012, 04:08 PM   #1
MHC
Member
MHC began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Feb 2012
Location: Northeast US
Device: iPad 2, old Kindle
How to have a TOC entry link to mid-chapter?

I'm using the InDesign 5.5 Book feature to convert a printed book to ePub. The main chapters are divided into separate files to provide page breaks, but each chapter has sub-chapters that need second-level (at least) TOC entries.

The subchapters don't start on new pages in the printed book and I need to follow that format.

a) How can I add the TOC entries that jump to the subchapters (either in Indesign or Dreamweaver 5.5) without creating a page break when the user is reading straight through?

b) How can I indent these TOC entries to get 2nd and 3rd levels?

MHC is offline   Reply With Quote
Old 12-29-2012, 04:22 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,659
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by MHC View Post
I'm using the InDesign 5.5 Book feature to convert a printed book to ePub. The main chapters are divided into separate files to provide page breaks, but each chapter has sub-chapters that need second-level (at least) TOC entries.

The subchapters don't start on new pages in the printed book and I need to follow that format.

a) How can I add the TOC entries that jump to the subchapters (either in Indesign or Dreamweaver 5.5) without creating a page break when the user is reading straight through?

b) How can I indent these TOC entries to get 2nd and 3rd levels?

Just add an named anchor
<a id="midway">(optional words)</a>

then the TOC should reference the Anchor:

<content src="Text/index_split_004.xhtml#midway"/>

(I prefer to use a full link instead of a relative link(the red part) )

Last edited by theducks; 12-29-2012 at 04:22 PM. Reason: Moved example
theducks is offline   Reply With Quote
Old 12-29-2012, 05:25 PM   #3
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
I would suggest that you not include any text within a destination anchor. Some readers (ADE, I think) incorrectly style all anchors as though they were links. (I discovered this quite by accident last week.)

You can't really fix this in CSS because "color: WindowText" and "color: -webkit-text" aren't globally supported, and setting it to black will wreck display on readers in inverse-color mode.

So basically, just always leave non-link anchors empty.
dgatwood is offline   Reply With Quote
Old 12-29-2012, 06:24 PM   #4
MHC
Member
MHC began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Feb 2012
Location: Northeast US
Device: iPad 2, old Kindle
EDIT: Figured it out - it worked all along, it just didn't bring the anchor to the top of the page - ADE navigates so my subhead is in the middle of the page. Any way to have the subhead at the top? Or is this just an ADE glitch?

Thank you so much!

Original post, ignore:
OK, I added an "empty" anchor in InDesign (no text highlighted) before my subhead name, added an entry in the ncx file using the … chapterX.html#anchorname code and re-numbered all the navPoints and playOrders in DW.

I now have the correct TOC entry, but it takes me to the beginning of the main chapter - not the anchor within it. I'm previewing in ADE, as my device isn't here - is that the problem, or do I have to do something else to get it to go to the anchor point?

Dreamweaver does show the anchor is in the correct spot (mid-chapter), and I double-checked what I've done so far. Thanks!

Last edited by MHC; 12-29-2012 at 06:33 PM.
MHC is offline   Reply With Quote
Old 12-29-2012, 07:52 PM   #5
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by MHC View Post
EDIT: Figured it out - it worked all along, it just didn't bring the anchor to the top of the page - ADE navigates so my subhead is in the middle of the page. Any way to have the subhead at the top? Or is this just an ADE glitch?
I think you're misunderstanding the difference between scrolling media and paged media.

Book readers act like paged media (e.g. printed pages); element positioning is computed only once when you first open the book, so that page 65 is always page 65. (*)

When clicking a link to an anchor, a reader behaves as though you turned to the page containing that anchor using the "next page" button. So if the subheading is halfway down the page, it appears halfway down the page just as it would if you turned to that page in a printed copy of the book.

If you want the subhead to be at the top of the page, you would need to insert a page break before the heading to force it to always be at the top of the page.


(*) As a special exception, changing the reader's font style/size settings, margin settings, etc. forces the reader to lay out the book's content again.
dgatwood is offline   Reply With Quote
Old 12-29-2012, 10:14 PM   #6
MHC
Member
MHC began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Feb 2012
Location: Northeast US
Device: iPad 2, old Kindle
Good to know, I assumed incorrectly. Thanks for your help everyone!
MHC is offline   Reply With Quote
Old 12-30-2012, 03:34 AM   #7
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by dgatwood View Post
I would suggest that you not include any text within a destination anchor. Some readers (ADE, I think) incorrectly style all anchors as though they were links. (I discovered this quite by accident last week.)

You can't really fix this in CSS because "color: WindowText" and "color: -webkit-text" aren't globally supported, and setting it to black will wreck display on readers in inverse-color mode.
But

a { color: inherit; text-decoration: none; }

works perfectly
Jellby is offline   Reply With Quote
Old 12-30-2012, 11:16 PM   #8
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by Jellby View Post
But

a { color: inherit; text-decoration: none; }

works perfectly
Wow. I never even knew "inherit" existed. It's not often that such a keyword would be useful, but this is one of those nasty edge cases in the spec where it is.
dgatwood 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
Manually add a TOC entry p3aul Sigil 4 06-13-2012 08:22 AM
TOC Oddity -- Bad Entry For Cover SteveMB Conversion 2 01-03-2012 11:09 PM
2 lines in one toc entry alansplace Sigil 13 07-05-2011 06:34 PM
Unexpected TOC entry neil_matthews Conversion 4 06-12-2011 12:45 PM
Managing HTML Link Behavior, From TOC to Chapter Headings FlooseMan Dave Calibre 1 03-31-2010 11:55 PM


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


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