Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-16-2013, 08: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,134
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 08:45 PM.
BeccaPrice is offline   Reply With Quote
Old 07-16-2013, 08: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,086
Karma: 1444487
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, 08: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: 9,782
Karma: 5137308
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
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, 09:03 PM   #4
theducks
Grand Sorcerer
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: 15,260
Karma: 6020309
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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, 09: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,134
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, 09: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: 9,782
Karma: 5137308
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
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, 09: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,134
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, 09: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: 2,664
Karma: 15346071
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
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 offline   Reply With Quote
Old 07-17-2013, 12:04 AM   #9
theducks
Grand Sorcerer
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: 15,260
Karma: 6020309
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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, 02: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: 3,183
Karma: 7180223
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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, 11: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: 9,782
Karma: 5137308
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
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, 01: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: 3,183
Karma: 7180223
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:00 AM
Sigil 0.3.4 / Sigil 0.4.0 RC1 / Cover in Nook Color Bertrand Sigil 13 08-06-2011 05:06 AM
Sigil 0.3.4 / Problème CSS entre Sigil et iPad Grivels Software 10 07-03-2011 10:06 AM
Multi Level Headers AJ Starr Astak EZReader 14 01-15-2010 04:26 PM
ePub Headers Timoleon ePub 20 07-29-2009 01:04 PM


All times are GMT -4. The time now is 01:35 PM.


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