Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 01:36 PM   #1
foosion
Addict
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: 391
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; Today at 01:41 PM.
foosion is offline   Reply With Quote
Old Today, 08:26 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 39,732
Karma: 154147706
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Section is similar to a div but used to group related content. You will notice that the section in your quoted text has no classes but does include identifiers, roles, epub-type, etc.

The ID is likely used in the ToC instead of pointing to the chapter file, you would get href="part0007.html#hd-chapter001". Add further ids for subchapter entries.

The href to the ToC allows you to go back to the ToC by tapping on that entry. A vestige of old practices. Remember when you would see Last:Next:ToC at the top and bottom of chapters?

An epub-type is part of ePub3 attributes allowing improved semantics. Originally, it was hoped/hyped that epub-type would improve accessibility but other than some limited success with footnotes, this did not happen.

OTOH, a role is an ARIA attribute used to expose information to assistive technology. There is a lot of overlap which is why it was originally hoped to use epub-type but support never materialized.

See the EPUB Type to ARIA Role Authoring Guide for more information.
DNSB is offline   Reply With Quote
Advert
Old Today, 09:35 PM   #3
foosion
Addict
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: 391
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
That's very helpful. Thank you!

It appears that if I'm editing a commercial work for personal use, want to make the appearance more pleasing to me and don't use assistive technology, I could just enclose each part of the text in bare h# tags, style those as desired in the CSS and delete the rest. I could then generate a ToC from the h# tags, using a title attribute if desired, without needing any href or id.

Deleting the "excess" would make things simpler and easier to understand for me.
foosion is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
It's Complicated drjenkins Deals and Resources (No Self-Promotion or Affiliate Links) 13 03-06-2014 12:23 AM
I'm sure this would be complicated, but is this possible? Dullahir Calibre 5 06-03-2013 05:04 AM
Now Things Get Complicated Kris777 News 21 04-17-2010 03:25 AM
UK User - is it really this complicated?! twisticles Sony Reader 30 09-22-2008 10:46 PM


All times are GMT -4. The time now is 10:12 PM.


MobileRead.com is a privately owned, operated and funded community.