Quote:
Originally Posted by nikkie
I also found this problem in a lot of my books. When I opened them up in plain text editors, they had newlines at the end of every physical line break to control the width of the text.
Here is what I did to solve this problem when the file was rtf or something I could physically edit:
Because I was working with these books in windows instead of on linux, I wanted a solution that would work in windows. So I tested a few things in Word and found a solution that mostly worked, and then recorded it as a macro.
In cases where there is a paragraph break, you always have two new lines. In cases where it is inappropriately breaking at the end of the physical width of the screen, there's always one. So, what I did is I did a Find/Replace for any two line breaks (^p^p) in word, and replaced them with another special character not in the file. Then I did a find replace for the single line breaks (^p) and replaced them with a single space. The I found and replaced the special character I had replaced the double breaks with again a double line break. (Or you can use a paragraph, whatever you want.)
Now, every time I find an RTF book that has this problem, I open it in Word real quick, run my macro, and save. Then I convert in calibre. Works perfectly.
|
You might want to offer the macro for others to use - if you haven't already!