Open kjambunathan opened 3 years ago
The OpenDocument writer is a very old part of pandoc. I've never really understood why automatic styles were used (though there probably is some explanation), but the original author of that module isn't in touch any more. Unfortunately I don't know a lot about opendocument format, so I'm not inclined to touch the writer myself, but this would be a great project for someone who does know opendocument.
OpenDocument.hs: When using well-known inlines styles, it should emit well-known style names (and NOT automatic styles)
I am using
org-citeproc
[1] that useswriteOpenDocument
in standalone mode to produce the output.And the problem is ... in standalone mode only the odt xml body is emitted, but not the styles. Not emitting the automatic style definitions is OK, as they aren't part of body, but with NO access to style information, a consumer who wants to use that XML fragment is at a loss on what style names like
T1
etc stand for. It would be better if instead of 'T1', the OpenDocument emits well-known style names like Emphasis, Strong etc, or rather PandocEmphasis, PandocStrong etc. [2]A cursory look at the
OpenDocument.hs
shows that even the style definitions of T1, T2, T3 are NOT stable, in the sense that T1 can mean an emphasis style when exporting one document, but can mean strong in another document i.e., The order of naming depends on the order in which a span style is seen during the export.)Note the use of T1.
Here is a sample output from the HTML writer.
[1] https://github.com/kjambunathan/org-citeproc.
This is a very old
org-citeproc
by Richard Lawrence which i have modified to compile against recent monadic changes.[2] Emacs' Orgmode ODT exporter---of which I am the sole author--uses well-known styles, instead of automatic styles for bold, italic styles etc.