Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-16-2013, 07:41 PM   #1
BeccaPrice
Wizard
BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.
 
BeccaPrice's Avatar
 
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.
BeccaPrice is offline   Reply With Quote
Old 07-16-2013, 07:52 PM   #2
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
How about defining h2 as indented in css?
mrmikel is offline   Reply With Quote
Old 07-16-2013, 07:53 PM   #3
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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
DaleDe is offline   Reply With Quote
Old 07-16-2013, 08:03 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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
theducks is offline   Reply With Quote
Old 07-16-2013, 08:21 PM   #5
BeccaPrice
Wizard
BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.
 
BeccaPrice's Avatar
 
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.
BeccaPrice is offline   Reply With Quote
Old 07-16-2013, 08:28 PM   #6
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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.
DaleDe is offline   Reply With Quote
Old 07-16-2013, 08:38 PM   #7
BeccaPrice
Wizard
BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.
 
BeccaPrice's Avatar
 
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?
BeccaPrice is offline   Reply With Quote
Old 07-16-2013, 08:54 PM   #8
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
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:
Originally Posted by BeccaPrice View Post
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?
Becca:

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
Hitch is online now   Reply With Quote
Old 07-16-2013, 11:04 PM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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:
Originally Posted by BeccaPrice View Post
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?
You can have 6 levels of TOC (if your device does not belly up ) with Sigil

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
theducks is offline   Reply With Quote
Old 07-17-2013, 01:24 AM   #10
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 07-17-2013, 10:02 AM   #11
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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:
Originally Posted by Toxaris View Post
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.
Actually for ePub 3 it is wrong, not just bad practice.

Dale
DaleDe is offline   Reply With Quote
Old 07-17-2013, 12:39 PM   #12
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by DaleDe View Post
Actually for ePub 3 it is wrong, not just bad practice.

Dale
At least something positive in ePUB3...
Toxaris is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 09:47 AM.


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