View Single Post
Old 01-07-2009, 11:22 AM   #2
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by motorhead View Post
Most of my books are in txt format and I get some weird cut-off lines. One line will go all the way to the end, next line will be a word or two. Not all of my books are like that, so I assume it has something to do with the formatting. I tried getting the wolf printer and simply reformatting the books and saving them as txt again, but this doesn't work because it doesn't change the actual text, it just makes some margins. So does anyone have any idea how I can reformat my books to be legible? I don't want to have to convert them to a different format.
The problem is that you have the cr/lf characters at the end of the line in the file. Look at the file in Notepad on your pc and turn off wrap and you will see what is going on. What is happening is that your txt files were built assuming an 80 character line, roughly 800 pixels or so depending on the font size. Since your screen is smaller the reader wraps the line at the width of the screen but then the line end character(s) get reached and and they force the line end to happen. This is why you see a long line followed by a short line. Read TXT in the wiki for more details on what is going on. Project Gutenberg is the major cause of this problem and they put in line end characters at the end of every line based on the length of the line in a paper book.

Now that you understand the problem there are some fixes that can be applied. The fix is to remove all these line ends but still maintain the paragraph boundaries. Typically a paragraph in your files is likely to be defined by a blank line so it can be detected. There are some utilities you can find to help with the task. One way is to read your file into Word and allow it to get rid of all the line ends and then resave it as text again. The wiki also has a page of utilities that can convert and fix problems of this sort.

Dale
DaleDe is offline   Reply With Quote