Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-24-2017, 05:04 PM   #1
Dave_M
Junior Member
Dave_M began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2017
Device: none
Sigil Nav.xhtml Line Break Issue

In my ebook nav.xhtml, below is the code I'm dealing with. I would like to have a blank space between the Preface and Part One of the book. However, any code I try to add to create a blank space or line (such as <br/>)does not work. I keep getting a parsing error. Should I pursue creating a different line class in my style sheet? Can anyone help? Thanks, Dave

<h1>CONTENTS</h1>
<ol>
<li>
<a href="../Text/Section0008.xhtml#preface">Preface (Adam Davis)</a>
</li>
<li>
<a href="../Text/Section0009.xhtml#one_part">ONE: BEYOND THE IMAGE</a>
</li>

Last edited by Dave_M; 10-24-2017 at 05:06 PM. Reason: clarity
Dave_M is offline   Reply With Quote
Old 10-24-2017, 05:07 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Use CSS to set the formatting:

li {margin-top:2em}


You should have a css stylesheet (something like "stylesheet.css") where you can put the code above. Then link that sheet be right-clicking on your html file(s) and selecting "link stylesheet". Point it to your stylesheet and...voila!


edit: OH! And Welcome to MR!!

Last edited by Turtle91; 10-24-2017 at 05:10 PM.
Turtle91 is offline   Reply With Quote
Advert
Old 10-24-2017, 05:21 PM   #3
Dave_M
Junior Member
Dave_M began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2017
Device: none
Hi. Thank you! This is my first post. Er, that was.

Well, I tried that early on. But the issue is that I want extra space only in three places: between Part I, Part II, and Part III in the table of contents in the nav.xhtml file. I need to add a blank space between those three lines. In other words, I don't want to add extra white space between every entry in the contents. Does that make sense?

Last edited by Dave_M; 10-24-2017 at 05:22 PM. Reason: clarity
Dave_M is offline   Reply With Quote
Old 10-24-2017, 08:46 PM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Then you give those special cases a class name:

Code:
CSS
li.space {margin-top:2em}

HTML
<li class="space">Part I</li>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li class="space">Part II</li>
<li>Four</li>
<li>Five</li>
<li>Six</li>
<li class="space">Part III</li>
<li>Seven</li>
<li>Eight</li>
<li>Nine</li>
edit:
You can even go crazy and give them 'spiffy' formatting just by changing the CSS like this:

Code:
li       {text-indent:2em}
li.space {margin-top:2em; text-indent:0; font-weight:bold; 
          color:blue; text-decoration:underline; font-size:1.5em}
OK...I went a little crazy on the formatting....but I just wanted to show that you can format your book any way you want to very easily by setting up the proper CSS. It will really help to spend a couple hours reading those tutorials and picking up some basics of CSS.

Cheers!

Last edited by Turtle91; 10-24-2017 at 09:00 PM.
Turtle91 is offline   Reply With Quote
Old 10-24-2017, 08:54 PM   #5
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
You can find a lot of information about how to style/format your ebooks on the MR Wiki, the ebook production page, and a great tutorial reference page on W3Schools.
Turtle91 is offline   Reply With Quote
Advert
Old 10-25-2017, 01:35 PM   #6
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
Or, just manually use
li style="margin-top:2em"
instead of li for the few instances that require it. It's not 'best practice' but it works, and we all do it :-)
exaltedwombat is offline   Reply With Quote
Old 10-25-2017, 03:20 PM   #7
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by Dave_M View Post
In my ebook nav.xhtml, below is the code I'm dealing with. I would like to have a blank space
I believe the nav.xhtml is an epub3 feature; it's a file that normally should not be displayed at all.

In Sigil, use the tool Table of Contents/Create HTML Table of Contents to make a page you can edit and format without consequence.

Or copy the nav file to a normal xhtml file and format that if you want the list format.
AlanHK is offline   Reply With Quote
Old 10-25-2017, 03:33 PM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
Actually the nav is epub3 but it can serve as both a machine-parsed html toc or a normal html toc depending on if you want it to be. I have seen nicely formatted navs used that are still machine readable and therefore able to replace the toc.ncx and html toc if needed nicely.
KevinH is offline   Reply With Quote
Old 10-25-2017, 07:58 PM   #9
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by exaltedwombat View Post
Or, just manually use
li style="margin-top:2em"
instead of li for the few instances that require it. It's not 'best practice' but it works, and we all do it :-)
INLINE STYLING!! BLASPHEMY!!!


It is better to learn the proper/easy/accepted way of doing it first...then they know when they are breaking the rules and why.
Turtle91 is offline   Reply With Quote
Old 10-26-2017, 10:47 AM   #10
Dave_M
Junior Member
Dave_M began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2017
Device: none
Thanks, everyone. And, Turtle, that fix worked!

I had tried before to do something similar, create a special class, but for some reason it didn't work (probably a naming issue on my part). Again, your code worked. Many thanks! Can't say enough.

Dave
ps. I didn't get spiffy. But in the future, I might just.
Dave_M is offline   Reply With Quote
Old 10-26-2017, 07:03 PM   #11
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 Turtle91 View Post
INLINE STYLING!! BLASPHEMY!!!


It is better to learn the proper/easy/accepted way of doing it first...then they know when they are breaking the rules and why.
Turtle:

I just wanted to say, I've had a really crap week. I was sick (over my damn weekend, of course) and this week has felt a million years long thus far. I really needed that laugh. Not that it's not absolutely true, mind you, but the laugh was perfect. TY for that.

Hitch
Hitch is offline   Reply With Quote
Old 10-26-2017, 07:45 PM   #12
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Sorry for the awful week - but glad I could lighten it somewhat!

Glad to help Dave - Cheers!
Turtle91 is offline   Reply With Quote
Reply

Tags
nav, sigil, spacing


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TOC nav.xhtml issue ebookscovers Conversion 1 05-06-2017 11:12 AM
ToC help needed: nav.xhtml Phssthpok Editor 10 04-14-2017 04:58 AM
I don’t want a page break between different xhtml files Sergi ePub 3 09-16-2010 02:09 PM
PDF 2 LRF, line break issue ^_Pepe_^ Calibre 1 12-03-2009 06:43 AM


All times are GMT -4. The time now is 07:48 AM.


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