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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-07-2008, 10:42 AM   #1
scgf
Connoisseur
scgf doesn't litterscgf doesn't litter
 
Posts: 76
Karma: 194
Join Date: Aug 2008
Device: Amazon Kindle 3, iPad, iPhone 4, iPod Touch (UK)
last line in each paragraph centred

I have converted some books I bought a while ago from ereader format to html, then using Calibre to lrf.

Strangely, when I view the books in Calibre, I see that the last line of each paragraph is centred. I have tried editing the html source, adding <align=center> to no avail. The html file looks fine in a web browser and each paragraph is correctly aligned.

I haven't bothered putting any of these files onto my Sony Reader, I am assuming that the layout will look the same as Callibre displays it.

Any ideas?

Cheers.
scgf is offline   Reply With Quote
Old 09-07-2008, 12:29 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Attach one of these html files here.
kovidgoyal is offline   Reply With Quote
 
Advertisement
Old 09-07-2008, 12:48 PM   #3
scgf
Connoisseur
scgf doesn't litterscgf doesn't litter
 
Posts: 76
Karma: 194
Join Date: Aug 2008
Device: Amazon Kindle 3, iPad, iPhone 4, iPod Touch (UK)
One of the offending html files is here

Note I am using the b9 version of Calibre on a Mac.

Cheers.
scgf is offline   Reply With Quote
Old 09-07-2008, 12:56 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the paragaphs have align='center' specified (all the lines are centered, you only notice it for the last line because its ususally shorter than the page width.
kovidgoyal is offline   Reply With Quote
Old 09-07-2008, 12:58 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It works in a browser because actually only the leading paragraphs have align=center however the text is not put into its own <p> element. In this situation html2lrf (in order to generate more efficient LRF files) inherits the center attribute from the previous paragraph.
kovidgoyal is offline   Reply With Quote
Old 09-07-2008, 04:02 PM   #6
scgf
Connoisseur
scgf doesn't litterscgf doesn't litter
 
Posts: 76
Karma: 194
Join Date: Aug 2008
Device: Amazon Kindle 3, iPad, iPhone 4, iPod Touch (UK)
Thank you.

I'm not sure what to do to put it right, though. I added <align=left> after any centred text and it made no difference.

Sorry to be so dumb :-(
scgf is offline   Reply With Quote
Old 09-07-2008, 05:22 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just add a <p style="text-align:left"> at the start of each block of text
kovidgoyal is offline   Reply With Quote
Old 09-10-2008, 02:46 AM   #8
Waltarro
Junior Member
Waltarro began at the beginning.
 
Posts: 6
Karma: 32
Join Date: Sep 2008
Device: Sony PRS505
Don't know if you've worked around this or not, but I've been having the
same problem. I found that if open the html file in OpenOffice Writer and
resave the html, the alignment is corrected.
Waltarro is offline   Reply With Quote
Old 09-10-2008, 03:42 AM   #9
scgf
Connoisseur
scgf doesn't litterscgf doesn't litter
 
Posts: 76
Karma: 194
Join Date: Aug 2008
Device: Amazon Kindle 3, iPad, iPhone 4, iPod Touch (UK)
Quote:
Originally Posted by Waltarro View Post
Don't know if you've worked around this or not, but I've been having the
same problem. I found that if open the html file in OpenOffice Writer and
resave the html, the alignment is corrected.
Hey, that's excellent! I use OpenOffice already so I'll give it a shot.

Thank's very much for the tip!
scgf is offline   Reply With Quote
Old 09-10-2008, 03:23 PM   #10
scgf
Connoisseur
scgf doesn't litterscgf doesn't litter
 
Posts: 76
Karma: 194
Join Date: Aug 2008
Device: Amazon Kindle 3, iPad, iPhone 4, iPod Touch (UK)
Just tried it on my Mac using NeoOffice and it works! Very easy!

Thanks again.
scgf 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
Extra paragraph line when converting from LRF jhempel24 Calibre 3 08-18-2010 08:00 AM
LRF to EPUB: Each line is a paragraph tag wudaben Calibre 5 07-14-2010 08:04 PM
Prevent Calibre to paragraph each line armkbdotcom Calibre 3 05-29-2010 04:15 PM
Treat each line as a paragraph in LIT files tulsa Calibre 9 03-21-2010 03:49 PM
Paragraph indents from command line JSWolf Calibre 4 11-06-2008 09:41 PM


All times are GMT -4. The time now is 07:45 AM.


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