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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-11-2008, 06: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,672
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, 06: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,129
Karma: 4315826
Join Date: Oct 2007
Location: Link÷png, Sweden
Device: Nexus 7, Nexus 5, iPad 2, 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 online now   Reply With Quote
 
Advertisement
Old 11-11-2008, 07: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,672
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, 192 views)
File Type: prc Test.prc (48.0 KB, 190 views)

Last edited by =X=; 11-11-2008 at 07:55 PM.
=X= is offline   Reply With Quote
Old 11-11-2008, 10:06 PM   #4
Snowman
Connoisseur
Snowman doesn't litterSnowman doesn't litter
 
Posts: 97
Karma: 196
Join Date: Aug 2008
Location: London UK
Device: iPhone 5, Kindle K3
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, 03: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,672
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, 08: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: 32,837
Karma: 89897838
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
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, 11:55 AM   #7
Snowman
Connoisseur
Snowman doesn't litterSnowman doesn't litter
 
Posts: 97
Karma: 196
Join Date: Aug 2008
Location: London UK
Device: iPhone 5, Kindle K3
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, 12:08 PM   #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,129
Karma: 4315826
Join Date: Oct 2007
Location: Link÷png, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Style sheet support is bad in MobiPerl. I added a ticket for this so it will not be forgotten.
tompe is online now   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
Page breaks in ebooks, Yes or No? nomesque General Discussions 30 06-12-2010 07:43 AM
Page breaks enarchay Calibre 18 05-31-2009 07:57 PM
losing page breaks rholscher Calibre 8 04-16-2009 10:44 AM
eb1150 and page breaks sea2stars Fictionwise eBookwise 10 09-13-2007 02:28 PM
Page breaks in Plucker? K12 Handhelds Reading and Management 2 02-19-2005 04:05 PM


All times are GMT -4. The time now is 03:00 PM.


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