05-20-2012, 02:02 AM | #1 |
Enthusiast
Posts: 27
Karma: 497132
Join Date: May 2012
Device: Various
|
HTML- Paragraph indent w/ no spaces? Help please?
I've tried to find this on my own, but I keep getting nowhere..
My original manuscript has indents on every paragraph, and most paragraphs are NOT separated by an extra blank line, but HTML seems to enforce this. (I knew this, and my most uses, I didn't care much) But even a line break... if I use spaces or a tab on the next line for my indent, this disappears when displayed, (and is removed anyway when I save and load up later..) Of course, as a result, my conversions from html to epub results in undesired results.. right now I seem to be stuck between the wall o text, or way too much 'white space'. I've read ebooks that have it the way I want, but I can't seem to get to that point. |
05-20-2012, 04:48 AM | #2 |
frumious Bandersnatch
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Spaces, tabs and blank lines are meaningless in HTML. In HTML paragraphs are surrounded by <p> and </p>, and they are displayed in whatever defined style. The default style is probably without indent and some vertical space, but you can easily change it with CSS like this:
p { margin: 0; text-indent: 1em; } ... but I guess you don't know about CSS yet. Well, there's no excuse for not learning the basics of it, it's quite simple and there are many tutorials online. Take some time to read some of them and you'll see how easy it is to alter the look of HTML documents. |
Advert | |
|
05-20-2012, 04:26 PM | #3 |
Enthusiast
Posts: 27
Karma: 497132
Join Date: May 2012
Device: Various
|
Gives me a clear target at any rate! Thanks! (fingers crossed) here we go!
|
05-20-2012, 07:01 PM | #4 |
Enthusiast
Posts: 27
Karma: 497132
Join Date: May 2012
Device: Various
|
Baha, got it working, but with all my mangling hacked attempts, I had to step back to my ODT. No big loss... all I lose in the process is some whitespace weeding (like at chapter headers, etc)
I HAVE tinkered a little with CSS in the past, but didn't know it by name. I obviously didn't know enough. Next job- making my TOC... headerville, here we come! |
05-20-2012, 07:05 PM | #5 |
Resident Curmudgeon
Posts: 73,669
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I find an indent of 1.2em to work best.
Code:
body { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; text-indent: 1.2em; orphans: 0; widows: 0 } p { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; text-indent: 1.2em } .spacebreak { margin-top: 2em; text-indent: 0 } Code:
<p>This is a paragraph with a 1.2em indent.</p> <p>This is another paragraph with a 1.2 em indent. Notice no line space between.<p> <p class="spacebreak">This is a paragraph with no indent and a 2em section break.</p> Last edited by JSWolf; 05-20-2012 at 07:10 PM. |
Advert | |
|
05-20-2012, 07:34 PM | #6 |
Enthusiast
Posts: 27
Karma: 497132
Join Date: May 2012
Device: Various
|
I used 0.5 cm, and it looks good to me... (notice you're using 'em' as well... i thought it was just a typo in the first reply.. after some googling, I find out... I better get em!)
Last edited by Joseph Picard; 05-20-2012 at 07:36 PM. |
05-20-2012, 07:58 PM | #7 |
Resident Curmudgeon
Posts: 73,669
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
By using cm, you cause fix sizes to happen. That's OK if that is what you really want. But em is not fixed. % is also not fixed. In most cases, % is not a good idea to use.
|
05-20-2012, 08:18 PM | #8 |
Enthusiast
Posts: 27
Karma: 497132
Join Date: May 2012
Device: Various
|
Yup, after reading up on what it did, I went with em. Logical stuff you can do with css... a lot of them are the kinds of things that make you wonder why it wasn't an original part of html. Of course, I suppose they couldn't have known all the applications it would gain over the years..
|
05-20-2012, 08:23 PM | #9 |
Resident Curmudgeon
Posts: 73,669
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If you notice in the body style, there are lines for widows and orphans. Those are to keep the ends of the page pretty much the same. ADE defaults to 2 which causes differing ends of pages. I don't mind if only one line from a paragraph is at the end of the screen.
Also, you'll notice that .spacebreak looks incomplete. What's not there is picked up from the p. So when you have <p class="spacebreak"> you get the p has and just what .spacebreak overrides it and/or adds to it. |
05-20-2012, 09:13 PM | #10 |
Enthusiast
Posts: 27
Karma: 497132
Join Date: May 2012
Device: Various
|
Haha, you're way ahead of me in this.. I had to google 'spacebreak', and still scarcely know what in blazes it is. Hmm.. (google google, read read..).. Actually, that's not bothering me too much. But I stumbled onto setting my font.
I despise serifs. My books in print are all arial, despite being told serifs are so much more common in print. I think they make reading more difficult in print as well as on the screen.... but since ebooks are for the screen anyway, I suppose my pet font will be quite happy. |
05-20-2012, 09:17 PM | #11 | |
Wizard
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
Quote:
Personally, I prefer to indent paragraphs after a simple scene break and to not indent the first paragraph in the chapter. To do this I have both a "spacebreak" style and a "firstparagraph" style in my CSS, one with an indent and the other with no indent. Traditionally with "antique" paper books a 3em indent is very common. Ebooks are generally much better off with a smaller indent of 1-1.5em. Personally, I use 1em. |
|
05-20-2012, 09:36 PM | #12 |
Enthusiast
Posts: 27
Karma: 497132
Join Date: May 2012
Device: Various
|
One thing that's for me concerned is page breaks... in print, I have a chapter starting at the top of a page.... but in html, page breaks... kinda.. not there, obviously.
If I have headers set up for every chapter, will calibre be smart about it, and get the pagebreaks in there where they should be? Eh, I'm putting headers in eventually anyway for the sake of the TOC, so I guess I'll just see. |
05-20-2012, 10:04 PM | #13 | |
Resident Curmudgeon
Posts: 73,669
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
I did try a 1em indent. It just wasn't quite big enough. 1.5em was too big. So I settled for 1.2em. Personally, I do like the nonindented paragraph after the section break. IT makes it obvious that it's the start of a new section. What I really dislike is when the maker of the eBook is too stupid to take out the * * * for the end of the print page section breaks. |
|
05-20-2012, 10:07 PM | #14 | |
Resident Curmudgeon
Posts: 73,669
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
spacebreak is just the name of a style in the CSS code example I posted in this thread. If you look at p and spacebreak, you'll see exactly what it does. I could have called spacebreak anything I wanted. But I prefer to try to name styles according to what they do. Last edited by JSWolf; 05-20-2012 at 10:09 PM. |
|
05-20-2012, 10:14 PM | #15 | |
Resident Curmudgeon
Posts: 73,669
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Few things, don't put in paragraphs spaces, don't make the text san-serif, don't use large text indents but do use them, don't make the text small. Leave the body text at the devices default size, do not use large margins. If you do use margins, make them very small. Don't simulate blockquotes. Use the real thing if need be. These things will help you make a good looking eBook. That's the fist thing to get people to enjoy your story. If you don't make it look nice, they won't get past the poor formatting to be able to enjoy the story. |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
WTB: Ability to change indent without ticking 'remove spaces between lines' | gweminence | Calibre | 9 | 08-27-2011 09:05 AM |
Paragraph indent-size should not applied to centered paragraphs? | ShellShock | Calibre | 3 | 01-16-2010 11:54 AM |
Paragraph indendation or spaces? | enarchay | Sony Reader | 0 | 05-28-2009 05:18 AM |