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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-15-2011, 03:47 PM   #1
Soxendom
Connoisseur
Soxendom began at the beginning.
 
Soxendom's Avatar
 
Posts: 54
Karma: 10
Join Date: May 2009
Device: Sony PRS T1
Problem with non-indented paragraph

I am attempting to alter an epub generated with Writer2epub - just the bits that it doesn't cater for.
My problem is this:
In the book, in the middle of some ordinary paragraphs there are a couple of verses of a song. The verses come out fine (Thanks Jelleby - I used some code that you'd shown - I hope you don't mind), but the paragraphs afterwards are non-indented as though they were a new chapter - which they aren't.
I put in <p> </p> in between the verse and the paragraph but that didn't seem to work either. How do I get it so that the next paragraph is indented.
The coding for the paragraphs are:
Code:
p
    {
    margin:0pt;
    text-indent:0em;
    text-align: justify;
    font-size: 1.00em;
    }
p+p
    {
    text-indent:1.5em;
    text-align: justify;
    font-size: 1.00em;
    }
Soxendom is offline   Reply With Quote
Old 05-16-2011, 05:29 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,259
Karma: 4801167
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
You are telling that "normal" paragraphs are not indented, and only paragraphs that come after a paragraph have a 1.5em indent. You can either:

1. Add a rule to indent paragraphs that come after a poetry fragment too:

Code:
div.poetry + p {
  text-indent: 1.5em;
}
2. Reverse the rules, to have normal paragraphs indented, and only those that come after a heading indented:

Code:
p {
  margin: 0;
  text-indent: 1.5em;
  text-align: justify;
  font-size: 1.00em;
}
h1 + p, h2 + p, h3 + p { /* and more, if needed */
  text-indent: 0em;
}
3. Or add a specific class for non-indented paragraphs:

Code:
p.noindent {
  text-indent: 0;
}
Jellby is offline   Reply With Quote
Old 05-16-2011, 07:30 AM   #3
Soxendom
Connoisseur
Soxendom began at the beginning.
 
Soxendom's Avatar
 
Posts: 54
Karma: 10
Join Date: May 2009
Device: Sony PRS T1
Thank You
Soxendom 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
.epub hyperlinks, centered and non indented text. Xabache ePub 2 09-13-2010 02:11 PM
Indented bookmarks and LRF pimpoum LRF 0 07-10-2010 12:58 PM
Indented bookmarks and LRF pimpoum LRF 0 07-10-2010 12:55 PM
I'm having a problem with extra paragraph spaces akosimike Calibre 10 05-27-2010 07:53 PM
LRF paragraph problem qq67 Calibre 4 03-09-2010 07:40 AM


All times are GMT -4. The time now is 01:39 PM.


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