Make your illustrated Kindle book easily – with Mac, Calibre & Seashore! 3: Headings and lists of contents

For the headings, you will probably want to go through your html file, setting each heading exactly as required.  Put <h1> before and </h1> at the end of each top level heading such as chapter headings, and use <h2> , <h3> etc for more subordinate headings throughout.  You can also use <b>  </b> around headings, or any other style indicators you might find in the title pages material, such as <small> </small> and the same with big. It doesn’t matter if the style commands are both inside or both outside the <h1> etc. commands.  You can go quite deep embedding <big> or alternatively <small> clauses within themselves. You can start a new line even within a heading using <br/> .

If you’ll want to let readers click somewhere else in the book and jump to any particular heading, encase the heading within an <a …> </a> structure like this:

<a id=”chap03″>

<h1><small>3. </small><br/>Algorithms and Dinobirds</h1>

</a>

(It could all be on one line – html ignores new line commands of course.) The chap03 in quotes could be anything, for example “Intro1” or “label for sect 5″.  Html does require straight double quotes there though.  If somehow you accidentally convert them to smart curly quotes, it won’t work.

You could include a piece of clickable text somewhere else that said  chapter 3 , but would take you back to the label chap03 wherever it was, by inserting this:

<a href=”#chap03″>chapter 3</a>

I think I have more than one different label marking the start of some chapters but it doesn’t cause a problem.

You will be able tell Calibre to include various levels of headings in the table of contents (see below).  I ended up including heading levels 1 and 3 but not 2 in the contents.  If you’re outputting a .mobi file, Calibre will let you choose to put the table of contents at the start or end of the book or to leave it out altogether.

You’ll also be able to create a separate list of illustrations at the end, but you’ll have to do it yourself, following the example in the html for the reduced book: the name you put in the illustration contents list just after the #, will be the one you put just after the ‘id=’ label at the line where you want the image to be shown – see next posting. (I don’t know if it’s possible to put the illustration list elsewhere than at the end, but that <a id=”TOC”> line might cause a problem with this.) My illustration list is the one from the full version of the book.

Advertisements
This entry was posted in Kindle Calibre Seashore tips and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s