Attributes lost from hierarchical custom style when converting from ODT to EPUB
Hi,
When converting an ODT document which uses hierarchical custom styles, the attributes like font-size or text-align are not taken over in the first phase of ebook-convert.
Versions used: Ubuntu 14.04 LTS, LibreOffice 4.2.8.2 and Calibre 2.32.1
The doc file has among others, 3 custom styles: roman.description, roman.dialogue and roman.discussion, in that hierarchical order.
Font-size 13pt, justified for roman.description; plus list style InciseDialog for roman.dialogue; plus italic for roman.discussion.
When converting with ebook-convert, the result in the directory input, files index.xhtml and odfpy.css, are already wrong:
- the style roman.discussion is rendered in index.xhtml as "<p class="P-roman_discussion c_odt4">" instead of just "<p class="P-roman_discussion">".
In odfpy.css:
- P-roman_description is OK
- P-roman_dialogue has no "text-align: justify;" attribute
- P-roman_discussion is not there, and the complementary c_odtN has a font-size of 12pt and no justification.
The file TestCal.zip has the necessary file to show the behaviour, just unzip it in an empty directory and run it as ./show_bug_cal.sh
I hope a solution can be found, because I really like the whole lot of Calibre programs. From my current tests, it seems it's not enough to have the styles non hierarchical, but I have to confirm that point.
Thx in advance for your advices,
Bernard
|