12-11-2009, 09:33 AM | #1 |
Enthusiast
Posts: 41
Karma: 5514
Join Date: Oct 2009
Location: Groningen, Netherlands
Device: PRS-T1
|
Pissed off with LRF formatting: LRF/LRS clean tool?
Probably many of you have experienced this: you get an ebook, maybe in lit or rtf (or ever lrf itself), convert it to lrf using ebook-convert, and it looks like shit on your ebook reader (not calibre's fault, the original file is already crappy), namely:
- font too big/small - line spacing keeps changing (sometimes the last line of every paragraph has some extra space on top) - some parts of the text have weird sizes - excessive margin top/down - no spacing between paragraphs or first line indentation. How do you cope with it? For the font size thing, I've tried converting with calibre, but it seems to ignore my font size preferences (tried the last version yesterday, still no luck). For now I'm using a little perl script that reduces all font sizes by a factor. But the other problems remain. I have then converted lrf to lrs and examined the source. Guess what's in there, a gazillion styles and lots of <Span> with custom formatting things within the <P>. If there is no solution already there I'm thinking about picking an ebook that currently displays correctly, taking the BlockStyle and TextStyle that are used in the majority of the paragraphs, and writing a script that will substitute the most used BlockStyle and TextStyle for those, thus giving all my books a consistant look. Of course, the whole lot of <Span>s in the text will do their weird things, maybe it's a good idea to remove them... But of course if there is a tool available I might as well use it; do you guys know of any? GNU/Linux only, I don't have (or will have) Windows. Thanks! Last edited by grimborg; 12-11-2009 at 09:35 AM. |
12-11-2009, 11:33 AM | #2 |
Guru
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
|
Advert | |
|
12-12-2009, 09:12 AM | #3 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
For all the reasons you describe, it is important to first convert to an editable format. Get that looking nice, and THEN convert to your desired "target" format.
Unfortunately my solution (which is to use the Windows tool, "Book Designer") will not work for you. |
12-17-2009, 12:53 AM | #4 |
Member
Posts: 10
Karma: 10
Join Date: Nov 2009
Device: Sony Reader 505
|
I thought I was doing just that... Converted the files to rtf, edited them exactly as I want them to be (right page size, right font size, right justification...)
When I convert it back to LRF though it inserts blank lines (even though I check "remove blank lines after paragraph" AND there are none to begin with in the RTF, whatever is centered before becomes justified, the page breaks aren't respected, etc, etc. Would using HTML help? And if so... How do you edit an HTML file? I've only ever been able to view them. (I should note that my rtf files aren't read normally either. For some reason they only have half the pages that they do on the computer, and the font turns tiny.) |
01-23-2010, 11:22 AM | #5 |
Enthusiast
Posts: 38
Karma: 400154
Join Date: Jan 2010
Location: Spain
Device: Sony PRS-505, Pocketbook 902
|
I have exactly the same issues. As you say, calibre adds the blank lines when converting to lrf even if it works fine when converting to epub. I can't imagine why, maybe it's the <span> madness.
I am also a linux user. FYI, bookdesigner does work under wine (I use a commercial version, Codeweavers). Mind you install internet explorer 6.0 first. It's by far the best tool there is for getting lrf right. But, you have to learn how to use it and it's not very intuitive, although you can find an excellent tutorial on this forum. You edit html by hand simply opening the file with a text editor. Kate, gedit or gvim, for example. |
Advert | |
|
02-11-2010, 12:38 PM | #6 |
Connoisseur
Posts: 60
Karma: 32262
Join Date: Feb 2010
Location: Bristol, UK
Device: Sony PRS-600
|
Yes the spaces between paragraphs in LRF files created by Calibre is annoying me as well. I converted the current series of books I am reading to ePub just to lose the spaces but I hate the fact the text is not fully justified like in a real book.
I would have a go at editing the Calibre code for LRF creation but I wouldn't even know what file to look at. I had a look at Book Designer 4 but it didn't appear to support LRF. |
02-12-2010, 04:15 AM | #7 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
BD certainly supports LRF - it's what I use to create all the LRF books that I've uploaded to MR's library.
|
02-15-2010, 01:39 PM | #8 |
Enthusiast
Posts: 38
Karma: 400154
Join Date: Jan 2010
Location: Spain
Device: Sony PRS-505, Pocketbook 902
|
I suppose 'carbonize' means book designer can't open a lrf file. That's true. I convert my books to html or rtf, edit them to my heart content with BD and then I make lrf files. If they are pdf, I open them directly with BD and use some regex to get rid of the headers and footers. I am not a regex ninja so if it gets too complicated, I crop the pages with Adobe Acrobat (the commercial version), delete the hidden text (Document - Examine Document) and then I open the file with BD. I know it sounds complicated, but once you've done it a couple of times, it becomes automatic.
|
02-15-2010, 02:14 PM | #9 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Yes, that is true. BD can create LRF files, but not edit them. Apologies for the misunderstanding.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Converting LRS to LRF | mcortez | Sony Reader | 1 | 11-28-2007 12:26 PM |
LRF Editing Tool? | Vienna01 | Sony Reader | 6 | 08-31-2007 10:25 PM |
PRS-500 Create LRS and LRF files from Python with pylrs | Falstaff | Sony Reader Dev Corner | 37 | 08-04-2007 08:49 PM |
LRS to LRF on Mac OSX - any suggestions? | Lime2K | Sony Reader | 3 | 07-29-2007 11:15 PM |
PRS-500 Span tags in LRS and LRF files -- do I understand them? | Falstaff | Sony Reader Dev Corner | 2 | 01-31-2007 11:34 AM |