04-07-2015, 09:24 AM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2015
Device: Kobo
|
Eliminate first paragraph indent after blank line?
Dear all, my name is Nico. I'm new to this forum and hope I'm posting to the right section.
I've converted a few RTF files to epubs for a Kobo reader with Calibre, and noticed that I can't suppress the indent of the first paragraph after a blank line (or a page break). I do want indents to show at the beginning of the second and all subsequent paragraphs though. So my question is: how can I eliminate this first indent? And how can I force Calibre to insert a page break? This is how I want it to look: <blank line / forced page break> Text of the first paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lectus lorem, pulvinar malesuada fermentum sit amet, tempus a ante. Aliquam tincidunt neque eu risus luctus, id tempus velit facilisis. Etiam ullamcorper convallis lectus, non pulvinar felis ullamcorper nec. Ut nulla erat, condimentum ac molestie id, rhoncus at nisi. <indent>Second paragraph. Nulla faucibus diam et condimentum porttitor. Donec pretium arcu eu sem posuere, quis fringilla nunc interdum. Phasellus facilisis id justo ac vestibulum. Sed eget lectus lobortis, placerat justo a, molestie orci. Nulla facilisi. Pellentesque auctor hendrerit elit ut laoreet. <indent>Third paragraph. Aenean et diam aliquet, malesuada mi ut, porttitor arcu. Ut tempus sapien pellentesque enim commodo, sodales pretium purus luctus. Cras maximus sapien vitae ultrices pellentesque <etcetera> Last edited by nws; 04-08-2015 at 02:54 AM. Reason: forgot something |
04-07-2015, 03:20 PM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
You have to do this in the code. A forced page break is a bit of hit and miss with readers. You might want to try a 'page-break-before: always', but there is no guarantee it will work. However, a new file will always start on a new page. So, split the files at the correct place if you want to start on a new page.
With regards to indent (please, don't call it tab...), do the following in your stylesheet: Code:
p {text-indent: 0;} p.initial {text-indent: 1em;} Code:
<p class="initial">Text of the first paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lectus lorem, pulvinar malesuada fermentum sit amet, tempus a ante. Aliquam tincidunt neque eu risus luctus, id tempus velit facilisis. Etiam ullamcorper convallis lectus, non pulvinar felis ullamcorper nec. Ut nulla erat, condimentum ac molestie id, rhoncus at nisi.</p> <p>Second paragraph. Nulla faucibus diam et condimentum porttitor. Donec pretium arcu eu sem posuere, quis fringilla nunc interdum. Phasellus facilisis id justo ac vestibulum. Sed eget lectus lobortis, placerat justo a, molestie orci. Nulla facilisi. Pellentesque auctor hendrerit elit ut laoreet.</p> <p>Third paragraph. Aenean et diam aliquet, malesuada mi ut, porttitor arcu. Ut tempus sapien pellentesque enim commodo, sodales pretium purus luctus. Cras maximus sapien vitae ultrices pellentesque</p> |
Advert | |
|
04-08-2015, 02:41 AM | #3 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2015
Device: Kobo
|
|
04-08-2015, 03:30 AM | #4 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2015
Device: Kobo
|
Allright. This is the extra style I used to also prevent a blank line popping up below the unindented paragraph:
Code:
.para1 { border-bottom: 0; border-top: 0; display: block; margin-bottom: 0; margin-top: 0; padding-bottom: 0; padding-top: 0; text-indent: 0 } |
04-08-2015, 03:53 AM | #5 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
If you use header tags at the beginning of each chapter, you can even do it easier:
Code:
h2 + p {text-indent: 1.2em;} |
Advert | |
|
04-09-2015, 02:47 AM | #6 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Or if you want to be really general, assuming that there is some tag other than a paragraph tag before the first paragraph, you can do
Code:
p {text-indent: 0;} p + p {text-indent: 1.2em;} |
04-09-2015, 08:09 AM | #7 | |
mostly an observer
Posts: 1,516
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Quote:
And that is very true.... |
|
04-09-2015, 04:01 PM | #8 | |
Well trained by Cats
Posts: 30,601
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I have seen a DEEPER indent on the first Para. We see Small Caps, bold, Drop Caps, Big first letter The rule: 'What SELLS' |
|
04-10-2015, 04:07 AM | #9 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
|
Tags |
epub conversion, first paragraph, no tab, rtf |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Empty space in Paragraph | odedta | ePub | 11 | 12-27-2014 10:18 AM |
Return of large blank footer space in 2.10.0 | roycymru | Kobo Reader | 6 | 11-09-2013 02:50 PM |
Space before paragraph not coming through in epub | steve2112 | ePub | 15 | 06-06-2012 08:26 AM |
Problem with ePub - blank space around images | SoonerJim | Sigil | 17 | 02-26-2011 02:40 PM |
How to eliminate blank lines between paragraphs with Calibre | Mr. Goodbar | Calibre | 8 | 06-02-2008 08:39 AM |