Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-14-2010, 01:28 PM   #1
superanima
W2E & ePub freak
superanima began at the beginning.
 
Posts: 38
Karma: 10
Join Date: May 2009
Device: cybook gen3 + boox60
little issue converting from odt to epub (top and bottom margin)

Hi,
in openoffice writer, you define a style (named "mystyle" for example) that is just like the standard one, except that it have top or bottom margins, or both. Well, when you convert it to epub calibre detect that paragraph as the standard one, and you lose the margin.

did anyone have a solution, that not implies to *not* use styles?

bests

Last edited by superanima; 02-14-2010 at 02:34 PM.
superanima is offline   Reply With Quote
Old 02-15-2010, 04: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
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Top Margin in epub penguintri ePub 8 05-08-2010 08:37 PM
ePub and top margin specification tompe Upload Help 6 01-02-2010 11:24 AM
calibre ignore margin-top and margin-bottom bender Calibre 2 12-11-2009 06:58 AM
Converting ODT to EPUB/LRF banjomike Calibre 2 10-03-2009 04:32 PM
PRS-500 RasterFarian issue with top and bottom lines on reader cyberock Sony Reader Dev Corner 0 07-08-2007 03:56 PM


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


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