View Full Version : few noob questions.

10-20-2012, 04:51 PM
[edit]: I have noticed this maybe is better in "epub" subforum? Can a mod move it?

I am new at creating ebooks and a novice on html at heart, please bare with me with few simple questions (I hope) that I have been having.

Considering toc, I noticed that whenever I converted a ebook to mobi that the toc is at the very end of the book. It is really confusing and somewhat frustrating to me, thus I'm wondering if there is anyway to move the toc to the first few pages of the book. I have searched the forum and the only reverent answer was to check calibre for conversation options, which it worked, however it actually creates additional toc at the beginning. So, resulting file have a toc at the beginning and one at the end.

I understand there is a code where you can trigger the viability of words on the file. For example, I wanted give a name to the chapter, h3 chapter 1, however, I do not wanted the "chapter 1" appear on the page itself only in the toc. I have come across it once or twice, but have apparently fail to make note of it. If possible, please provide me the code?

Thank you for taking the time~

10-20-2012, 05:11 PM

10-21-2012, 02:35 AM
one way is to style the "Chapter 1 " text with zero line height. That I think will make it disappear from the page. but it may not work in all readers.

another way is to just delete the chapter 1 text .i. leave just an empty line, AFTER you have built the TOC, then remember not to rebuild it

10-21-2012, 04:39 AM
1. The location of the inline TOC created (if any) is up to program you are using to convert the book. If you are using calibre, I believe there's some setting for that. You'd be better saved asking this in the calibre forum, as this is only marginally related to ePub.

2. The titles in the text and in the TOC are totally independent, you can have whatever words you want in both (even in an inline TOC, if it exists). It is only if you are creating the TOC automatically with some tool that the titles are copied from the text. In that case, you should tell us which tool you are using. You can "hide" some words from the text wrapping them in a <span> (or whatever) with a "display: none" style. In Sigil (and maybe other programs) you can assign a different name for the TOC adding a "title" attribute, so these would be roughly equivalent:

<h3><span class="hidden">Chapter 1</span></h3>

/*with this in CSS:*/
span.hidden { display: none; }

<h3 title="Chapter 1">&nbsp;</h3>

(The second may be better for conversion to Mobi, as Mobi does not support CSS, and the converter might not interpret "display: none" correctly.)

10-21-2012, 07:29 AM
If you are creating works in epub, you need to be aware that not all readers will treat hidden text the same. It may well be hidden alright, but at the expense of a 10 character or so space in the middle of your text. This is particularly a problem with page numbers.

You might experiment by creating a new and short document in Sigil with some of these attributes and then do your conversions and see what results you get with your reader and with Nook for PC and Sony Reader Library software.

10-21-2012, 04:38 PM
<h3 title="Chapter 1">&nbsp;</h3>

This work perfectly, thank you.

10-22-2012, 01:46 AM
If you use display hidden it should not occupy space and cause rendering issues.