07-16-2013, 07:41 PM | #1 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
second level headers in Sigil
I want to have a ToC with second level headings:
Book1 chapter 1 chapter 2 chapter 3 Book 2 Book 3 I've compiled the epub using scrivener, and thought I had the chapters set up as second level headers, but they all come out flush left. Is there a way in Sigil to indicate a second level header for the chapters? (the chapters should be indented under Book 1, but won't indent when I save this - sorry! Last edited by BeccaPrice; 07-16-2013 at 07:45 PM. |
07-16-2013, 07:52 PM | #2 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
How about defining h2 as indented in css?
|
07-16-2013, 07:53 PM | #3 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
The tags H1, H2, H3 etc. determine the level of the contents. The ePub TOC is in a separate file and is used by the application to display the headings. The display of this data is under control of the viewing application. Many have a clickable arrow to expand on compress the levels for viewing.
It is also possible to display a TOC inside the book itself but this is not the primary method used by ePub. Is there a TOC inside the book that you are worried about? If so you control the look of it with the CSS entries. Dale |
07-16-2013, 08:03 PM | #4 |
Well trained by Cats
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Sigils HTML (from the NCX) TOC is indented as well.
You can tweak the Sigil-TOC.CSS for more or less indent |
07-16-2013, 08:21 PM | #5 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
This is an epub compiled with Scrivener. The styles are all .scrivener1, .scrivener2 etc. I suppose I could experiment with them and see which one affects the ToC.
I'm talking about both the linked ToC and the toc.ncx files, although really I only need them indented in the linked ToC. the code assigned to the item I want indented is <p class="toc-item"><a href="../Text/body3.xhtml">The Nightmares</a></p> the <p class...> call is the same for all items in the ToC, no matter what level I want them at. I'm going to have to edit the HTML in both the contents file and the .css to create a second toc-item for the second-level headers, aren't I? My html skills, never very good, are awfully rusty. |
07-16-2013, 08:28 PM | #6 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Simply change the class to a different name and then put that name in your CSS file with a different left margin.
|
07-16-2013, 08:38 PM | #7 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
copy/paste and edit and it works wonderfully. Thanks!
Now, is there a way to get the ncx to do that, or do I just live with a flat ToC for the ncx file? |
07-16-2013, 08:54 PM | #8 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
You can do this for the NCX via the use of headers, but not through named paragraph classes. Think of it this way: style names are just that--only names. A collection of letters or numbers or symbols that means something to you, but without your direct intervention by providing explicit CSS instructions to the ePUB reader, meaningless to the book. A header class, however--not a style name for a header, but an actual h1 or h2 declaration--tells the document that this is structural. Had Scrivenver used H1 and H2 classes for your desired in/outdents in the first place, this would be fairly auto-magically done for you. If you are remotely regex-y, you can likely replace all the chapter heads (do NOT FORGET to change the closing p tags to closing header tags!) to h2's for you. Does that help? Hitch |
|
07-16-2013, 11:04 PM | #9 | |
Well trained by Cats
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
h1 thru h6 for levels (typically I use 2, H2 Top (Main Book level,Part,Forward, Epilogue...). H3 chapters inside a part and rare: a H4) For Omnibus, I start at H1 (The whole book), H2 for story level, h3 chapter level. I do NOT use H tags for headlines and other bold usage: I assighn a style |
|
07-17-2013, 01:24 AM | #10 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
It is a bad thing that Scrivener does not use headers and perhaps other structural elements. It is one thing that users don't grasp the difference between content and structure, but when programmers make that mistake...
It is not wrong as such, as it does work, but bad practice. |
07-17-2013, 10:02 AM | #11 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
07-17-2013, 12:39 PM | #12 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copying CSS headers to following chapters in Sigil | Kimble | Sigil | 5 | 03-30-2013 05:00 AM |
Sigil 0.3.4 / Sigil 0.4.0 RC1 / Cover in Nook Color | Bertrand | Sigil | 13 | 08-06-2011 04:06 AM |
Sigil 0.3.4 / Problème CSS entre Sigil et iPad | Grivels | Software | 10 | 07-03-2011 09:06 AM |
Multi Level Headers | AJ Starr | Astak EZReader | 14 | 01-15-2010 03:26 PM |
ePub Headers | Timoleon | ePub | 20 | 07-29-2009 12:04 PM |