Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 09-24-2023, 07:25 AM   #1
helens
Member
helens began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Apr 2023
Location: Scotland
Device: Kindle
Why are my tab spaces not uniform?

Hi, I have a question about the tab spaces at the beginning of paragraphs.

In the Word doc, I set the paragraph tabs to 0.50 cm and in Sigil I'm using three spaces.

However, the spaces are not uniform throughout the whole document. Sometimes the space before the first word of the paragraph is larger, although the code is exactly the same. See screenshot for what I mean.

Can anyone help?

Thanks,
Helen
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2023-09-24_12-11-07.png
Views:	115
Size:	469.6 KB
ID:	203936  
helens is offline   Reply With Quote
Old 09-24-2023, 07:30 AM   #2
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,013
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You don't want tabs as indents. You want to use a text-indent in CSS. Forget the class para1. You do not need it. Use just <p> for the standard indented paragraphs. Here is some CSS that will do the job and do it well. Also get rid of the spans with span3 and get rid of the tabs.

CSS
Code:
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 0;
}

Last edited by JSWolf; 09-24-2023 at 01:58 PM.
JSWolf is online now   Reply With Quote
Old 09-24-2023, 07:45 AM   #3
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
To answer the question in the title: Because with justified lines the spaces can stretch or shrink to adjust the line length, like any other space between words.

The solution is: either don't justify or (recommended) use text-indent, which is what you actually want.
Jellby is offline   Reply With Quote
Old 09-24-2023, 11:45 AM   #4
helens
Member
helens began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Apr 2023
Location: Scotland
Device: Kindle
Quote:
Originally Posted by Jellby View Post
To answer the question in the title: Because with justified lines the spaces can stretch or shrink to adjust the line length, like any other space between words.
Thanks - that explains it perfectly. I hadn't thought of that. Doh!
helens is offline   Reply With Quote
Old 09-24-2023, 11:48 AM   #5
helens
Member
helens began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Apr 2023
Location: Scotland
Device: Kindle
Quote:
Originally Posted by JSWolf View Post
You don't want tabs as indents. You want to use a text-indent in CSS. Forget the class para1. You do not need it. Use just <p> for the standard indented paragraphs. Here is some CSS that will do the job and do it well. Also get rid of the spans with span3 and get rid of the tabs.

CSS
Code:
p {
margin-top: 0;
margin-bottom: 0;
text-indent: 0;
}
Thanks, that helps a lot. Sorry to ask again (I'm not that great with code), but I want the first paragraph of each chapter to NOT be indented. How do I get around that? Do I need to use a <div> for those paragraphs?
helens is offline   Reply With Quote
Old 09-24-2023, 11:56 AM   #6
helens
Member
helens began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Apr 2023
Location: Scotland
Device: Kindle
JSWolf, please ignore my last comment. I've worked it out - I've used <p class="firstpara">

Thanks!
helens is offline   Reply With Quote
Old 09-24-2023, 01:58 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: 74,013
Karma: 128903378
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 helens View Post
JSWolf, please ignore my last comment. I've worked it out - I've used <p class="firstpara">

Thanks!
Code:
.firstpara {
  text-indent: 0;
}
JSWolf is online now   Reply With Quote
Old 09-25-2023, 05:58 AM   #8
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,161
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
If you use a paragraph style in Word or LO Writer you set the indents, margins, padding, font, size and the docx to epub exactly puts that in the CSS.

Never ever in a wordprocessor use:
Tabs
More than one consecutive space
A space at the start or end of a paragraph
Blank lines

Those are all for typewriters.

Only use paragraph styles.
Quoth is offline   Reply With Quote
Old 10-05-2023, 09:20 AM   #9
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
Posts: 2,318
Karma: 9999999
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
What Quoth said.

Also, this span3 stuff is overblown.
You might just have CSS style for <p> or else use multiple classes:
Code:
<p class="firstpara span3">I'm a normal line.</p>
Renate is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex expression to replace certain spaces with nonbreaking spaces Dashcroft Sigil 3 12-10-2022 08:01 PM
Uniform background-not tomdy2k Kobo Reader 2 07-05-2019 08:46 PM
PW4 screen quality not uniform? kript96 Amazon Kindle 4 12-12-2018 08:05 AM


All times are GMT -4. The time now is 05:48 AM.


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