Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 04-14-2024, 12:12 PM   #1
Waylander
Fanatic
Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.
 
Posts: 594
Karma: 2905052
Join Date: Oct 2013
Device: Kindle Paperwhite 5 SE, Onyx Boox Poke 3
Can't remove blank spaces between paragraphs

I trying to remove all the blank spaces between paragraphs in a book. When I check that option in the layout section, and also in Heuristic processing, it removes some of the blank spaces, but not all of them. I don't think these are proper scene breaks, as the paragraphs before and after are on the same subject in the same flow of writing. Maybe I need to look in the Calibre editor, but I wouldn't know what to look for and get right of.
Waylander is offline   Reply With Quote
Old 04-14-2024, 01:26 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,820
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Look at the code with the editor.
Paragraph spacing (visually) can be done 2 ways:

<p>&nbsp;</p>

or a non-zero margin-top or margin-bottom style
theducks is online now   Reply With Quote
Advert
Old 04-14-2024, 01:54 PM   #3
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: 74,049
Karma: 129333562
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 theducks View Post
Look at the code with the editor.
Paragraph spacing (visually) can be done 2 ways:

<p>&nbsp;</p>

or a non-zero margin-top or margin-bottom style
In some rare occasions, I've seen <br/> used to make space.
JSWolf is offline   Reply With Quote
Old 04-14-2024, 02:08 PM   #4
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,820
Karma: 54830978
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 JSWolf View Post
In some rare occasions, I've seen <br/> used to make space.
Yep!
Simply looking at the code is the easiest way to find out and plan an attack.
First is to replace 2+ in a row with a <p class="scenebreak"> </p>
the it is safe to remove the rest,

.scenebreak is your style sheet entry to make one
theducks is online now   Reply With Quote
Old 04-15-2024, 09:26 PM   #5
Jaws
JCL Punch-Card Collector
Jaws began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Jun 2014
Location: Antarctica
Device: Aggressively Device Independent
I think some of the responses have misunderstood the original query, which was about removing the extra spaces.

The most-probable cause is in the stylesheets... but it could be in any of several places in the stylesheets, because the style could be called in several different places. It might be in the style for <body>, for the <div> element including the text, or individually in <p> (and you'll want to look at both the first paragraph in an html file and later ones — these often have different styles assigned).

What you're looking for is a combination of the misbegotten "display: block" element in the style, and the failure to explicitly specify the top and bottom margins as 0, which I've found most convenient to put at the end of the style:

{

margin-top: 0;
margin-bottom: 0;
}

(Note also the semicolon after the last element — although not required by CSS, just be in the habit. Think of it like having a period at the end of the sentence before a new paragraph.)

Two notes:

Although CSS allows use of the margin: 0 style to supposedly set all margins for that style to 0, this is not supported in many e-pub readers (despite epubcheck and other checkers allowing it to pass as "legal") and creates unpredictable results when converting to other formats. Not Recommended.

display: block should be used only when that paragraph is not reflowable (a stanza of poetry in which the linebreaks are &lt;/br&gt; is one example, so are some multililne descriptive headings); this should be pretty rare. It's also the default for unknown reasons in epubs generated by software from the baked-mud company.
Jaws is offline   Reply With Quote
Advert
Old 04-16-2024, 05:46 AM   #6
Waylander
Fanatic
Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.
 
Posts: 594
Karma: 2905052
Join Date: Oct 2013
Device: Kindle Paperwhite 5 SE, Onyx Boox Poke 3
Ok, here's what I've found.

This comes up where there's a space between paragraphs that shouldn't be there: <br class="calibre9"/><br class="calibre9"/>.

And here's what's in the CSS stylesheeet:
Code:
}
.calibre11 {
  font-style: italic;
}
.calibre12 {
  font-weight: bold;
  hyphens: auto;
  line-height: 200%;
  overflow-wrap: break-word;
  word-break: break-word;
  word-wrap: break-word;
}
.calibre13 {
  font-style: italic;
  line-height: 1.2;
}
.calibre14 {
  height: auto;
  text-align: center;
  width: auto;
}
.calibre15 {
  font-size: 0.75em;
  font-weight: bold;
}
.calibre16 {
  display: table-column;
  border-right: black solid 1px;
}
.calibre17 {
  display: table-cell;
  text-align: inherit;
  vertical-align: inherit;
  white-space: normal;
  padding: 0;
}
.calibre18 {
  color: gray;
  display: block;
  height: 0;
  margin: 0;
  border-top: black solid 1px;
  border-right: currentColor none medium;
  border-bottom: currentColor none medium;
  border-left: currentColor none medium;
}
.caption {
  border-bottom: 0;
  border-top: 0;
  display: block;
  margin-bottom: 0;
  margin-top: 0;
  padding-bottom: 0;
  padding-top: 0;
  text-align: justify;
  text-indent: 1.5em;
}
.caption1 {
  border-collapse: collapse;
  border-spacing: 2px;
  display: table;
  height: auto;
  margin-bottom: 0;
  margin-top: 0;
  text-align: center;
  text-indent: 0;
  width: 100%;
  padding: 0;
}
.caption2 {
  display: table-row;
  text-align: center;
  vertical-align: baseline;
  width: 100%;
}
.center {
  border-bottom: 0;
  border-top: 0;
  display: block;
  padding-bottom: 0;
  padding-top: 0;
  text-align: center;
  margin: 0 1em;
}
.centered {
  border-bottom: 0;
  border-top: 0;
  display: block;
  line-height: 1.2;
  margin-bottom: 0;
  margin-top: 0;
  padding-bottom: 0;
  padding-top: 0;
  text-align: center;
}
.chaptertoc {
  font-weight: bold;
  line-height: 200%;
}
.content {
  display: table-cell;
  text-align: center;
  vertical-align: inherit;
  padding: 1px;
}
.ec-lmr {
  font-size: 0.75em;
}
.ec-lmr-12x-x {
  font-size: 1.41667em;
  line-height: 1.2;
}
.ec-lmssbx-10x-x {
  font-size: 1.125em;
  font-weight: bold;
  line-height: 1.2;
}
.figure {
  border-bottom: 0;
  border-top: 0;
  display: block;
  padding-bottom: 0;
  padding-top: 0;
  text-indent: 1.5em;
  margin: 0 auto;
}
.fontsmall {
  border-bottom: 0;
  border-top: 0;
  display: block;
  margin-bottom: 0;
  margin-top: 0;
  padding-bottom: 0;
  padding-top: 0;
  text-indent: 1.5em;
}
.footnotes {
  border-bottom: black solid 1px;
  border-top: black solid 1px;
  display: block;
  font-size: 0.75em;
  font-style: normal;
  margin-bottom: 0;
  margin-right: 15%;
  margin-top: 0;
  padding-bottom: 0;
  padding-top: 0;
  text-indent: 1.5em;
}
.hline {
  display: table-row;
  vertical-align: middle;
  border-top: black solid 1px;
}
.id {
  display: table-cell;
  font-weight: bold;
  text-align: center;
  vertical-align: inherit;
  white-space: nowrap;
  padding: 1px;
}
.likesectionhead {
  display: block;
  font-size: 1.125em;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
  margin: 1em 0;
}
.likesubsectionhead {
  display: block;
  font-weight: bold;
  margin: 1.33em 0;
}
.minipage {
  border-bottom: 0;
  border-top: 0;
  display: block;
  margin-bottom: 0;
  margin-top: 0;
  padding-bottom: 0;
  padding-top: 0;
  text-indent: 1.5em;
  width: 100%;
}
.newline {
  display: block;
  line-height: 1.2;
}
.noindent {
  border-bottom: 0;
  border-top: 0;
  display: block;
  padding-bottom: 0;
  padding-top: 0;
  text-indent: 1.5em;
  margin: 0;
}
.pagebreak {
  border-bottom: 0;
  border-top: 0;
  display: block;
  padding-bottom: 0;
  padding-top: 0;
  text-indent: 1.5em;
  margin: 0;
}
.quotation {
  display: block;
  margin: 1em;
}
.small-caps {
  font-variant: small-caps;
}
.sout {
  text-decoration: line-through;
}
.tabular {
  border-collapse: collapse;
  border-spacing: 0;
  display: table;
  text-indent: 0;
  margin: 0 auto;
}
.td {
  display: table-cell;
  text-align: center;
  vertical-align: inherit;
  white-space: nowrap;
  padding: 1px 5pt;
}
.td1 {
  display: table-cell;
  text-align: justify;
  vertical-align: inherit;
  white-space: nowrap;
  padding: 1px 5pt;
}
.textsuperscript {
  font-size: 0.75em;
  line-height: normal;
  vertical-align: super;
}
.textsuperscript1 {
  font-size: 1em;
  line-height: 1.2;
  vertical-align: super;
}
.titlehead {
  display: block;
  font-size: 1.41667em;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
  margin: 0.83em 0;
}
.titlepage {
  border-bottom: 0;
  border-top: 0;
  display: block;
  margin-bottom: 0;
  margin-top: 0;
  padding-bottom: 0;
  padding-top: 0;
  text-align: center;
}

Last edited by issybird; 04-16-2024 at 07:06 AM. Reason: Added code tags.
Waylander is offline   Reply With Quote
Old 04-16-2024, 10:42 AM   #7
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,820
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
There is no Calibre9 style, so you get the default for BR, making the lousy coding even worse.
theducks is online now   Reply With Quote
Old 04-16-2024, 11:15 AM   #8
Waylander
Fanatic
Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.Waylander ought to be getting tired of karma fortunes by now.
 
Posts: 594
Karma: 2905052
Join Date: Oct 2013
Device: Kindle Paperwhite 5 SE, Onyx Boox Poke 3
I think that might be because I've already tried converting the book a few times trying different ways of removing the remaining blank lines between paragraphs. What's confusing is why most have been removed but there are still quite a few randomly left, where they shouldn't be.
Waylander is offline   Reply With Quote
Old 04-16-2024, 11:38 AM   #9
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,820
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
When conversions go wrong, always start with the original source otherwise you are piling garbage on garbage and your fix is being applied to the previous miss.

The order of doing 'fixes' is important. Only looking at the code gives a clue.
If <br class="calibre9" /> is used in multiples and singly, you need to replace the multiples (<br class="calibre9" /><br class="calibre9" /> scenebreaks) first
And before you do the first S&R, Beautify, so the code is even
theducks is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove blank lines between paragraphs with the same style Trottel Editor 1 12-21-2023 11:13 AM
How to remove blank spaces in a word with RegEx? RbnJrg Sigil 12 12-19-2018 06:58 AM
How to remove blank line between paragraphs gogreen Sigil 31 09-08-2017 11:07 AM
CSS to indent paragraphs and remove spaces Alda Sigil 7 06-20-2014 05:36 AM
How to remove blank spaces? Mamaijee Conversion 2 04-09-2013 11:20 AM


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


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