![]() |
#1 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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> 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> What’s the best path forward? Is it better to include an empty Code:
<h1 title="Preface"></h1> |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
First off... the reason Amazon reset your start point may have nothing to do with this. They typically change the start point to the first "normal" page of text following the ToC. And there's plenty of other super-secret criteria they use, as well it seems. Point being: They're going to start your book where they want your book to start some times.
That said ... I'm not entirely following the question. You WANT the entry to be in the ToC, in seems, but why exactly do you not want to use the "title" attribute to set the ToC text? |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Amazon seems to have a policy of ignoring prefaces, forewords, acknowledgements, indeed anything that in a traditionally designed book would have "front matter" paginated in lower case roman numerals. I think you would do best to call it something other than "preface" -- say "Marker" or "A Thought" -- in the H heading, followed by your epigram in a conventional paragraph.
I have had pretty good luck uploading epubs to the KDP that have no "text" semantic (SRL) at all. Most such books open at the cover rather than at page one, chapter one. |
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,174
Karma: 144286760
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
This thread has nothing to do with Sigil.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I will be the judge of that, Jon. And I don't agree with you.
The question asked as to whether there is a complementary class name like "sigil_not_in_toc" that can be used to cause non-header tags to be included in TOC generation is certainly relevant to Sigil. The answer is no, but this is definitely the right place to ask such a question. @jcsalomon: There's nothing like that for auto TOC generation, but you can use the TOC editor (after the TOC is generated) to manually add a non-header tag entry to the TOC. You'd have to remember to re-add it if you ever re-generated the TOC, but it's possible to achieve. |
![]() |
![]() |
![]() |
#7 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,910
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
![]() |
#8 | ||
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 100
Karma: 1204
Join Date: Jun 2012
Device: Bookari (née Mantano Reader) on Android; Kindle Fire HD
|
Quote:
(Or an empty <h1 title="Preface"></h1> set; I could be misunderstanding what I’m reading, but it seems leaving the element empty might have bad effects, though I’ve not seen this in my own testing.) Quote:
|
||
![]() |
![]() |
![]() |
#9 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
In HTML5, it seems like the title attribute is now allowable in any tag (XHTML1.1 + HTML 4.01 allowed a subset): https://www.w3schools.com/tags/att_global_title.asp although its overuse may interfere with accessibility: https://www.paciellogroup.com/blog/2...use-and-abuse/ https://www.w3.org/TR/html/dom.html#the-title-attribute Maybe non-<h#> could only be included in Sigil's auto-TOC if you use a combination of both a specific sigil class + title: Code:
<p><span class="sigil_include_in_toc" title="Monetary Theory">Monetary Theory.</span> Monetary theory in the 1860s was reliant upon [...]</p> Quote:
I would still lean heavily towards the solutions using <h#> tags for chapter titles. Side Note: There was only a handful of books I worked on that I can recall which had sidebar/inline headings... I discussed one at length years ago in the topic, "A better workflow": https://www.mobileread.com/forums/sh...96#post3029896 although in my specific case they were slightly superfluous subheadings and not actual main chapter titles (so it didn't matter too much that I used <span> instead of <h3>). Luckily the book has been retypeset many times over the years, so you can see multiple ways different typographers tackled the same issue: Original Publication (1941): Attachment 134015 My Sidebar EPUB: Attachment 134016 My Inline EPUB: Attachment 134017 Routledge (2008): Some later printings even removed the subheadings entirely (I would have to go hunting through my files for comparison images). Quote:
Last edited by Tex2002ans; 03-28-2017 at 10:23 PM. |
|||
![]() |
![]() |
![]() |
#10 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 100
Karma: 1204
Join Date: Jun 2012
Device: Bookari (née Mantano Reader) on Android; Kindle Fire HD
|
I’m definitely using <h#> for chapter titles; just trying to avoid this for the epigram/preface. (And I’ve opened a thread for discussion of the best way to accomplish that: Workshop › Empty <h1></h1> for ToC target?.)
|
![]() |
![]() |
![]() |
Tags |
table of contents |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
suggestion: tag groups should use Calibre tag hierarchy | comox | Calibre Companion | 53 | 05-25-2015 07:22 PM |
Add h2 tag to chapter heading to make TOC | Ozman | Editor | 4 | 08-26-2014 07:00 AM |
sigil_not_in_toc | GMcG | Sigil | 10 | 03-27-2013 01:34 PM |
Can a toc.ncx point to an empty content tag? | twedigteam | ePub | 7 | 02-08-2013 11:57 AM |
Strange problem with TOC showing .html tag | TongueTied | Kobo Reader | 8 | 07-16-2012 07:03 AM |