On Wed, 30 Jan 2013 14:48:15 -0700, Thomas A. Schmitz
On 01/30/2013 10:12 PM, Aditya Mahajan wrote:
On Wed, 30 Jan 2013, Bill Meahan wrote:
An XSLT stylesheet would allow direct export of a document from LO-W which could then be be tweaked if necessary.
Another option is to uncompress the odt file (IIUC, it is just a zip), and process it directly in ConTeXt (http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf).
This approach is more flexible than XSLT stylesheets, but it ties you to ConTeXt (with XSLT, in principle, you can switch to other formats relatively easily).
In essence it boils down to understanding the ODT XML Schema and figuring out the mapping to context commands.
Ah, it sounds so simple, doesn't it? :D
I am no expert here, but I have tried this approach a while ago when I was typesetting an edited volume. The authors sent me MS Word files, which I saved as OOO. But the xml in open office was just too messy to deal with. It doesn't provide logical structure, but tries to recreate the visual output, so you get dozens of different <span type="this"> and <span type="that"> elements which may be completely irrelevant. And whenever I thought I had figured out what some cryptic abbreviation (say, <span font="T6">) meant ("italic"), I then learnt that in the next document I opened, it may mean something completely different. I would be interested in finding a fully automated work flow, but I'm somewhat sceptical that it exists. And don't even think about round-trip conversion, I don't think this will be possible.
In light of years spent as the editor of an academic journal, with the corresponding pain involved in converting countless doc-file contributions to odt to context, I have to agree with Thomas. Of course Bill is apparently the author of the files he wishes to convert, so he can impose some structural discipline on his own odt work -- and perhaps teach his wife to write in the same style ;-) But in general odt is too much of a mess for my limited skills. And although Bill does not "like it in the least" I am not aware of a better cross-format solution than markdown/pandoc whenever I am forced to deal with M$-Word workflows and ConTeXt in my own writing. If I can go out on a limb: What Bill seems to want is a general WYSIWYG->ConTeXt solution. Generalizing Thomas's remark, I'm not sure that the word-processor paradigm is appropriate for such a thing (unless one is very disciplined in using the word processor). But a WYSIWYG structured layout processor like Framemaker (is there some free imitation out there?) may output xml that is more regular, predictable, and easier to map to ConTeXt than any M$-Word imitation. Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523