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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-01-2010, 02:57 PM   #1
Piper_
~~~~~
Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.
 
Piper_'s Avatar
 
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
Lines became paragraphs after .lit to .mobi conversion

First, thanks so much for Calibre and all these informative threads. As a newbie, I'd have been lost without all of you.

I've finally found a problem I can't find the answer to.

I converted an old .lit ebook I had to .mobi, and every line became a paragraph.

What is the most efficient way to remove those line feeds (assuming that's what they are - I think my sister used Word to save to .lit), without losing all paragraphs?

Thanks!
Piper_ is offline   Reply With Quote
Old 09-01-2010, 04:33 PM   #2
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
Every problem has at least three solutions.

The quick and dirty:

Convert to txt and from txt to mobi. In the final step make sure that the option to "Treat each line as a paragraph", in preferences for TXT input, is not activated. The "dirty" part is that you will loose all other formatting.

The slow but "better" way:

Convert to html and do a series of search-and-replaces using a good editor. That is the tricky part. You will have to examine the html to see what searches will work. First try to do find and replaces on all the correct paragraph tags and replace them with a special mark, like "PARASTART" and "PARAEND" there. Then remove all para tags. And replace PARASTRAT with a start paragraph tag, and PARAEND with a and paragraph tag. It might be easier to start by doing a search-and-replace for all the bad paragraph tags, and replacing them with a space instead. Whatever works... Finally convert to mobi.

The third way is the lazy way. Ignore the problem or get someone else to fix it.

Ask your sister to fix the word-file so the paragraphs are right from the start.
Adoby is offline   Reply With Quote
Advert
Old 09-01-2010, 05:27 PM   #3
Piper_
~~~~~
Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.
 
Piper_'s Avatar
 
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
Thanks, Adoby. I was afraid of that. lol

I was hoping Calibre had a switch for it, or maybe Sigil would. (I haven't installed Sigil, but would if it would help.)

Anyway, I'll go try the second way first, and if it's too tedious, I'll go for the first.


- edit - Ack. I don't see HTML as an option to convert to.

Last edited by Piper_; 09-01-2010 at 05:29 PM.
Piper_ is offline   Reply With Quote
Old 09-01-2010, 09:00 PM   #4
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
I just ran into this for some lit files of my own, and have been working on some tweaks to calibre to fix this with the preprocess option. I can try to get the changes checked in so they get in one of the next couple releases.
ldolse is offline   Reply With Quote
Old 09-01-2010, 09:21 PM   #5
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,188
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Piper_ View Post
Thanks, Adoby. I was afraid of that. lol

I was hoping Calibre had a switch for it, or maybe Sigil would. (I haven't installed Sigil, but would if it would help.)

Anyway, I'll go try the second way first, and if it's too tedious, I'll go for the first.


- edit - Ack. I don't see HTML as an option to convert to.
To convert from LIT to HTML you need to re-run your LIT to MOBI conversion with Calibre's Convert - Debug option.

Enter the name of a directory on the Debug page.

After the conversion has finished ignore the MOBI and go and look in the Input sub-directory of your named Debug directory. It will contain the HTML extracted from your LIT.

Then edit away. Once it's clean reimport the HTML into Calibre and use this as your master source rather than the LIT.
jackie_w is offline   Reply With Quote
Advert
Old 09-01-2010, 09:25 PM   #6
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: 73,779
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The best way to do this is to convert to ePub using no margins. Then fix up the ePub and once it's fixed up, convert to Mobipocket from there.
JSWolf is offline   Reply With Quote
Old 09-01-2010, 09:31 PM   #7
Piper_
~~~~~
Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.
 
Piper_'s Avatar
 
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
Thanks, Jackie. I'll give that a shot.
Piper_ is offline   Reply With Quote
Old 09-01-2010, 09:34 PM   #8
Piper_
~~~~~
Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.
 
Piper_'s Avatar
 
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
JSWolf, that sounds even better! I'll try that first. lol
Piper_ is offline   Reply With Quote
Old 09-14-2010, 11:00 AM   #9
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: 73,779
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Piper_ View Post
JSWolf, that sounds even better! I'll try that first. lol
How did the LIT > ePub > Mobi conversion go?
JSWolf is offline   Reply With Quote
Old 09-16-2010, 08:31 PM   #10
Piper_
~~~~~
Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.
 
Piper_'s Avatar
 
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
Quote:
Originally Posted by JSWolf View Post
How did the LIT > ePub > Mobi conversion go?
It didn't. There was a </p> <p> duo between every line. Worse, it was the same single duo between paragraphs, so compressing sentences meant losing paragraphs too.

I'm sure she just hit the wrong setting in Word when she converted to .lit, so I asked her to redo it for me. She said she would. We'll see.

Thanks for asking, JS.
Piper_ is offline   Reply With Quote
Old 09-17-2010, 01:32 AM   #11
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Did you try enabling the preprocess option under structure detection? One of the things it does is attempt to fix lit files that are formatted like this.

I think that the code may not have been checked in when you initially posted this, so it may not have worked then, but it is now.
ldolse is offline   Reply With Quote
Old 09-19-2010, 05:11 PM   #12
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: 73,779
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Word made LIT files can be a real mess. The best way to handle it is to use Calibre to convert to OEB and then fix up the mess and then try to convert to ePub.
JSWolf 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
Blank lines between paragraphs? ascherjim OpenInkpot 30 12-03-2009 12:19 AM
Removing blank lines between paragraphs? corroonb Workshop 3 08-13-2009 04:23 PM
Preserving TOC upon conversion from Lit to Mobi mobelby Calibre 0 07-31-2009 07:59 AM
Insert Blank Lines Between Paragraphs Timoleon Calibre 14 03-22-2009 02:43 PM
How to eliminate blank lines between paragraphs with Calibre Mr. Goodbar Calibre 8 06-02-2008 07:39 AM


All times are GMT -4. The time now is 05:24 PM.


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