View Single Post
Old 06-23-2013, 03:15 PM   #8
santosha
Novice
santosha began at the beginning.
 
santosha's Avatar
 
Posts: 14
Karma: 10
Join Date: Jun 2013
Device: Kindle Paperwhite
Quote:
Originally Posted by DiapDealer View Post
Even if you use "id" in place of "name," it's best to put those anchors before the header or other element you're linking to, like the guidelines say.

Of course the best way to avoid the styling "quirks" that can occur with MOBIs when linking to your various chapters is to not use url fragments at all. Instead, break your chapters into individual html files and link directly to the files (with no fragment). That way you don't have to worry about the "quirk" (and you won't need to use "page-break-before: always;").

Footnotes can still be problematic, but as long as you follow the guidelines and put the <a id="foo" /> anchor before your styled "target," you'll be alright.
Thank you, DiapDealer!

I really like the idea of separating everything into different HTML files (for many reasons, clarity of overview and workflow being two of them) -- and will look more into it. I'm a little confused as to how to tell the compiler (e.g. KindleGen) actually pieces together the file in such a case, and how ToC links remain intact etc., do you have any suggestions where I could read up on this method of breaking it all up?

Is it the manifest or spine in the OPF that make sure they're placed in the right order?

When you say URL fragment, do you mean the way anchors link to chapters by referencing within a document, i.e. with #chapter1 referencing the id="chapter" element or am I misunderstanding?

Oh, and DiapDealer -- If I compile my ebook file with different files for different chapters in this way, do they automatically receive a page-break between them? I'm sort of implying from what you're saying in your post about not having to use the page-break-before:always;, but don't really understand how you mean.

Last edited by santosha; 06-23-2013 at 03:18 PM. Reason: Added question
santosha is offline   Reply With Quote