Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-04-2009, 03:00 PM   #1
Robertxc
Junior Member
Robertxc began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2008
Device: none
Formatting question for lrf and epub

I wonder if anyone can advise on something that is puzzling me....

I have an rtf document like the one attached. Ideally, I would like to convert it to epub format for the sake of compatibility. However, I cannot seem to get it to format the tab indents correctly. I like a 5mm indent on my tabs, but Calibre seems to ignore my tabs and put its own much bigger ones in. Is there a setting somewhere to control tabs? Also, I cannot fathom how to persuade Calibre to detect the chapters and keep the page breaks that the rtf has. Again, is there a setting somewhere?

The alternative to epub for me is to use lrf, since I am just about to get a prs-505. Again, I cannot figure out how to get Calibre to retain the page breaks.

I would be very grateful if someone has some guidance on this.
Attached Files
File Type: rtf Example_text.rtf (288.5 KB, 212 views)
Robertxc is offline   Reply With Quote
Old 02-04-2009, 03:20 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: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the override CSS and set p { text-indent: 5mm} as for the TOC, you will have to unzip the epub look at the HTML in it and from that deduce the correct XPath string to give to --level1-toc
kovidgoyal is offline   Reply With Quote
Advert
Old 02-05-2009, 10:55 AM   #3
Robertxc
Junior Member
Robertxc began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2008
Device: none
Thank you Kovid, the tabs are now working perfectly. I have had a bit more trouble with the TOC however. I managed to import an rtf version of the test document ok, but when i subsequently tried it with the full text it took 7 hours and didn't format the TOC at all. I have since tried saving the text as a filtered web page, and calibre imports that in a couple of minutes without any problems. The only issue I now have is that I cannot get to grips with the XPath expressions (the XPath website is not exactly user friendly!). The tag I'm trying to grab is as follows:

<p class=eBookChapter>*** <br clear=all style='page-break-before:always'>
Chapter&nbsp;II*************** </p>

I tried putting class=eBookChapter into the XPath expression, but to no avail. Do you have any suggestions to make this work?
Robertxc is offline   Reply With Quote
Old 02-05-2009, 12:21 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: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Did you see the XPath tutorial in the calibre User Manual? If you think that's not user friendly, I would appreciate suggestion on how to ake it more user friendly. In any case you need

Code:
//p[@class="eBookChapter"]
kovidgoyal is offline   Reply With Quote
Old 02-05-2009, 01:17 PM   #5
Robertxc
Junior Member
Robertxc began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2008
Device: none
Aha! I see what you mean. The link in the to the tutorial doesn't work for me. I'm running 64 bit Win7 with a modified version of Chrome as the default browser, so I was not too surprised that the url didn't open. I just went to the XPath website instead - hence my comment about user friendliness....

Now that I've found your tutorial, I think it's excellent, and makes perfect sense.
Robertxc is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-650 epub formatting question scribblenauts Sony Reader 11 11-01-2010 01:47 PM
Pissed off with LRF formatting: LRF/LRS clean tool? grimborg LRF 8 02-15-2010 01:14 PM
TXT conversion to ePub or LRF - paragraph formatting Zapped Calibre 6 10-23-2009 05:06 PM
Saving Formatting Doc -> LRF? jaxx6166 LRF 3 03-08-2009 09:06 PM
line formatting formatting question daesdaemar Workshop 9 02-06-2009 11:47 AM


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


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