View Single Post
Old 02-15-2010, 05:15 PM   #2
superanima
W2E & ePub freak
superanima began at the beginning.
 
Posts: 38
Karma: 10
Join Date: May 2009
Device: cybook gen3 + boox60
I just found an interesting thing:
in one odt file, in the content.xml there is an <office:automatic-styles> declaration like this:

Code:
	<style:style style:name="P2" 
		style:family="paragraph" 
		style:parent-style-name="Standard">
			<style:paragraph-properties 
			fo:margin-left="3cm" 
			fo:margin-right="4.001cm" 
			fo:margin-top="1.499cm" 
			fo:margin-bottom="2.499cm" 
			fo:text-indent="5.001cm" 
			style:auto-text-indent="false"/>
			<style:text-properties 
				fo:font-size="14pt"/>
	</style:style>
I converted this odt to epub using calibre. Then I uncompressed it, and into the stylesheet.css I found this:

Code:
.P-P2 {
    background-color: white;
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-family: "Times New Roman", serif;
    font-size: 14pt;
    margin-bottom: 0;
    margin-left: 3cm;
    margin-right: 4.cm;
    margin-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    text-indent: 1.5em
    }
Code:
margin-top
and
Code:
margin-boottom
values are vanished, replaced with 0.
That's why you lose the margins!

a simple manual change of styles.css with my values and now I have the epub that I wanted....

I don't get it, is this wanted, or is a bug? I'm opening a ticket
superanima is offline   Reply With Quote