dagwieers / asciidoc-odf

ODF backend for AsciiDoc
98 stars 26 forks source link

Implement stylesheet merging support #3

Open dagwieers opened 13 years ago

dagwieers commented 13 years ago

One use-case for the ODF backend is to allow to merge the styles from an existing ODT or OTT document during conversion. This helps end-users to make visual modifications to a document and then save that document to use the styles in future conversions (using a2x).

For zipped ODT files this would mean extracting the styles.xml and including it with the new document. For flat ODT files, the proper XML-pieces need to be extracted and inserted into the new ODT document.

dagwieers commented 13 years ago

elextr already implement support for this in a2x, although more testing is needed, and asciidoc requires the proper changes added for it to work out-of-the-box with asciidoc.

elextr commented 12 years ago

Note also that it is implemented the other way around, the whole base or template document is copied and then the contents replaced by the contents generated by Asciidoc. It is done this way as Libreoffice seems somewhat picky about missing all the other application specific files in the package.

dagwieers commented 12 years ago

I tested now an 'improved' implementation that finally generates a working ODT file !

But the styles look different and the meta-information is missing. So we're not quite there yet :-/