Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 11-22-2009, 06:33 AM   #1
vitalyb
Member
vitalyb began at the beginning.
 
vitalyb's Avatar
 
Posts: 17
Karma: 10
Join Date: Aug 2003
Location: Israel
Device: HTC Touch Pro
Fixed-width txt to fluid one

Hi everyone,

I am wondering how I can convert books that look like that:

http://www.gutenberg.org/files/11/11.txt

To books with regular fluid lines - Without the forced line-break every X characters.

Thanks!
Vitaly
vitalyb is offline   Reply With Quote
Old 11-22-2009, 06:35 AM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 65,522
Karma: 43957509
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
There are many tools that will do it. If you're a Windows user, you can use this freeware tool called "textify".
HarryT is offline   Reply With Quote
 
Advertisement
Old 11-22-2009, 06:40 AM   #3
vitalyb
Member
vitalyb began at the beginning.
 
vitalyb's Avatar
 
Posts: 17
Karma: 10
Join Date: Aug 2003
Location: Israel
Device: HTC Touch Pro
I guess I just used the wrong google search queries. I'll give textify a try. Thanks!
On the subject though, can anyone direct me to a way to do it in openoffice writer?

I'd prefer to everything in a single tool and I use writer for most of my conversions.
vitalyb is offline   Reply With Quote
Old 11-25-2009, 05:51 AM   #4
vitalyb
Member
vitalyb began at the beginning.
 
vitalyb's Avatar
 
Posts: 17
Karma: 10
Join Date: Aug 2003
Location: Israel
Device: HTC Touch Pro
I've tried using Textify and it works great with latin fonts. However, with unicode (or cyrilic) I am having problems.

Any ideas?

Thanks!
vitalyb is offline   Reply With Quote
Old 11-28-2009, 07:24 PM   #5
Solitaire1
Observant Owl
Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.Solitaire1 ought to be getting tired of karma fortunes by now.
 
Solitaire1's Avatar
 
Posts: 6,308
Karma: 14432552
Join Date: Nov 2009
Device: NookHD+ & Sony PRS-505 eReader
Quote:
Originally Posted by vitalyb View Post
I guess I just used the wrong google search queries. I'll give textify a try. Thanks!
On the subject though, can anyone direct me to a way to do it in openoffice writer?

I'd prefer to everything in a single tool and I use writer for most of my conversions.
It can be done in OpenOffice Writer, but it does take the following steps (I'm sure there are other ways, but this works for me, and I've used it with Project Gutenberg ebooks):

- Open up the text file in Writer.

- Save it as an HTML file, and then close the file.

- Open the HTML file in Writer. The paragraph style for all of the text will be "Preformatted Text"

- Select all of the text and change the paragraph style to "Text body."

-- This will separate the paragraphs, beginning each with "<p>" and ending them with "</p>"

-- The blank lines will be replaced with "</p><br><br><p>"

- Insert a space at the beginning of the text and then delete it. This will clean up the HTML formatting in the document.

- Under the "View" menu select "HTML Source." This will bring up the HTML source code for the document.

- Do a search and replace for "<p>" and replace it with nothing.

- Do a search and replace for "</p>" and replace it with one space.

- Do a search and replace for "<br><br>" and replace it with "</p><p>"

- Insert a "<p>" at the beginning of the text.

- Delete the final "<p>" at the end of the text.

- Go to the "View" menu and uncheck "HTML Source."

- Insert a space at the beginning of the text and then delete it. This will clean up the HTML formatting in the document.

- Save the document.

At this point, you can easily convert the document into other formats.

This reformatting technique works best if each paragraph in the text file is separated by a blank line. If the document contains line breaks (like many lines at the beginning of Project Gutenberg ebooks), you will have to put them back into the document manually.

Please let us know how this works for you.

Last edited by Solitaire1; 11-28-2009 at 07:25 PM. Reason: Minor correction
Solitaire1 is offline   Reply With Quote
Old 12-05-2009, 09:06 AM   #6
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by vitalyb View Post
Hi everyone,

I am wondering how I can convert books that look like that:

http://www.gutenberg.org/files/11/11.txt

To books with regular fluid lines - Without the forced line-break every X characters.

Thanks!
Vitaly
There's already a properly formatted .html version of that text available from www.gutenberg.org. It's http://www.gutenberg.org/files/11/11-h.zip and just needs to be unzipped, have the Gutenberg preamble and legalese stripped and converted to ebook form. Hey, guess what, ALL that can be done for you using my freeware GuteBook (see my sig for the link).

Aside: Basically, you install the GuteBook program, enter "11", click your desired ebook output and Click "Convert". It requires that calibre and some (optional) other supporting programs be installed once, then it can convert almost any Guteberg.org offering, though some ebooks come out better than others due to coding styles that are better suited to ebook conversion.
nrapallo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-300 Fixed-width fonts for text files. seanhennessy Sony Reader 0 09-24-2010 12:41 PM
Page Width kobo2010 Kobo Reader 4 05-10-2010 09:14 PM
How to apply fixed-width fonts EnergyLens Calibre 5 04-17-2010 01:41 PM
single HTML to ePub with fixed width font skyfish Calibre 8 12-10-2009 02:30 PM
Using the width attribute crutledge Workshop 8 07-06-2009 06:10 AM


All times are GMT -4. The time now is 08:14 PM.


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