View Single Post
Old 05-20-2014, 02:58 PM   #4
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,830
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Derek R View Post
I usually generate the table of contents from <h1> tags. However, there are occasions when I don't want headings displaying at the top of particular sections in an ebook. For instance, I would want to avoid having a heading appear above the frontispiece in the xhtml file that I have created for that image. Rather than have <h1>FRONTISPIECE</h1>, for example, is it acceptable to simply have <h1></h1> with nothing between the container tags and then edit the toc to include 'Frontispiece' as the section title? Or is it bad practice to use tags in this way and, if so, what is the best alternative?
Well, if you are working with Sigil then is a piece of cake what you want Just use (in the place you want):

Code:
<h1 title="FRONTISPIECE"></h1>
and after pressing Ctrl+T, you'll have a TOC entry with the name FRONTISPIECE.

So, what you need to do is to write with the global attribute "title" what you want to appear in the TOC. Examples:

Code:
<h1 title="This is a TOC entry"></h1>
<h2 title="Another TOC entry"></h2>
and so on Of course, tags <h1..h6> can be empty.

Regards
Rubén
RbnJrg is offline   Reply With Quote