View Single Post
Old 10-06-2024, 01:36 PM   #1
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 474
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Why so complicated?

I found this at the top of chapter 1 of a book and I'm wondering why all of this is needed. Wouldn't it be simpler to just label everything that is to go into the TOC with h#s? Sect1 could be a higher h# so it wouldn't get put into the TOC.

If the page should have a few lines, but the TOC only one line per chapter, use the title attribute.

Text:
Chapter One
Words words
Some more words

TOC:
Chapter One: Words words "Some more words"

Code:
<section aria-labelledby="hd-chapter001" epub:type="bodymatter chapter" id="chapter001" role="doc-chapter">

      <h1 class="chapter-number" id="hd-chapter001"><span epub:type="pagebreak" id="page12" role="doc-pagebreak" title="12"></span><a href="toc.xhtml#toc-chapter001"><span epub:type="pagebreak" id="page13" role="doc-pagebreak" title="13"></span>CHAPTER ONE</a></h1>

      <h1 class="chapter-title"><a href="toc.xhtml#toc-chapter001">Words words</a></h1>

      <h2 class="chapter-subtitle"><a href="toc.xhtml#toc-chapter001">“SOME MORE WORDS.”</a></h2>

      <h1 class="sect1" id="a001">1.</h1>
Also, what does the "section" part accomplish?

Given no index and the ability to generate a TOC from major Hs, what does "id" accomplish?

Why an href to the TOC in an epub?

Finally, why epub:type="pagebreak" or ="bodymatter chapter" or role="doc-pagebreak"?

Last edited by foosion; 10-06-2024 at 01:41 PM.
foosion is offline   Reply With Quote