Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-19-2022, 07:49 PM   #1
rcentros
eReader Wrangler
rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.
 
rcentros's Avatar
 
Posts: 7,873
Karma: 51519919
Join Date: Mar 2013
Location: Boise, ID
Device: PB HD3, GL3, Tolino Vision 4, Voyage, Clara HD
Change height of blank lines (only)?

I have a book (old, scanned from Archive.org) that I've OCR'd and it looks pretty decent, except for the centered section titles. The titles, themselves, look fine but to get them I have to put a blank line above and below each one and the lines are too high — noticeable since there are so many of them. Is there way to shrink blank lines (only) to about half their height?

I've only used Sigil this one time and just dropped in an HTML file. I was pretty amazed that I got this far. I'm willing to learn but I can't find anything in the style css (classes) about changing the height of blank lines and want to make sure it's even possible to differentiate. Except for the blank line heights I'm happy with the results, though I still have to put in some links and a simple Table of Contents (and build the cover). I figure that should be relatively easy.

The eBook is usable as is, but I want it "prettier."
rcentros is offline   Reply With Quote
Old 03-19-2022, 08:18 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: 31,022
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Just use a larger line-height for that 'paragraph' class

1.2 is standard, so make it 1.5
Or you could use
Code:
margin: 1.2em 0;
theducks is offline   Reply With Quote
Advert
Old 03-19-2022, 10:22 PM   #3
rcentros
eReader Wrangler
rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.
 
rcentros's Avatar
 
Posts: 7,873
Karma: 51519919
Join Date: Mar 2013
Location: Boise, ID
Device: PB HD3, GL3, Tolino Vision 4, Voyage, Clara HD
Quote:
Originally Posted by theducks View Post
Just use a larger line-height for that 'paragraph' class

1.2 is standard, so make it 1.5
Or you could use
Code:
margin: 1.2em 0;
Okay, thanks. It doesn't seem like the headings are all the same class, so I'll just do this (or something close) "by hand" in the word processor itself. It's almost good enough the way it is, but not quite what I want. I don't mind the extra work.

Again, thanks for looking into this.
rcentros is offline   Reply With Quote
Old 03-19-2022, 11:06 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,346
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
theducks' suggestion will certainly work, and answers your question. However, if you are going to be fixing the headers anyway, might I recommend a different solution than using the blank lines and trying to set margins for a blank line??

Try using css to give your headings the spacing you desire instead of the blank lines around them. You will have exact control of the spacing rather than trying to guess with extra blank lines...they may not end up looking the way you expect on some readers/devices.

Code:
h3 {margin:1.2em auto; text-indent:0; text-align:center; font-family:serif}

<h3>Chapter 1</h3>

<p class="first">This is the first paragraph.</p>
<p>This is the second paragraph.</p>
<p>This is the third paragraph.</p>
etc.
You can certainly do that manually... although it might take more time than using a few simple regex find/replace.

Cheers!
Turtle91 is offline   Reply With Quote
Old 03-20-2022, 01:13 AM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 45,945
Karma: 168961900
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Turtle91 View Post
theducks' suggestion will certainly work, and answers your question. However, if you are going to be fixing the headers anyway, might I recommend a different solution than using the blank lines and trying to set margins for a blank line??

Try using css to give your headings the spacing you desire instead of the blank lines around them. You will have exact control of the spacing rather than trying to guess with extra blank lines...they may not end up looking the way you expect on some readers/devices.

Code:
h3 {margin:1.2em auto; text-indent:0; text-align:center; font-family:serif}

<h3>Chapter 1</h3>

<p class="first">This is the first paragraph.</p>
<p>This is the second paragraph.</p>
<p>This is the third paragraph.</p>
etc.
You can certainly do that manually... although it might take more time than using a few simple regex find/replace.
One minor nit is that quite a few ereaders and applications do not properly support margin: auto so having it there can cause some "interesting" effects.
DNSB is offline   Reply With Quote
Advert
Old 03-20-2022, 08:55 AM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,549
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
The treatment of "blank lines" is pretty varied among rendering engines as well. Are we talking about empty paragraph tags? Or paragraph tags that contain a line-break tag? Or that contain a non-breaking space entity/character?

Adding blank lines via html is generally considered poor form. It's much better to add margin to elements adjacent to the the places you want more space via css.
DiapDealer is offline   Reply With Quote
Old 03-20-2022, 12:12 PM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,676
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Code:
.noindent {
text-indent: 0;
}
.sb {
  margiun-top: 1em;
  margin-bottom: 1em;
  text-align: center;
  text-indent: 0;
}
Code:
<p class="sb"><img alt="" src="../images/spacebreakimage.jpg"/></p>
<p class="noindent">
There is the code for a space break that uses an image between the sections.
JSWolf is offline   Reply With Quote
Old 03-21-2022, 12:01 AM   #8
rcentros
eReader Wrangler
rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.
 
rcentros's Avatar
 
Posts: 7,873
Karma: 51519919
Join Date: Mar 2013
Location: Boise, ID
Device: PB HD3, GL3, Tolino Vision 4, Voyage, Clara HD
Quote:
Originally Posted by Turtle91 View Post
theducks' suggestion will certainly work, and answers your question. However, if you are going to be fixing the headers anyway, might I recommend a different solution than using the blank lines and trying to set margins for a blank line??

Try using css to give your headings the spacing you desire instead of the blank lines around them. You will have exact control of the spacing rather than trying to guess with extra blank lines...they may not end up looking the way you expect on some readers/devices.

Code:
h3 {margin:1.2em auto; text-indent:0; text-align:center; font-family:serif}

<h3>Chapter 1</h3>


<p class="first">This is the first paragraph.</p>
<p>This is the second paragraph.</p>
<p>This is the third paragraph.</p>
etc.
You can certainly do that manually... although it might take more time than using a few simple regex find/replace.

Cheers!
Thanks. But I'm quite sure how I could apply this to all blank lines. Currently I'm only using one blank line between groups of paragraphs with no blank lines. But I'm having trouble finding any specific class name for those blank lines.

I've tried changing the line height of the headers (by hand) in my word processor (and then deleting the blank lines) and that seems to work but, when I see the results, I think maybe I don't need to do this at all, as it looks fine "as is" in most eReaders — except the Kobos aren't allowing me to adjust line height (so this is another issue). (Why do Kobos have to be so darn picky? )

At any rate, thanks. I probably missed the gist of what your were saying and I apologize for that.

Last edited by rcentros; 03-21-2022 at 12:09 AM.
rcentros is offline   Reply With Quote
Old 03-21-2022, 12:08 AM   #9
rcentros
eReader Wrangler
rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.
 
rcentros's Avatar
 
Posts: 7,873
Karma: 51519919
Join Date: Mar 2013
Location: Boise, ID
Device: PB HD3, GL3, Tolino Vision 4, Voyage, Clara HD
Quote:
Originally Posted by DiapDealer View Post
The treatment of "blank lines" is pretty varied among rendering engines as well. Are we talking about empty paragraph tags? Or paragraph tags that contain a line-break tag? Or that contain a non-breaking space entity/character?

Adding blank lines via html is generally considered poor form. It's much better to add margin to elements adjacent to the the places you want more space via css.
Don't know if I'm able to parse your first questions. The blank lines are just lines I create by hitting ENTER in the word processor. If it was DOS that would be a hard CR, not sure what it's called in Linux. I know I can find these by searching for a "\n" in my editor.

That said, I've already realized that it makes more sense to concentrate on the headers themselves. I think it would probably be better if I did this in Sigil but I know how to do it in TextMaker, so at this point that's where I will make the changes (if I do decide to make the changes. It seems to be more of an issue with Kobos than anything else. It doesn't look bad "as is" on other readers where I can adjust the line height.

Thanks for the response. Sorry for my ignorance.
rcentros is offline   Reply With Quote
Old 03-21-2022, 12:14 AM   #10
rcentros
eReader Wrangler
rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.
 
rcentros's Avatar
 
Posts: 7,873
Karma: 51519919
Join Date: Mar 2013
Location: Boise, ID
Device: PB HD3, GL3, Tolino Vision 4, Voyage, Clara HD
Quote:
Originally Posted by JSWolf View Post
Code:
.noindent {
text-indent: 0;
}
.sb {
  margiun-top: 1em;
  margin-bottom: 1em;
  text-align: center;
  text-indent: 0;
}
Code:
<p class="sb"><img alt="" src="../images/spacebreakimage.jpg"/></p>
<p class="noindent">
There is the code for a space break that uses an image between the sections.
Would this be an actual image and wouldn't that increase the size of the book by quite a lot? Is this particular book there would probably be a over a thousand of these. Would the this code be applied at the top of the .css style sheet and just automatically work?

Thanks. Looks interesting, but not sure how I would apply it.
rcentros is offline   Reply With Quote
Old 03-21-2022, 12:49 AM   #11
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 45,945
Karma: 168961900
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by rcentros View Post
Would this be an actual image and wouldn't that increase the size of the book by quite a lot? Is this particular book there would probably be a over a thousand of these. Would the this code be applied at the top of the .css style sheet and just automatically work?

Thanks. Looks interesting, but not sure how I would apply it.
You would add one image and recycle it so no real size change. Of course, I've seen several ebooks where the author/publisher/whatever nitwit created the ebook used a separate but identical image for every scene break and chapter header image. In the last one, there were 109 images which reduced to 2 images with a bit of regex and deleting unused images.
DNSB is offline   Reply With Quote
Old 03-21-2022, 03:06 PM   #12
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,676
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by rcentros View Post
Would this be an actual image and wouldn't that increase the size of the book by quite a lot? Is this particular book there would probably be a over a thousand of these. Would the this code be applied at the top of the .css style sheet and just automatically work?

Thanks. Looks interesting, but not sure how I would apply it.
What that code does is give you a 2em blank space followed by a non-indented paragraph. What I do is the following.

Code:
<hr/>
<p class="TX1">“Look who I found,” said Julia cheerfully as they stepped into the Great Room.</p>
[code]hr {
margin-top: 1em;
margin-right: 40%;
margin-bottom: 0.9em;
margin-left: 40%;
border-top: 2px solid;
}
.TX1 {
margin-top: 0;
margin-bottom: 0;
text-align: justify;
text-indent: 0;
}[/quote]

What the code does is make a 1em blank space followed by a 20% long 2px wide line and then a .9em blank space. The next paragraph is not indented. It works well to denote section breaks.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
blank lines between paragraphs franklekens Kobo Reader 71 01-26-2015 12:52 PM
Blank Lines In Code SeaCanary Sigil 3 01-22-2014 08:51 PM
Blank Lines jreidu Workshop 2 07-20-2011 05:11 AM
Blank lines between paragraphs? ascherjim OpenInkpot 30 12-03-2009 12:19 AM
Blank Lines vivaldirules Upload Help 55 03-02-2009 03:17 PM


All times are GMT -4. The time now is 04:42 PM.


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