11-11-2008, 05:55 PM | #1 |
Wizard
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= |
11-11-2008, 05:57 PM | #2 |
Grand Sorcerer
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
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?
|
11-11-2008, 06:46 PM | #3 | |
Wizard
Posts: 3,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
|
Quote:
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; Code:
<div style="page-break-before:always"> Code:
DIV {font-size: medium; page-break-before: always;} Code:
////////// HTML CODE ////////////////// <p class="pb">*</p> // CSS CODE .pb { page-break-before: always; } Please ignore the highly technical content in the LIT/MOBI files the text is only for display purposes Last edited by =X=; 11-11-2008 at 06:55 PM. |
|
11-11-2008, 09:06 PM | #4 |
Zealot
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.
|
11-12-2008, 02:32 PM | #5 |
Wizard
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= |
11-13-2008, 07:34 AM | #6 |
The Grand Mouse 高貴的老鼠
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.
|
11-13-2008, 10:55 AM | #7 |
Zealot
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. |
11-13-2008, 11:08 AM | #8 |
Grand Sorcerer
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.
|
|
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 |