Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-21-2023, 08:44 PM   #1
Datasophical
Junior Member
Datasophical began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2023
Device: PDF on Mac Laptop
Extra Space between words (EPUB format)

Hi, I'm creating an ebook and I have been editing it in the EPUB format, but for some reason, I'm getting extra spaces between words. The extra space is not around every word and some words it has a LOT of space, like 5 words take up a whole line.

Here is my HTML/CSS:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
<head>
<meta charset="UTF-8" />
<title>Introduction to Python and Programming Concepts</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>

<div class="section">
<h1 id="heading-5">What is an IDE and Installing Visual Studio Code</h1>
<p class="no-indent">An Integrated Development Environment (IDE) is a software application that provides a comprehensive set of tools for software development. Visual Studio Code (VS Code) is one such IDE that is free, open-source, and supports a variety of programming languages, including Python. You can download VS Code from the official website (<a href="https://code.visualstudio.com">https://code.visualstudio.com/</a>) and follow the instructions to install it on your system.</p>
</div>

Also.... this HTML is wrapped in a div with this:
.chapter-content {
page-break-after: auto;
page-break-before: auto;
text-align: justify;
text-indent: 1.5em
}

CSS Stylesheet:
p.no-indent {
text-indent: 0;
page-break-before: avoid;
break-before: avoid;
}
.section {
break-inside: avoid;
}



Thank you so much! I've been struggling trying everything.
Halin
Datasophical is offline   Reply With Quote
Old 06-21-2023, 09:14 PM   #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,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Nothing stands out as the culprit for extra spaces.
Try removing the text-align: justify;, do you still have extra spaces?
I don't see how you are using the .chapter-content attribute though, as it's not in your snippet. And is that snippet one of the lines with extra spacing?
What reader/app are you viewing it on that shows the extra spaces?

Maybe you can post the book? Scramble it if it is in copyright.
Karellen is offline   Reply With Quote
Old 06-21-2023, 10:35 PM   #3
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,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
The Justify tells the renderer to pad between words to fill the line.
Some can pad between letter, but that seems to be mostly desktop browsers, not e-readers
theducks is offline   Reply With Quote
Old 06-21-2023, 10:39 PM   #4
Datasophical
Junior Member
Datasophical began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2023
Device: PDF on Mac Laptop
Thank you for responding! I found the main issue, apparently, parenthesis around links adds LOTs of extra space:
(<a href="https://code.visualstudio.com">https://code.visualstudio.com/</a>)

I will try taking out text-align: justify;

Also here's that stylesheet:
.chapter-content {
page-break-after: auto;
page-break-before: auto;
text-align: justify;
text-indent: 1.5em
}

Was using Mac "Books" app and kindle apps.


Many thanks!! This helps me a ton!

Quote:
Originally Posted by Karellen View Post
Nothing stands out as the culprit for extra spaces.
Try removing the text-align: justify;, do you still have extra spaces?
I don't see how you are using the .chapter-content attribute though, as it's not in your snippet. And is that snippet one of the lines with extra spacing?
What reader/app are you viewing it on that shows the extra spaces?

Maybe you can post the book? Scramble it if it is in copyright.

Last edited by issybird; 06-22-2023 at 09:40 AM. Reason: Spam edited out.
Datasophical is offline   Reply With Quote
Old 06-22-2023, 01:05 AM   #5
Datasophical
Junior Member
Datasophical began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2023
Device: PDF on Mac Laptop
text-align: justify was the other reason for spaces!!
Thank you!!
Datasophical is offline   Reply With Quote
Old 06-22-2023, 01:25 AM   #6
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,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by Datasophical View Post
Thank you for responding! I found the main issue, apparently, parenthesis around links adds LOTs of extra space:
(<a href="https://code.visualstudio.com">https://code.visualstudio.com/</a>)
Interesting. I've not seen that issue before.

Try using html encoding for the brackets. I can't type them in a post as the forum converts them, so find the codes in this list...
https://www.freeformatter.com/html-entities.html


Quote:
Originally Posted by Datasophical View Post
text-align: justify was the other reason for spaces!!
Yea, that is not surprising. If you have lines with an unusual number of long words, it would be hard to space the line in a pleasing manner.
Karellen is offline   Reply With Quote
Old 06-22-2023, 02:12 AM   #7
BetterRed
null operator (he/him)
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: 21,731
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Karellen View Post
. . . I can't type them in a post as the forum converts them . . .
See noparse ==>> MobileRead Forums - BB Code List

BR
BetterRed is online now   Reply With Quote
Old 06-22-2023, 02:15 AM   #8
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,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
Nice... Thanks
Karellen 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
EPUB to MOBI, kindle shows extra space after quotation mark akita Kindle Formats 29 02-05-2016 02:14 AM
Extra spaces between words Drybonz Conversion 4 12-14-2015 08:15 PM
BUG: Calibre 2.0 E-Book Viewer ePub extra space display problem trying Calibre 3 08-28-2014 07:56 AM
ePub fine in Calibre viewer, but on iPod extra spacing between words Amalthea Calibre 6 03-30-2011 11:58 AM
EPUB to MOBI - Extra Space on Bullet Lists squiggy Conversion 2 01-31-2011 10:50 AM


All times are GMT -4. The time now is 06:07 AM.


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