Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-07-2015, 08:24 AM   #1
nws
Junior Member
nws began at the beginning.
 
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 01:54 AM. Reason: forgot something
nws is offline   Reply With Quote
Old 04-07-2015, 02:20 PM   #2
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
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;}
and then in your xhtml file:
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>
There are more ways, but this is the easiest I guess.
Toxaris is offline   Reply With Quote
Advert
Old 04-08-2015, 01:41 AM   #3
nws
Junior Member
nws began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2015
Device: Kobo
Many thanks and hardstikke bedankt, Toxaris.

Nico

Quote:
Originally Posted by Toxaris View Post
You have to do this in the code. (...)
There are more ways, but this is the easiest I guess.
nws is offline   Reply With Quote
Old 04-08-2015, 02:30 AM   #4
nws
Junior Member
nws began at the beginning.
 
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
    }
I refer to this style in every first paragraph of a chapter and it works like a charm. So thanks again. Just wanted to share this with you.


Quote:
Originally Posted by Toxaris View Post
You have to do this in the code. (...)
There are more ways, but this is the easiest I guess.
nws is offline   Reply With Quote
Old 04-08-2015, 02:53 AM   #5
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
If you use header tags at the beginning of each chapter, you can even do it easier:

Code:
h2 + p {text-indent: 1.2em;}
Then you wont need the para1 class for this then. Also, your class could probably be cleaned up. Normal you don't need the padding, margin and border settings. It is usually easier to set that up in the html or body tag (so one level up). Due to inheritance, it would work downwards into the children.
Toxaris is offline   Reply With Quote
Advert
Old 04-09-2015, 01:47 AM   #6
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
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;}
BTW, everybody seems to have gotten it backwards; the first paragraph is supposed to be normal, with the rest indented, not the other way around.
dgatwood is offline   Reply With Quote
Old 04-09-2015, 07:09 AM   #7
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by dgatwood View Post
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;}
That's really very neat! I confess I didn't understand it when I saw it in another thread.

Quote:
Originally Posted by dgatwood View Post
BTW, everybody seems to have gotten it backwards; the first paragraph is supposed to be normal, with the rest indented, not the other way around.
And that is very true....
Notjohn is offline   Reply With Quote
Old 04-09-2015, 03:01 PM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,802
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by dgatwood View Post
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;}
BTW, everybody seems to have gotten it backwards; the first paragraph is supposed to be normal, with the rest indented, not the other way around.
It is whatever the Publisher wants to do to set the book apart.

I have seen a DEEPER indent on the first Para.
We see Small Caps, bold, Drop Caps, Big first letter

The rule: 'What SELLS'
theducks is offline   Reply With Quote
Old 04-10-2015, 03:07 AM   #9
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by theducks View Post
It is whatever the Publisher wants to do to set the book apart.

I have seen a DEEPER indent on the first Para.
We see Small Caps, bold, Drop Caps, Big first letter

The rule: 'What SELLS'
No, no, I meant that's what the original poster actually asked for.
dgatwood is offline   Reply With Quote
Reply

Tags
epub conversion, first paragraph, no tab, rtf


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Empty space in Paragraph odedta ePub 11 12-27-2014 09:18 AM
Return of large blank footer space in 2.10.0 roycymru Kobo Reader 6 11-09-2013 01:50 PM
Space before paragraph not coming through in epub steve2112 ePub 15 06-06-2012 07:26 AM
Problem with ePub - blank space around images SoonerJim Sigil 17 02-26-2011 01:40 PM
How to eliminate blank lines between paragraphs with Calibre Mr. Goodbar Calibre 8 06-02-2008 07:39 AM


All times are GMT -4. The time now is 07:37 PM.


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