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 10-16-2008, 06:48 AM   #1
Ned
Ebook reader
Ned began at the beginning.
 
Posts: 116
Karma: 33
Join Date: Oct 2008
Location: York, England
Device: Kindle Paperwhite
Getting rid of line breaks with Bookdesigner

Can't seem to get anywhere with the Bookdesigner help so hoping somebody here knows.

All I want to do is convert a basic lit file to prc.
Not bothered about TOC, pictures or anything clever, just make the thing readable in its most basic format on a Cybook.

Bookdesigner seems the easiest way(though I have previously used clit from the command line), so I opened the lit file in it and saw hard line breaks after every few words. I ticked Reformat Completely in Configuration Settings and got the book changed and it seemed to take out all the hard line breaks.

On the Cybook it reads fine, except for line breaks appearing a few times per page where they shouldn't.

Looked at it again in Bookdesigner, and turned on "show nbsp" (no idea what I was doing, just guessing) and it showed four tiny squares at the front of every rogue line break. But they also appear in front of every proper line break too.

Does anyone know what is going on and how to remove the rogue breaks and leave the normal ones?

A screenshot is attached of the LHS of the screen- the big gap is a chapter break which is OK.
Attached Thumbnails
Click image for larger version

Name:	Line breaks.jpg
Views:	202
Size:	53.8 KB
ID:	17087  
Ned is offline   Reply With Quote
Old 10-16-2008, 06:54 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 5,974
Karma: 4346919
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
"nbsp" is "nonbreaking space", it seems they are used here for indenting paragraphs, and since every hard linebreak is interpreted as a paragraph, it has added the four spaces at the beggining of each one.
Jellby is offline   Reply With Quote
 
Enthusiast
Old 10-16-2008, 09:14 AM   #3
gwynevans
Wizard
gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.
 
gwynevans's Avatar
 
Posts: 1,343
Karma: 1065246
Join Date: Nov 2007
Location: UK
Device: Sony 505 (retired), iPad2, iPhone 3GS & Nexus 7 3G
You can manually merge paragraphs by selecting them then Alt-P, I think, but you've probably reached the limit of what it can do automatically.
gwynevans is offline   Reply With Quote
Old 10-16-2008, 09:30 AM   #4
Ned
Ebook reader
Ned began at the beginning.
 
Posts: 116
Karma: 33
Join Date: Oct 2008
Location: York, England
Device: Kindle Paperwhite
Quote:
Originally Posted by gwynevans View Post
You can manually merge paragraphs by selecting them then Alt-P, I think, but you've probably reached the limit of what it can do automatically.
Thanks that's what I suspected.

Pity cos I don't want anything fancy, just the text without inappropriate linebreaks and Bookdesigner would have suited that perfectly.
Ned is offline   Reply With Quote
Old 10-16-2008, 11:20 AM   #5
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,672
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Hi Ned,
If you have MS Word you might want to try BookCreator

It's tool, --a Word template with source/marcors, to facilitate the book creation process.

Download the template file
Double click on the BookCreator.dot file.
Open up the HTML in a browser
Then cut-n-paste it to word. (You can import it but cut-n-paste removes the HTML code)


To remove page breaks in MS Word
Open up the menu "Edit|Replace..." or depress the key sequence <Ctrl>+H
In the "Find What:" text box enter "^M"
In the "Replace With:" text box leave it blank
Depress <Replaice All>

This should fix your problem.

There is a menu option that removes leading white spaces too.


Creating the PRC file.
1) If you have MobiPerl's (html2prc) then you can use the BookCreator macro
2) If you have MobiReader you do not have to do a thing as this program automatically converts word files to PRC files. Just import the file to the library and you have a PRC file.


=X=
=X= is offline   Reply With Quote
Old 10-16-2008, 11:34 AM   #6
Patricia
Reader
Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.
 
Patricia's Avatar
 
Posts: 11,520
Karma: 2199070
Join Date: May 2007
Location: South Wales, UK
Device: Sony PRS-500, PRS-505, Asus EEEpc 4G
Drop the text into Book Designer. Click on the 'Save as' option. Save as html0. Then open the html0 file. Click on 'edit with word'. Then run Stingo's word macro. Finally, reimport into Book Designer.

This isn't as complicated as it sounds.
Patricia is offline   Reply With Quote
Old 10-16-2008, 12:29 PM   #7
Ned
Ebook reader
Ned began at the beginning.
 
Posts: 116
Karma: 33
Join Date: Oct 2008
Location: York, England
Device: Kindle Paperwhite
Well Patricia that was really easy and very quick, thank you. And thank you Stingo.

Sadly, what it's done is to give me the book with no paragraphs or pagination at all. May be that it's just not a good .lit copy I started with. Can't remember where I got it.

Not important as I have a proper prc copy of Dead Souls anyway, but I was trying to establish the simplest routine I could adopt reliably for the future when I do need to convert a lit book.

Last edited by Ned; 10-16-2008 at 12:30 PM. Reason: typo
Ned is offline   Reply With Quote
Old 10-16-2008, 04:46 PM   #8
Patricia
Reader
Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.Patricia ought to be getting tired of karma fortunes by now.
 
Patricia's Avatar
 
Posts: 11,520
Karma: 2199070
Join Date: May 2007
Location: South Wales, UK
Device: Sony PRS-500, PRS-505, Asus EEEpc 4G
I'm sorry that it didn't work for you, Ned. I think it must have been a lit file directly converted from a .txt if it still had all those irritating manual line breaks.

I've had very little trouble with most lit files. Generally I can just put them into BD, assign chapter titles, click the 'insert' tab and select 'insert TOC' and the book is made. So I think that you can hope for less trouble with most future lit files.
Patricia is offline   Reply With Quote
Old 10-16-2008, 05:26 PM   #9
Pulp
Palm Addict
Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.
 
Pulp's Avatar
 
Posts: 477
Karma: 1001951
Join Date: Aug 2008
Device: Cybook Gen3 [512mb, FW: 1.5]
Did you try to open the htm0-file with a simple editor like wordpad?
If its html nonbreaking spaces they should be shown as &nbsp;
If you run replace &nbsp;&nbsp; with &nbsp; several times you should end up with single spaces instead of several.

If they are only used to intend and not between words you can even try to replace the &nbsp; with nothing to get rid of them all.
Pulp is offline   Reply With Quote
Old 10-16-2008, 05:35 PM   #10
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: 9,501
Karma: 4597184
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
Quote:
Originally Posted by Pulp View Post
Did you try to open the htm0-file with a simple editor like wordpad?
If its html nonbreaking spaces they should be shown as &nbsp;
If you run replace &nbsp;&nbsp; with &nbsp; several times you should end up with single spaces instead of several.

If they are only used to intend and not between words you can even try to replace the &nbsp; with nothing to get rid of them all.
It is not the &nbsp; (non-breaking space) that is causing the problem. They would just show a gap between the words. The problem is the extra CR/LF sequence at the end of each line that is causing the problem. That is what must be removed. Then you can attack the nbsp problem which is easily fixed as you point out.
DaleDe is offline   Reply With Quote
Old 10-16-2008, 06:17 PM   #11
Madam Broshkina
Manic Do Fuse
Madam Broshkina is a name known to allMadam Broshkina is a name known to allMadam Broshkina is a name known to allMadam Broshkina is a name known to allMadam Broshkina is a name known to allMadam Broshkina is a name known to allMadam Broshkina is a name known to allMadam Broshkina is a name known to allMadam Broshkina is a name known to allMadam Broshkina is a name known to allMadam Broshkina is a name known to all
 
Madam Broshkina's Avatar
 
Posts: 2,312
Karma: 159112
Join Date: Oct 2006
Device: Sony 500, 505, 350, Kindle 3, DXG, nook, Irex DR800SG, iPad
I have posted a PRC version of Dead Souls. It has been a while since I created a PRC book so I hope that it turned out ok.
Madam Broshkina is offline   Reply With Quote
Old 10-17-2008, 02:52 AM   #12
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: 62,559
Karma: 40125235
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Quote:
Originally Posted by DaleDe View Post
It is not the &nbsp; (non-breaking space) that is causing the problem. They would just show a gap between the words. The problem is the extra CR/LF sequence at the end of each line that is causing the problem. That is what must be removed. Then you can attack the nbsp problem which is easily fixed as you point out.
But if it starts out as a LIT file, the "underlying" format is HTML, and carriage returns are ignored in HTML - paragraphs are defined purely by "<p>" or "<div>" tags.

I would suggest using "ConvertLIT" to "explode" the LIT file to OEB, and then look at the resulting HTML source to see what's causing the line breaks.
HarryT is online now   Reply With Quote
Old 10-17-2008, 08:11 AM   #13
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 6,992
Karma: 3726689
Join Date: Oct 2007
Location: Link÷png, Sweden
Device: Nexus 7, Nexus 4, iPad 2, Notion Ink Adam Qi, Kindle WiFi, Kindle PW
Quote:
Originally Posted by Ned View Post
Does anyone know what is going on and how to remove the rogue breaks and leave the normal ones?
In lit2mobi in MobiPerl I have added some flags that fix these kind of things. But the flags are kind of hardcoded for the files I needed to convert so they might not work for your file.
tompe is online now   Reply With Quote
Old 10-28-2008, 11:10 AM   #14
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,144
Karma: 17161828
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Ned, Book Designer has a bug that if you load in a text file the paragraphs can become messed up. So if you have a text file you are trying to load in, first load it into Word and then save it as RTF and then load it. The Paragraphs will come out fine. Also if you have to do any editing that involve the line endings, Word will let you and then after you've edited it and saved as RTF, you can load into Book Designer without having your paragraphs messed up.
JSWolf is offline   Reply With Quote
Old 10-28-2008, 11:33 AM   #15
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 Patricia View Post
I'm sorry that it didn't work for you, Ned. I think it must have been a lit file directly converted from a .txt if it still had all those irritating manual line breaks.
Quote:
Originally Posted by HarryT View Post
But if it starts out as a LIT file, the "underlying" format is HTML, and carriage returns are ignored in HTML - paragraphs are defined purely by "<p>" or "<div>" tags.

I would suggest using "ConvertLIT" to "explode" the LIT file to OEB, and then look at the resulting HTML source to see what's causing the line breaks.
From personal experience, a lot of .txt to .html conversions for inclusion in a .lit file have this problem. So we have Garbage In-GarbageOut and reconversions become problematic!

Basically, the original CR/LF line endings in the .txt file were mindlessly just converted to <br>, and thus any attempt to salvage this situation using the exploded .html from a .lit should address this issue.

In a text editior, open the .html and search and replace all: <br>\n with a "space" or just nothing
[i.e. search for <br> followed by a newline character and replace with a space or nothing (whichever works better). Note: sometimes the newline may not exist, so search without it, in those cases]

Last edited by nrapallo; 10-28-2008 at 11:36 AM.
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
get rid of blank line html code Blurr Calibre 4 12-28-2009 09:20 PM
No line breaks ecpepper Amazon Kindle 3 08-09-2009 06:42 PM
Getting rid of battery status line colonel Sony Reader Dev Corner 7 04-22-2009 10:12 AM
BookDesigner Page Breaks - Not Sticky Brandon202000 Sony Reader 1 12-09-2007 03:08 PM
Bookdesigner and line spacing question Texfire Sony Reader 4 03-23-2007 06:58 PM


All times are GMT -4. The time now is 03:22 AM.


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