Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-24-2009, 10:18 AM   #1
TheD0ct0r
Enthusiast
TheD0ct0r began at the beginning.
 
Posts: 35
Karma: 12
Join Date: Nov 2009
Device: Kindle
Hyphenation issue with some lit-Mobi conversions

I am really hoping I have missed something simple. On some lit books, when converting them to Mobi, every line gets hypenated, and not in the correct location. (See screenshot) Is there a setting in Calibre I am missing to prevent this?
Attached Thumbnails
Click image for larger version

Name:	Example.jpg
Views:	317
Size:	84.0 KB
ID:	39959  
TheD0ct0r is offline   Reply With Quote
Old 11-24-2009, 10:46 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The hyphenation is probably present in the original LIT file. In that case calibre just carries it over to the output file.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-24-2009, 11:16 AM   #3
TheD0ct0r
Enthusiast
TheD0ct0r began at the beginning.
 
Posts: 35
Karma: 12
Join Date: Nov 2009
Device: Kindle
No, the hyphens will move as I resize the reader window.
TheD0ct0r is offline   Reply With Quote
Old 11-24-2009, 11:30 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This is in what reader?
kovidgoyal is offline   Reply With Quote
Old 11-24-2009, 12:10 PM   #5
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,496
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
My guess would be that the original file was chock full of discretionary hyphens, which the mobi reader is using to nicely justify the lines. Sadly without any sensible check on the number of hyphens it's sensible to use.

Quote:
Originally Posted by TheD0ct0r View Post
No, the hyphens will move as I resize the reader window.
pdurrant is offline   Reply With Quote
Advert
Old 11-24-2009, 12:45 PM   #6
TheD0ct0r
Enthusiast
TheD0ct0r began at the beginning.
 
Posts: 35
Karma: 12
Join Date: Nov 2009
Device: Kindle
No again. Attachment 1 is what Calibre shows the original lit file looks like. Attachment 2 and 3 show the Mobi converted file. Notice that the hyphens, which do not exist in the original file, are moving based upon where the edge of the reader is.

This does not happen on all lit files, only some of them.
Attached Thumbnails
Click image for larger version

Name:	Example1.jpg
Views:	293
Size:	69.8 KB
ID:	39973   Click image for larger version

Name:	Example2.jpg
Views:	317
Size:	69.6 KB
ID:	39974   Click image for larger version

Name:	Example3.jpg
Views:	321
Size:	66.7 KB
ID:	39975  
TheD0ct0r is offline   Reply With Quote
Old 11-24-2009, 12:51 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Do the hyphens appear if you view the file in the calibre viewer?
kovidgoyal is offline   Reply With Quote
Old 11-24-2009, 12:56 PM   #8
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,496
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Can you export to something where you can look at the HTML? Or post the mobipocket or lit file if it's not commercial.

I've never seen mobipocket reader with the behaviour shown in your screen shots, so I'm still guessing loads (enormous numbers) of discretionary hyphens.


Quote:
Originally Posted by TheD0ct0r View Post
No again. Attachment 1 is what Calibre shows the original lit file looks like. Attachment 2 and 3 show the Mobi converted file. Notice that the hyphens, which do not exist in the original file, are moving based upon where the edge of the reader is.

This does not happen on all lit files, only some of them.
pdurrant is offline   Reply With Quote
Old 11-24-2009, 02:58 PM   #9
TheD0ct0r
Enthusiast
TheD0ct0r began at the beginning.
 
Posts: 35
Karma: 12
Join Date: Nov 2009
Device: Kindle
Quote:
Originally Posted by kovidgoyal View Post
Do the hyphens appear if you view the file in the calibre viewer?
No. The text extends off the reading screen, same as it does when viewing the lit file.
TheD0ct0r is offline   Reply With Quote
Old 11-24-2009, 03:27 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by TheD0ct0r View Post
No. The text extends off the reading screen, same as it does when viewing the lit file.
Then it's definitely something MOBI reader is doing.
kovidgoyal is offline   Reply With Quote
Old 11-25-2009, 09:00 AM   #11
TheD0ct0r
Enthusiast
TheD0ct0r began at the beginning.
 
Posts: 35
Karma: 12
Join Date: Nov 2009
Device: Kindle
This isn't being done by the reader. It has to be something in the way the .lit document is formatted. If I read some .lit documents in the Calibre viewer, the sentences wrap properly. Others don't. It's like the "Word Wrap" option in Notepad. Those that don't wrap in the Calibre viewer will have all the hyphens when the MOBI reader or my Kindle tries to wrap the text. Those that properly wrap in the Calibre viewer will also properly wrap in the MOBI reader and on my Kindle.

I turned on "Debug" mode in Calibre and looked at the output .html documents at various stages of the cobnversion, and I get the same results. The problem documents do not word wrap in the HTML documents when viewed in IE. Is there a setting that controls this?

Last edited by TheD0ct0r; 11-25-2009 at 09:24 AM.
TheD0ct0r is offline   Reply With Quote
Old 11-25-2009, 09:28 AM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Your Lit file probably is really a txt file,which means all its content is put into a <pre> tag which is why it wont wrap. But the hyphens are being inserted by mobi reader, probably because it forces hyphenation.

Just look at the html in the input debug directory and change the <pre> tag to <p> then convert that html, the problem should go away.
kovidgoyal is offline   Reply With Quote
Old 11-25-2009, 09:48 AM   #13
TheD0ct0r
Enthusiast
TheD0ct0r began at the beginning.
 
Posts: 35
Karma: 12
Join Date: Nov 2009
Device: Kindle
Already tried that. It did solve the hyphenation issue. Unfortunately, it also eliminated ALL the paragraphs, resulting in one long line of text for the whole book. Any other ideas?
TheD0ct0r is offline   Reply With Quote
Old 11-25-2009, 09:51 AM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
you can copy paste the contents of the pre tag into a .txt file and convert that
kovidgoyal is offline   Reply With Quote
Old 11-25-2009, 09:58 AM   #15
TheD0ct0r
Enthusiast
TheD0ct0r began at the beginning.
 
Posts: 35
Karma: 12
Join Date: Nov 2009
Device: Kindle
Quote:
Originally Posted by kovidgoyal View Post
you can copy paste the contents of the pre tag into a .txt file and convert that
That worked! Thanks for the help.



Can I add an enhancement request to have Calibre be able to handle the <PRE> tag?
TheD0ct0r is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversions from RTF (to mobi/epub) Gwen Morse Calibre 6 10-14-2010 06:00 AM
pdf to mobi conversion issue dkritso109 Kindle Formats 9 10-06-2010 05:03 PM
HTML to Mobi conversions (DocBook XSL, and content.opf?) AndrewLB Calibre 3 09-04-2010 09:02 PM
Issue converting .MOBI to .LRF sea_los Calibre 2 06-17-2009 12:20 AM
Mobi Hyphenation brewt Kindle Formats 3 07-06-2008 10:20 AM


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


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