View Full Version : Getting strange margins when converting


Jev
03-23-2009, 04:16 PM
Just bought the PRS-505

Ive read alot so far of the forums and guides, but so far I havent found a solution.

I have a book in txt.

If i put it into the reader it ends up one long text without any paragraphs.

Then i made it into RTS, but then i get this


as he closed for rendezvous, the treeship's details blurred by the
redundant machine and
erg-generated containment fields which surrounded it like a spherical
mist, but its leafy bulk clearly ablaze with thousands of lights which


How do I get the format right so that i dont get that long space behind the "and" in the second paragraph? So that it looks like this:

as he closed for rendezvous, the treeship's details blurred by the
redundant machine and erg-generated containment fields which
surrounded it like a spherical mist, but its leafy bulk clearly ablaze
with thousands of lights which


Do I have to do it manually in RTF, or do I just have to put in the correct margins in the RFT.

FizzyWater
03-24-2009, 12:02 AM
Hi, Jev!

If I had to guess, I'd say the creator of the original text file has put a "hard return" at the end of the "redundant machine and" line. So no matter where you put your margins, it's still going to want to star "erg-generated containment fields" on the next line.

There are various tricks for cleaning those up - I think if you search on "Gutenberg" here you'll find this issue raised.

Generally, if there are extra lines between the "real" paragraphs, you can do a find-and-replace in your word processor to clean this up.

In Word, I'd start with replacing the real paragraph endings and blank lines (^p^p) with a character(s) not likely to be in my text (maybe ~~ for example). Then I'd replace the single (not-real) paragraph endings (^p) with a space (or nothing, if there's a space at the end of the "redundant machine and" -type paragraphs.

Then I'd replace my ~~ back with paragraphs (^p or ^p^p, depending on my preference for the book) to get my real paragraphs back.

Good luck!

FizzyWater
03-24-2009, 12:12 AM
I just saw a post that is similar - and one of the moderators posted a little tool for making this easier. You might want to check this out:

http://www.mobileread.com/forums/showthread.php?t=43009

Patricia
03-24-2009, 12:14 AM
If you open the text file, then select all and copy it into a word doc, then you will see that there are hard carriage breaks at the end of each line, with two between paragraphs.

Here are two ways of getting rid of them quickly.


Replacing Breaks using Word
Paste the text file into a word document. Save it.
Open Find and Replace (In the “Edit” menu). You need to make three passes with it.
1. Find ^p^p (i.e. find two paragraph marks. The symbols are in More then Special. The paragraph mark is at the top of the list.). Replace with @ (These act as placeholders to preserve the real paragraphs.)
2. Now, for the second pass, find ^p (single paragraph mark). Replace with a single space.
3. Finally, for the third pass, find @ and replace with either a single paragraph mark, or two paragraph marks if you prefer an empty line between paragraphs.

Another tool which will do this automatically is:

Stingo’s Word Macro
This does a good job at removing the hard line breaks in text files and making a reflowable document. It also sets the font to Times New Roman, point 14. Once installed, it is very easy to use. Paste your text file into a word document. Save the Doc and run the macro.
You can find it here, together with instructions on how to install it:
http://www.mobileread.com/forums/showthread.php?t=8793
(The only time this has ever given me trouble was when I failed to save the doc before running the macro. It crashed.)

Patricia
03-24-2009, 12:15 AM
And welcome to the forum, Jev.

Jill75
03-24-2009, 12:36 AM
FizzyWater was just ahead of me in noting the similar forum. The program is called "textify" to arrange those hard line breaks that you are getting. Check the other thread's link and the link to download the program is indicated there.

JSWolf
03-24-2009, 01:52 PM
Just bought the PRS-505

Ive read alot so far of the forums and guides, but so far I havent found a solution.

I have a book in txt.
What is this book and where did it come from?

JSWolf
03-24-2009, 01:59 PM
Never mind my previous question. The snippet of text is from an illegal eBook. It is from Hyperion by Dan Simmons. So please do not give Jev help on cleaning up an illegal stolen eBook.

This book is not available at BooksOnBoard and Amazon.com.

Jev
03-24-2009, 04:14 PM
Well thanks for the help so far.

And Wolf. Yes I didnt buy this as an ebook, but as paper. In accordance with danish copyright law, i am allowed to make 1 digital copy of an analog medium for my own personal use.
So far ive bought 3 hyperion books and 2 Fall of hyperion and read them to shreds. The last ive scanned at work with a pro copying machine that scans and emails it directly.

The simple truth is that I dont have room for all my books. Right now I have a little selection of my favourite books in the apartment, the rest is in storage. Last time i counted, i had around 25 meters(placed next to each other standing up) I was to lazy to actually count them.

Those you see here are stacked in 2 rows.

http://img440.imageshack.us/img440/9444/img4008.jpg
http://img440.imageshack.us/img440/6863/img4009.jpg

But thank you for the concern wolf. Every writer should be paid for their work, especially a writer as brilliant as Dan. Im a photographer by profession, so I know how it is to be copied.

But i find it strange that you come down my throat when I see this.
http://www.mobileread.com/forums/showthread.php?t=40267

As I understand it, copyright is runs from when it created to the death+99 years.
That there is a link so that you can inform of any copyright violation, does not make it any more legal. If you do not have permission from either the author or the publisher you cant make it public, even though its been publicised before

Sincerely
Jev

PS: By looking at the pictures. Yes I know. I have to remove some webs in the corner

Patricia
03-24-2009, 06:30 PM
Well thanks for the help so far.

And Wolf. Yes I didnt buy this as an ebook, but as paper. In accordance with danish copyright law, i am allowed to make 1 digital copy of an analog medium for my own personal use.
So far ive bought 3 hyperion books and 2 Fall of hyperion and read them to shreds. The last ive scanned at work with a pro copying machine that scans and emails it directly.

The simple truth is that I dont have room for all my books. Right now I have a little selection of my favourite books in the apartment, the rest is in storage. Last time i counted, i had around 25 meters(placed next to each other standing up) I was to lazy to actually count them.

Those you see here are stacked in 2 rows.

http://img440.imageshack.us/img440/9444/img4008.jpg
http://img440.imageshack.us/img440/6863/img4009.jpg

But thank you for the concern wolf. Every writer should be paid for their work, especially a writer as brilliant as Dan. Im a photographer by profession, so I know how it is to be copied.

But i find it strange that you come down my throat when I see this.
http://www.mobileread.com/forums/showthread.php?t=40267

As I understand it, copyright is runs from when it created to the death+99 years.
That there is a link so that you can inform of any copyright violation, does not make it any more legal. If you do not have permission from either the author or the publisher you cant make it public, even though its been publicised before

Sincerely
Jev

PS: By looking at the pictures. Yes I know. I have to remove some webs in the corner


Jev,
You are under a misapprehension in several areas. This isn't surprising because copyright is very complicated.

1. Copyright terms vary in different countries. In the EU, it is the life of the author plus 70 years. In Canada - where our main server is hosted - it is life plus 50 years. In the USA anything pre-1923 is public domain. So is quite a lot of later stuff where the copyright has not been renewed.
See our wiki for more detail:
http://wiki.mobileread.com/wiki/Copyright#Copyright

2. The book that your link leads to - The Next Logical Step, by Ben Bova (who was born in 1932) - is from Project Gutenberg USA: a very reputable and law-abiding source. We have hosted it off-site on a server in the USA. This is because it is a case where the US copyright was not renewed by the author. It is in the US public domain.
It is entirely legal for our American members to download the book. We do ask members to check the copyright status of any texts that they either download or upload.

3. If you come across a book which you think might be a copyright violation then please report it, so that we can investigate. Mistakes occasionally creep in, and we have removed several of them.

25 metres of books is a mere bagatelle! Come to my house and see many more. There are 15 metres in my study; at least another 15 on my partner's study. The sitting-room has about 30 metres of full shelves. And there are boxes in the attic and under the beds. And I gave away several thousand books last year, in an attempt to streamline.

Patricia
03-24-2009, 06:34 PM
Never mind my previous question. The snippet of text is from an illegal eBook. It is from Hyperion by Dan Simmons. So please do not give Jev help on cleaning up an illegal stolen eBook.

This book is not available at BooksOnBoard and Amazon.com.

Jon, I think that you have been a bit hasty here. We must remember that we have members from all over the world.

roger64
03-24-2009, 09:39 PM
Well we have some Sherlock Holmes here...:offtopic:

I give you my way with OpenOffice 3 (Linux and Windows, Mac to try) :D
You just open your Gutenberg text file with OpenOffice writer.

Two steps using "Search and replace with regular expressions"
If need be you can easily make a macro to join them.

"$" with " "
to get rid of hard returns and then
".*$" with "&\n"
to create again paragraph breaks (yes that's point star dollar)



Save.

After that I insert the "purified" text into a special 9x12 cm model and that's it.

Jev
03-25-2009, 02:32 AM
I apologize, my mistake Patricia.

Yes the copyright laws can make heads spin. I will check out the Gutenberg project for more enjoyable books. Thanks.

And I wish I would have room for all my books, but alas I live in a small 2 room apartment ;(

And again thanks for the welcome every one, and for the help.

Sincerely
Jev

Patricia
03-25-2009, 09:53 AM
No worries, Jev.
Our wiki has a page listing free ebooks here:
http://wiki.mobileread.com/wiki/Free_eBooks

If it's science fiction that you like, then do take a look at the Baen free library:
http://www.baen.com/library/

(And should you want to explore our wiki, there's a link to it at the very top of this page. It's not very conspicuous.)

astra
05-01-2009, 05:21 AM
Never mind my previous question. The snippet of text is from an illegal eBook. It is from Hyperion by Dan Simmons. So please do not give Jev help on cleaning up an illegal stolen eBook.

This book is not available at BooksOnBoard and Amazon.com.

Since when you have become a copyright defender? :eek: