View Single Post
Old 03-28-2017, 02:57 PM   #1
jcsalomon
Zealot
jcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheese
 
jcsalomon's Avatar
 
Posts: 100
Karma: 1204
Join Date: Jun 2012
Device: Bookari (née Mantano Reader) on Android; Kindle Fire HD
Non-<hn> tag in TOC: complement to sigil_not_in_toc

A series of books I’m typesetting each begin with a sort of one-sentence “Once upon a time…” preface. Since the dead-tree version had this formatted similar to headings, I coded the prefaces thus:
Code:
<body>
  <h2 title="Preface">Once there was a world [text elided]…</h2>
</body>
Trouble is, Amazon decided to reset the start-reading location to the next page, Chapter 1, probably because that had the first text in <p> tags.

My thought is to recode the preface as specially-styled text, something like
Code:
<body>
  <p class="preface" title="Preface">Once there was a world [text elided]…</p>
</body>
where p.preface is styled in CSS the same as h2. But of course this breaks Sigil’s header-identifier code for (re)building the Table of Contents.

What’s the best path forward? Is it better to include an empty
Code:
<h1  title="Preface"></h1>
tag for this, or is there a complement to sigil_not_in_toc that will cause Sigil to recognize a non-hn element as belonging in the TOC?
jcsalomon is offline   Reply With Quote