10-31-2013, 04:01 AM | #1 |
Member
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. |
10-31-2013, 04:33 AM | #2 | |
Grand Sorcerer
Posts: 5,584
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%;} BTW, the Kindle Publishing Guidelines suggest the following: Quote:
|
|
10-31-2013, 06:26 AM | #3 |
Wizard
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 ???
|
10-31-2013, 09:16 AM | #4 |
Color me gone
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. |
10-31-2013, 12:38 PM | #5 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
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. |
11-01-2013, 06:03 AM | #6 |
Member
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? |
11-01-2013, 06:17 AM | #7 |
Wizard
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. |
11-01-2013, 06:21 AM | #8 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Since most MR members are not board certified psychics it'd most definitely help. |
|
11-01-2013, 07:26 AM | #9 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
|
11-01-2013, 07:28 AM | #10 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
11-01-2013, 07:29 AM | #11 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
11-01-2013, 07:39 AM | #12 |
Color me gone
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. |
11-01-2013, 01:06 PM | #13 |
Wizard
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:
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: At the top, you hopefully see something like: Code:
<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/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: 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: If you need any more help, feel free to ask. 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. |
11-01-2013, 01:46 PM | #14 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
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.
|
11-08-2013, 05:25 PM | #15 |
Member
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.
|
|
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 |