Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 11-11-2008, 05:55 PM   #1
=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,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
MobiPerl: LIT2MOBI page breaks don't work

Well the title says it all.

I've noticed when I convert LIT files to MOBI files the page breaks are not preserved. I am I doing something wrong or is this a know issue.

=X=
=X= is offline   Reply With Quote
Old 11-11-2008, 05:57 PM   #2
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: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by =X= View Post
Well the title says it all.

I've noticed when I convert LIT files to MOBI files the page breaks are not preserved. I am I doing something wrong or is this a know issue.
I did not know that lit files had page breaks. Are they preserved in the exploded html code and how are they coded in the html code in that case?
tompe is offline   Reply With Quote
Old 11-11-2008, 06:46 PM   #3
=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,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quote:
Originally Posted by tompe View Post
I did not know that lit files had page breaks. Are they preserved in the exploded html code and how are they coded in the html code in that case?
hey! Your not suppose to ask me the hard questions. I'm just suppose to wine and complain.


Just kidding.

I've looked at several different LIT files they all seem to use the following style sheet syntax.


Code:
	page-break-before: always;
	page-break-after: always;
This is full HTML so I've seen this tag placed in style sheets or have used the style sheet embedded command

Code:
<div style="page-break-before:always">
or like
Code:
DIV {font-size: medium;
	page-break-before: always;}
or like
Code:
 
////////// HTML CODE //////////////////
<p class="pb">*</p>

// CSS CODE

.pb  {
 page-break-before: always;
}
I've uploaded a small LIT example created with WordRMR. And MOBI file created from LIT2MOBI.

Please ignore the highly technical content in the LIT/MOBI files the text is only for display purposes
Attached Files
File Type: zip LIT_TEST.zip (254.3 KB, 429 views)
File Type: prc Test.prc (48.0 KB, 440 views)

Last edited by =X=; 11-11-2008 at 06:55 PM.
=X= is offline   Reply With Quote
Old 11-11-2008, 09:06 PM   #4
Snowman
Zealot
Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.
 
Posts: 106
Karma: 3566
Join Date: Aug 2008
Location: London UK
Device: iPhone 5, Kindle K3, Kindle Voyage
Interesting. If you decompile the .prc with mobi2oeb, then recompile with mobigen or creator without making any changes (apart from adding language and genre - I used 'horror' - to the opf), it works perfectly.
Snowman is offline   Reply With Quote
Old 11-12-2008, 02:32 PM   #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,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Hey thanks for the tip. I used the decompiled OPF of the LIT and it produced a well formatted MOBI file.

=X=
=X= is offline   Reply With Quote
Old 11-13-2008, 07:34 AM   #6
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,506
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Mobipocket Creator certainly changes the HTML when creating the .mobi file. One thing I've found is that it does handle (some) CSS styles, including converting page-break-before:always into its own page break code.


Quote:
Originally Posted by Snowman View Post
Interesting. If you decompile the .prc with mobi2oeb, then recompile with mobigen or creator without making any changes (apart from adding language and genre - I used 'horror' - to the opf), it works perfectly.
pdurrant is offline   Reply With Quote
Old 11-13-2008, 10:55 AM   #7
Snowman
Zealot
Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.Snowman can teach chickens to fly.
 
Posts: 106
Karma: 3566
Join Date: Aug 2008
Location: London UK
Device: iPhone 5, Kindle K3, Kindle Voyage
And creator/mobigen is *very* idiosyncratic (read "brain-damaged") over what it will and won't silently ignore. For example:

<br style="page-break-after: always;" /> good
<br style="page-break-after: always;"> bad

compare with

<mbp;pagebreak /> good
<mbp;pagebreak> also good.
(colon ':' replaced with semi-colon ';' to prevent smiley).

Also of note - and annoyance - is style 'margin-top'. This implies that 'margin-bottom' is also supported. It is, sorta. What actually happens is that the attribute is actually added to the margin-top of the *next* block element IF that element supports it. If it doesn't, then the margin-bottom is lost. In reality, margin-top is implemented as the obsolescent "height".

And let us not even think about what mobi does to <h1> to <h6>.

I could go on. And on.

ARRRRRRGGGGGGHHHHH !!

Snowman then confesses that mobi format is what he uses for desktop, phone, and cybook. Although he does store the initially extracted oeb as the primary source.
Snowman is offline   Reply With Quote
Old 11-13-2008, 11:08 AM   #8
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: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Style sheet support is bad in MobiPerl. I added a ticket for this so it will not be forgotten.
tompe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page breaks in ebooks, Yes or No? nomesque General Discussions 30 06-12-2010 06:43 AM
Page breaks enarchay Calibre 18 05-31-2009 06:57 PM
losing page breaks rholscher Calibre 8 04-16-2009 09:44 AM
eb1150 and page breaks sea2stars Fictionwise eBookwise 10 09-13-2007 01:28 PM
Page breaks in Plucker? K12 Handhelds Reading and Management 2 02-19-2005 03:05 PM


All times are GMT -4. The time now is 11:32 PM.


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