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 10-23-2014, 08:54 PM   #1
rosshalde
Zealot
rosshalde began at the beginning.
 
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
Inserting Spaces according to sigil messes with font

Ok, so I was having trouble with blank spaces and then I found some code to try and it worked.
I inserted
<div class="body" style="white-space:normal">
rather than
<div class="body" style="white-spacere-wrap">
and it did get rid of all the "white space"
Now I need to add back a few to set off prose text from a brief little song and then back to prose.
Essentially, I want a blank line above and below the song that is in the midst of prose to help offset it and make it look nice.

Sigil suggests

Don’t. Its much better to use stylesheets to define the amount of space above or below your special sections using a style definition. For instance to leave 1.5 lines of space above a paragraph you can use this style class:

p.blankabove { margin-top: 1.5em; }
and in your text use the class with your paragraph:

<p class="blankabove">My paragraph</p>
which I did and it works, but now the text of that paragraph is much larger than the text of all other paragraphs.....why is that?

I can always add a space in the book view, but it adds
<br />
and I can see from my reading this forum that might not be a good idea.

any pointers?
Thanks in advance.
rosshalde is offline   Reply With Quote
Old 10-23-2014, 09:46 PM   #2
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,659
Karma: 54369090
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 rosshalde View Post
Ok, so I was having trouble with blank spaces and then I found some code to try and it worked.
I inserted
<div class="body" style="white-space:normal">
rather than
<div class="body" style="white-spacere-wrap">
and it did get rid of all the "white space"
Now I need to add back a few to set off prose text from a brief little song and then back to prose.
Essentially, I want a blank line above and below the song that is in the midst of prose to help offset it and make it look nice.

Sigil suggests

Don’t. Its much better to use stylesheets to define the amount of space above or below your special sections using a style definition. For instance to leave 1.5 lines of space above a paragraph you can use this style class:

p.blankabove { margin-top: 1.5em; }
and in your text use the class with your paragraph:

<p class="blankabove">My paragraph</p>
which I did and it works, but now the text of that paragraph is much larger than the text of all other paragraphs.....why is that?

I can always add a space in the book view, but it adds
<br />
and I can see from my reading this forum that might not be a good idea.

any pointers?
Thanks in advance.
Look at the code.
Sigil has some bad habits. If you try and join 2 paragraphs from Book View (It adds a Style= that results in bigger text ). IMHO do the join in code view by removing from the </p to the > before the first character to be seen (add a space when needed)
theducks is offline   Reply With Quote
Advert
Old 10-24-2014, 12:03 AM   #3
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,415
Karma: 25894272
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@rosshalde - I make no claims as to having any expertise on this stuff.

But, if I had your 'problems' I would open the epub in the calibre ebook editor. It has a Live CSS feature that will display all the styling applied to a paragraph, division etc. Styling of a given chunk of HTML (such as paragraph) will typically be inherited (cascade) from multiple chunks within the style sheet(s).

I don't know if Sigil has a similar feature, I've not stumbled across it.

BR
BetterRed is online now   Reply With Quote
Old 10-24-2014, 07:35 AM   #4
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
You could place the song in a blockquote, that is what I would do.
Toxaris is offline   Reply With Quote
Old 10-24-2014, 12:32 PM   #5
rosshalde
Zealot
rosshalde began at the beginning.
 
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
how do i do the block quote thing?
rosshalde is offline   Reply With Quote
Advert
Old 10-25-2014, 03:53 PM   #6
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
Simple. Just put the paragraphs you want in blockquote tags. So, something like this:
Code:
<blockquote>
<p>First line of the song</p>
...
<p>Last line of the song</p>
</blockquote>
Toxaris is offline   Reply With Quote
Old 10-26-2014, 10:16 PM   #7
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 688
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by Toxaris View Post
Simple. Just put the paragraphs you want in blockquote tags. So, something like this:
Code:
<blockquote>
<p>First line of the song</p>
...
<p>Last line of the song</p>
</blockquote>
and then you define blockquote in your .css file however you want the overall song to look. If I were you, I'd have not only a top and bottom margin, but also a left and right margin to further set off the block. So the entry in the .css file might look like this:
Code:
blockquote {
   /* adjust the values to your taste.  Stay with units of em or % for best results */
   margin-top=0.5em;
   margin-bottom=0.5em;
   margin-left=3.0em;
   margin-right=3.0em;
   /* put other formatting stuff here +/
}
Play around with it, and see what it does. That's how most of us learned!

Hth
Albert
st_albert is offline   Reply With Quote
Old 10-27-2014, 10:02 AM   #8
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
@st_albert -- small typo but so we don't confuse anyone --- the = in the css should be a : of course (or least I need to do that)

I would define a blockquote class for songs, so that I could apply it only where specifically needed

Code:
blockquote.song {
   margin-top: 1.5em;
   margin-bottom: 1.5em;
   margin-left: 4.0em;
   margin-right: 4.0em;
   font-style: italic;
}

blockquote {
   margin-top: 0.5em;
   margin-bottom: 0.5em;
   margin-left: 3.0em;
   margin-right: 3.0em;
}

Personal style / opinion
Attached Files
File Type: epub song.epub (2.5 KB, 89 views)

Last edited by phossler; 10-27-2014 at 10:05 AM.
phossler is offline   Reply With Quote
Old 10-27-2014, 02:37 PM   #9
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 688
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by phossler View Post
@st_albert -- small typo but so we don't confuse anyone --- the = in the css should be a : of course (or least I need to do that)
Thanks, Paul! Good catch.

Albert
st_albert 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
Stop Sigil from inserting unwanted lines between paragraphs Benasam Sigil 16 05-28-2014 03:16 PM
Sigil adds spaces between HTML tags, creating strange characters chezjim Sigil 10 06-10-2011 04:00 AM
Extra spaces in Sigil noteon Sigil 2 04-08-2011 02:42 PM
Can I stop Sigil from inserting sgc formatting commands? ramjet1953 Sigil 4 11-22-2010 11:59 AM
Sigil Inserting hard line wraps at ~100 characters ldolse Sigil 6 08-07-2009 11:00 AM


All times are GMT -4. The time now is 01:31 AM.


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