Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 02:53 AM   #1
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,291
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
Removing Spacing Between Paragraphs: Ignored by Kobo

After some 15+ years of self-taught epub editing, thanks almost entirely to MR, I have hit a brick wall with removal of spacing between paragraphs on one particular epub.

All my usual fixes are not being recognized by my Libra Colour and the double spacing throughout remains. However, in Calibre's editor paragraphs display normally with no spacing.

Here is what I typically use:

body {
font-size: 1em;
margin-top: 0;
margin-right: 5pt;
margin-bottom: 0;
margin-left: 5pt;
orphans: 1;
widows: 1;
}

p {
display: block;
margin-top: 0;
margin-bottom: 0;
text-indent: 1.2em;
}

Here is the CSS from the book which I replaced where applicable:

Body

Code:
body { line-height: 1.4; margin-left: 4%; margin-right: 4%; font-family: "Times New Roman", serif; }
img { max-width: 100%; max-height: 98%; }
small { font-size: 80%; } 
sup { line-height: 80%; font-size: 80%; }
sub { line-height: 80%; font-size: 80%; }
.shyphen { word-break: break-all; }
.hrline { margin-top:10%; margin-bottom:2%; margin-left:0%; text-align:left; width:30%; }
.Smallcaps { font-variant: small-caps; }
.Underline { text-decoration: underline; }
.Overline { text-decoration: overline; }
.Strike { text-decoration: line-through; }
table { border-collapse: collapse; border-spacing: 0 }
Paragraph - there are at least a dozen .pxxx references but this is the one applicable to the double spacing between paragraphs throughout the book:

.P18 {
text-align:justify;
text-indent:7%;
margin-top:0%;
margin-bottom:0%;
font-size:100%;
}

I am missing something somewhere and am not knowledgeable enough to figure out why the Kobo does not display it correctly but the Calibre editor does. I'm chomping at the bit to read my (600+ page) book but absolutely cannot tolerate looking at the spacing between paragraphs!

Where do I go from here to solve this?

Thank you very much!
Skydog is offline   Reply With Quote
Old Yesterday, 04:48 AM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,872
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
It may not be in the CSS. It might be a style="" tag somewhere.
Check the <html ...> tag at the top of the page and also the <body> tag.
Karellen is offline   Reply With Quote
Advert
Old Yesterday, 10:26 AM   #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: 84,063
Karma: 153695583
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The problem is very simple to fix. I fixed the body code and I added the p code. The problem is there is no code telling the paragraphs not to have spaces without the p code.

CSS
{code]body {
widows: 1;
orphans: 1;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
text-align: justify;
}
img {
max-width: 100%;
max-height: 98%;
}
p {
margin-top: 0;
margin-bottom: 0;
widows: 1;
orphans: 1;
text-indent: 1.2em;
}
small {
font-size: 80%;
}
sub {
line-height: 80%;
font-size: 80%;
}
sup {
line-height: 80%;
font-size: 80%;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
.hrline {
margin-top: 10%;
margin-bottom: 2%;
margin-left: 0%;
text-align: left;
width: 30%;
}
.Overline {
text-decoration: overline;
}
.shyphen {
word-break: break-all;
}
.Smallcaps {
font-variant: small-caps;
}
.Strike {
text-decoration: line-through;
}
.Underline {
text-decoration: underline;
}[/code]
JSWolf is online now   Reply With Quote
Old Yesterday, 10:10 PM   #4
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,291
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
Thank you Karellen. I'm trying to figure out what I am looking for.

@Jon-

Thank you for taking the time to offer the fix (which I am about to try). While exploring a single page, as suggested by Karellen, I also noticed that there exists a "hidden" code that is also being ignored as there are small, consecutive numbers that appear above the paragraphs. Clearly not "hidden." This whole book is one big mess (independent publisher) that I do not understand. Again, these problems appear on the Libra, not in Calibre's editor.

I will report back (fingers crossed). Many thanks.

Update: Sorry, Jon, I replaced the body with yours and there was no change to my Libra whatsoever. Spacing remains between paragraphs and there is no indentation. Calibre editor displays fine with indentations and no spacing. : (

Last edited by Skydog; Yesterday at 10:30 PM. Reason: Update
Skydog is offline   Reply With Quote
Old Yesterday, 10:56 PM   #5
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,872
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
A screenshot of the page might help, but scrambling the book and uploading it here would be a whole lot more helpful.
Karellen is offline   Reply With Quote
Advert
Old Yesterday, 11:28 PM   #6
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,291
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
Quote:
Originally Posted by Karellen View Post
A screenshot of the page might help, but scrambling the book and uploading it here would be a whole lot more helpful.
Indeed. I do not have the ability to create a screenshot (just a few patches applied) and have vague memories of what is required to scramble. I've been away from editing for a while and need to revisit the process.

Meanwhile, I think I've found the code that is creating the random numbering from 1-572 throughout the paragraphs. The Libra is ignoring "hidden" and displays the numbers. From a sample page:

Code:
<span aria-labelledby="pg4" epub:type="pagebreak" id="page_4" role="doc-pagebreak"/><span hidden="hidden" id="pg4">4</span>
I wish I knew what is going on with my device. I've not experienced this on any Kobo.

Edit: Located the plugin but the book is a large one - 48MB

Last edited by Skydog; Yesterday at 11:54 PM.
Skydog is offline   Reply With Quote
Old Yesterday, 11:57 PM   #7
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,872
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
If you look in the CSS, you should see a class named .hidden. It should have something like display:none; speak:none; or something similar. Is it there?

Do you want those page numbers there at all? Maybe just create a regex to remove the span completely.

Scramble books... https://www.mobileread.com/forums/sh...d.php?t=267998
Karellen is offline   Reply With Quote
Old Today, 01:08 AM   #8
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,291
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
I've made a couple of attempts to submit my reply with the scrambled book attached. The result is a "504 Gateway Time-out" so I'll keep trying.
Skydog is offline   Reply With Quote
Old Today, 01:10 AM   #9
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,291
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
Quote:
Originally Posted by Karellen View Post
If you look in the CSS, you should see a class named .hidden. It should have something like display:none; speak:none; or something similar. Is it there?

Do you want those page numbers there at all? Maybe just create a regex to remove the span completely.

Scramble books... https://www.mobileread.com/forums/sh...d.php?t=267998
Thank you very much for your assistance. There is no reference in the CSS to any of the above you've listed. I've attached the "virgin" epub from Kobo without any editing. Typically my changes to body and p are minimal as shown below:

Code:
body {
  font-size: 1em;
  margin-top: 0;
  margin-right: 5pt;
  margin-bottom: 0;
  margin-left: 5pt;
  text-align: justify;
  orphans: 1;
  widows: 1;
}
Code:
p {
  font-size: 1em;
  text-indent: 1.2em;
  orphans: 1;
  widows: 1;
  padding: 0;
}
And, yes, I would like to rid the book of the annoying random numbering throughout but have never worked with regex. There are 572 of them!

Thank you very much, Karellen, for your assistance. It is greatly appreciated.
Attached Files
File Type: epub Revolution - Eric Metaxas_scrambled.epub (4.34 MB, 4 views)
Skydog is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
spacing between paragraphs franklekens Kobo Reader 9 04-05-2025 04:01 PM
There's no spacing between paragraphs Tior500 Conversion 1 12-02-2019 10:18 AM
Spacing between paragraphs not converting beccas716 Conversion 4 10-11-2013 10:25 AM
Removing spacing between paragraphs, not between sections jlbfoot Calibre 4 12-03-2010 10:41 PM
removing spacing between paragraphs WITHOUT touching indent? ferossan Calibre 2 12-24-2009 02:12 PM


All times are GMT -4. The time now is 11:33 AM.


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