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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-31-2013, 04:01 AM   #1
pargoo
Member
pargoo began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Oct 2013
Location: Melbourne, Australia
Device: kindle paperwhite v2
How do I set paragraph indent?

After proof-reading/editing my epub and generating a TOC I decided everything was right and set the justification from 'left' to 'centered' after seeing how books looked on the new Kindle I went out and bought for purposes of comparison. Everything's fine, except that the paragraph indentations are now all ragged. I have investigated the issue and know that I need to add 'text-indent: 3%;' somewhere, presumably in my stylesheet, so that the setting adjusts for zooming.
All the online posts I've read assumed knowledge I lack, so they weren't helpful at all. If this entry indeed belongs in my stylesheet, where exactly does it go, and how? As a longtime linux user, the procedure for solving issues like this was always to post the file in question so there was no doubt about where the new entry belonged. Before I go down that path, this is the stylesheet generated by sigil, not one of my own creation...
Thanks.
pargoo is offline   Reply With Quote
Old 10-31-2013, 04:33 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
If your book consists of a single .html page, simply insert the following line immediately before </style></head> in the .html file:

Code:
p {text-indent: 3%;}
If Sigil has created a linked stylesheet, add the line there.

BTW, the Kindle Publishing Guidelines suggest the following:
Quote:
“Normal” text must not have a forced alignment (left aligned or justified).
Doitsu is offline   Reply With Quote
Advert
Old 10-31-2013, 06:26 AM   #3
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
if ALL text is centered, like OP says, then surely the left edge will always be ragged; I don't see how an extra indent will fix that ???
cybmole is offline   Reply With Quote
Old 10-31-2013, 09:16 AM   #4
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Centering means the center of each line will be in the center of the page. So a shorter line will start closer to the center and a longer line will start farther.
This is a roughly centered line.
You don't want to do this to regular paragraphs since, it means the left edge will wander all over creation.

Centering is used only for titles or captions, usually.

The suggested text indent will have the effect of starting each paragraph like this:
This is a paragraph test test
This is the next line of the paragraph.

Some like the effect, some do not. It is up to you, since it makes not too much difference in usability, depending on how long the paragraphs are.

Check out www.w3schools.com. They have html and css tutorials and their try it section allows you to see the effect of changes. You need to take a look at it, since Sigil assumes you have some knowledge of it.
mrmikel is offline   Reply With Quote
Old 10-31-2013, 12:38 PM   #5
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: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Also, if the effect you're looking for is for all the text to moved more to the right (while keeping the left edge constant), then "left-margin" is probably the css attribute you're looking for.

If you're looking to center an otherwise justified (or left-aligned) block of text, then you have your work cut out for you.
DiapDealer is offline   Reply With Quote
Advert
Old 11-01-2013, 06:03 AM   #6
pargoo
Member
pargoo began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Oct 2013
Location: Melbourne, Australia
Device: kindle paperwhite v2
Thanks for the replies so far. What I was aiming for was the customary 5-character indent as per Standard Manuscript Format. I *might* go back and set the first line of each new section to no indent, but that's for the future.
"If Sigil has created a linked stylesheet, add the line there..." is what I meant by assumed knowledge. Where precisely in the stylesheet does this line belong? My story *is* one html file so far - excluding the titlepage, of course - but I will split it up once I solve this issue. Would it help if I posted my stylesheet here in its entirety?
pargoo is offline   Reply With Quote
Old 11-01-2013, 06:17 AM   #7
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
I will make it simple for you. Right-click on the file in the browser on the left side. That will open up a menu with all kinds of option. One option is to link a stylesheet to the document. Select that option and check the box for the stylesheet you want to use (I assume that the stylesheet is already in your epub of course, otherwise you need to import it). Now the stylesheet is linked.

I would strongly advise to pick up basic HTML/CSS skills if you want to take this seriously. It will make your life easier. You can use 3% for an indent, but what I usually see is an indent of approx. 1.2em.
Toxaris is offline   Reply With Quote
Old 11-01-2013, 06:21 AM   #8
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by pargoo View Post
"If Sigil has created a linked stylesheet, add the line there..." is what I meant by assumed knowledge. Where precisely in the stylesheet does this line belong?
Theoretically, you can put it anywhere.

Quote:
Originally Posted by pargoo View Post
Would it help if I posted my stylesheet here in its entirety?
Since most MR members are not board certified psychics it'd most definitely help.
Doitsu is offline   Reply With Quote
Old 11-01-2013, 07:26 AM   #9
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Quote:
Originally Posted by Doitsu View Post
Since most MR members are not board certified psychics it'd most definitely help.
It WAS just Halloween in the US! Who Knows??? (grin)
mrmikel is offline   Reply With Quote
Old 11-01-2013, 07:28 AM   #10
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: 73,657
Karma: 127838196
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 Doitsu View Post
If your book consists of a single .html page, simply insert the following line immediately before </style></head> in the .html file:

Code:
p {text-indent: 3%;}
If Sigil has created a linked stylesheet, add the line there.

BTW, the Kindle Publishing Guidelines suggest the following:
3% is too large. I suggest using 1.2em.
JSWolf is online now   Reply With Quote
Old 11-01-2013, 07:29 AM   #11
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: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Doitsu View Post
Since most MR members are not board certified psychics it'd most definitely help.
I knew you were going to say that.
DiapDealer is offline   Reply With Quote
Old 11-01-2013, 07:39 AM   #12
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
One thing you can do is to download a book from the Mobileread library. Three Men in a Boat is one often cited for fancy formatting, but any of them will likely do.

Open it in Sigil and see if you like how it is laid out. Look at whether the paragraphs start with anything other than <p>. If they don't then double-click on the stylesheet in the style folder and look for p followed by {. The stuff between the brackets controls how paragraphs will be displayed.

If you like it, replace the p instructions in your stylesheet with a copy of the p instructions from the MR book and see what happens. You don't need to save in order see the effect when you switch back to book view.

If you created the stylesheet yourself, then be aware any little mistake can make all the instructions after it have no effect in the book, as if they didn't exist.

While your book is loaded, go to Tools, Validate Stylesheet and it will tell you if the stylesheet is lacking errors which can cause it not to work. Note, this is not a validation of what you mean to do, only that is correct to do it that way. No computer yet has a "Do What I Mean" key.
mrmikel is offline   Reply With Quote
Old 11-01-2013, 01:06 PM   #13
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Here is the way the book looks in Book View. As you can see, I have a slight indentation (1.2 em) at each paragraph:

Click image for larger version

Name:	Initial.png
Views:	593
Size:	67.5 KB
ID:	114442

If you get to the Code View (View - Code View) (or the button on the top menu, it looks like a "<>"). You will see all of your code:

Click image for larger version

Name:	Code.png
Views:	339
Size:	65.5 KB
ID:	114443

At the top, you hopefully see something like:

Code:
  <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
This means that CSS is being applied to your document. On the left side of Sigil, you should see a folder named "Styles", with that CSS file inside (in my case, the stylesheet is called "stylesheet.css").

Side Note: If you DO NOT see a CSS file in your Styles folder. That means you will have to create one.

Side Note #2: If you see a CSS file in your "Styles" folder, but DO NOT see the <link href [...]> at the top of your code, you can easily do this by following the instructions here for "Link Stylesheet": http://web.sigil.googlecode.com/git/...xt/styles.html

If you open that the CSS stylesheet, you should hopefully see some generic code. What you are looking for is the section which assigns styles to "p" tags:

Click image for larger version

Name:	Stylesheet.png
Views:	396
Size:	47.1 KB
ID:	114444

It is this area where you want to add "text-indent: #.#em;", where "#.#" is the amount of spacing you want, and "em" is the unit of spacing ("1em" is approximately the width of one 'M' character).

Usually, it is recommended to use anywhere between 1 to 2 em (I prefer 2em, JSWolf prefers 1.2em, others prefer smaller/larger).

For example, this is what happens when you change the text-indent to 6em:

Click image for larger version

Name:	6emIndent.png
Views:	293
Size:	67.2 KB
ID:	114445

If you need any more help, feel free to ask.

Quote:
Originally Posted by pargoo View Post
Thanks for the replies so far. What I was aiming for was the customary 5-character indent as per Standard Manuscript Format.
Doing a "5-character indent" is from the ol' bygone era of typewriters (oh the horrors this causes in some documents). It is not the recommended way to do things in the digital world at all. Your best bet is to just choose a text-indent between 1em to 2em. Then you can easily go into the CSS and change one tiny number, and every single paragraph can change at once.

Last edited by Tex2002ans; 11-01-2013 at 01:15 PM.
Tex2002ans is offline   Reply With Quote
Old 11-01-2013, 01:46 PM   #14
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: 73,657
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Oh, don't use % for an indent as that changes based on the resolution of the screen.
JSWolf is online now   Reply With Quote
Old 11-08-2013, 05:25 PM   #15
pargoo
Member
pargoo began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Oct 2013
Location: Melbourne, Australia
Device: kindle paperwhite v2
I'm happy to report problem solved I now have a justified story with nice neat margins and paragraph indents. Now I just have to get some small lines of text centered with the left-hand side lined up strait...using 'center' aligns them nicely, but with ragged edges on both sides.
pargoo 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
Selective paragraph indent Leonatus Writer2ePub 8 10-31-2013 04:22 PM
HTML- Paragraph indent w/ no spaces? Help please? Joseph Picard Workshop 36 07-20-2012 12:35 PM
Preference: Paragraph indent or a little paragraph spacing? 1611mac General Discussions 48 11-11-2011 12:43 AM
Paragraph spaces in ePub to Mobi conversion disrupts indent formatting markpearl Conversion 34 09-21-2011 02:42 PM
Paragraph indent-size should not applied to centered paragraphs? ShellShock Calibre 3 01-16-2010 11:54 AM


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


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