MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   blank line (https://www.mobileread.com/forums/showthread.php?t=172829)

sly_skittle 03-20-2012 10:08 PM

blank line
 
I was just wondering if anyone knew how to insert blank lines into a document (e.g. a blank line between the chapter title and the start of the text).
They stay up in sigil but when I look at it in adobe reader they're gone. They also disappear in calibre too.
Any help would be great!

Griffel 03-20-2012 10:12 PM

Try <b />.

JSWolf 03-20-2012 10:31 PM

In the XML...

Code:

<h2 class="chapter">Chapter One</h2>
In the CSS...

Code:

.chapter {
margin-top: 25px;
margin-bottom: 25px;
text-align: center
{

There you go, space at the top of the chapter heading and space at the bottom with the chapter heading centered.

DiapDealer 03-20-2012 10:51 PM

I like to use a CSS method similar to what JSWolf suggested. It seems a lot cleaner to me than having empty p, div tags cluttering things up or lot's of extra br's laying around. It would probably be part of my default "first paragraph of a chapter" class.

Code:

.first-para {
  margin-top: 25px;
  text-indent: 0;
}


theducks 03-20-2012 10:57 PM

Quote:

Originally Posted by Griffel (Post 2011836)
Try <b />.

That would be a <br />

BR may not exist naked but must exist within a P, DIV or H# tag pair.

Also many rendering programs will ignore when repeated: <br /> <br />

There must be a printing character between.
Wolf man's margin solution is more elegant in most cases.

<h2 class="chapter">Chapter 100&nbsp;<br />A Century of Great Examples</h2>

for a 2 line chapter title that will appear as a single TOC entry in a Sigil generated TOC

PaulPosition 03-21-2012 11:11 AM

Use CSS, as suggested above the above.

If you go about adding an empty line here, you'll have to add an empty line at every chapter. And when you decide you'd rather have two empty lines, you'll have to add another empty line at each and every chapter. Etc.

In "theatre" literacy, it would be the difference between :

"I am Michael, and you-the-public can hear I'm talking softly now that I turn around to face my beloved and tell here ĞI love youğ"

And

MICHAEL (Talking softly)
- I love you.

dwig 03-21-2012 11:56 AM

Quote:

Originally Posted by JSWolf (Post 2011858)
In the XML...

Code:

<h2 class="chapter">Chapter One</h2>
In the CSS...

Code:

.chapter {
margin-top: 25px;
margin-bottom: 25px;
text-align: center
{

There you go, space at the top of the chapter heading and space at the bottom with the chapter heading centered.

If you don't use H2 for anything else in the document you could simplify the editing by not editing every chapter heading (omit the added class="chapter") and change the CSS style to:

Code:

h2 {
margin-top: 25px;
margin-bottom: 25px;
text-align: center
{

Personally, I prefer to spec the margin spacing relative to the current base font size by using em as the units.

Also, I prefer indented paragraphs in the body of the text with the first paragraph not indented. Since I have to style the first paragraph anyway, to change the indent, I use DiapDealer's method of adding space before the first paragraph instead of after the H2 heading, again prefering em units.

JSWolf 03-21-2012 05:15 PM

I prefer fixed spacing in those sort of situations. A section break space gets 30px from me. That way they don't change based on the font size. They stay the same. And they look better at the fixed sizes I've chosen.

PaulPosition 03-21-2012 05:27 PM

30px will look much different on an eInk device (~167ppi) than it will on, say, the new iPad.

JSWolf 03-21-2012 05:45 PM

Quote:

Originally Posted by PaulPosition (Post 2012931)
30px will look much different on an eInk device (~167ppi) than it will on, say, the new iPad.

30px looks fine on both my 650 and the iPad.

sly_skittle 03-21-2012 08:50 PM

Thanks for all the help.

I'm completely new to CSS so I couldn't really understand how to change the styles so I just went with manually adding the gaps after the chapter headings:
<p>&nbsp;</p>.
I tried using the <br /> but when I opened the file in calibre it didn't convert.

Does anyone know any good sites/guides that could help me get started with CSS coding? It's be great to understand it a little bit.

JSWolf 03-21-2012 09:13 PM

Give http://www.w3.org/Style/Examples/011/firstcss.en.html a try.

sly_skittle 03-21-2012 09:38 PM

Quote:

Originally Posted by JSWolf (Post 2013151)

thanks very much!


All times are GMT -4. The time now is 09:17 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.