Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I know that XMLTeX has already been used to typeset TEI documents, but has anyone publicly worked on a set of environment files and stylesheets to typeset OpenDocument Text? I have been looking for such things lately but could not find anything.

The rationale is that I want a comprehensive solution for typesetting ODT documents produced by OpenOffice and LibreOffice without having to rely on XSLT. Writer2LateX does a great job in some situations, but for more consistency and efficiency I deem it eminently desirable to be able to define the style of an ODT document directly in TeX and then apply this style to a set of documents that have the same structure and use the same styles.

Writer2LaTeX uses Java, XSLT and components from the OpenOffice SDK to produce a relatively faithful LaTeX document from the provided ODT; this means that every time the source ODT is modified, a new LaTeX document must be produced from it, with all content and all styles converted each time. What is more, Writer2LaTeX must more or less “reinvent the wheel” each time it is given a new paragraph, character or list style, resulting in environment and command definitions which are extremely verbose. It would be great to instead create concise and generic environment definitions for each ODT element and then create more detailed definitions for each style attribute.

Am I making sense? I am aware of the fact that what I am asking for is huge. After all, to get the expected results, one would have to provide definitions for all the elements of all the relevant XML namespaces (a typical ODT file has many besides the standard ODF 1.2 namespaces). However, if someone provided those generic element definitions “once and for all”, then the person who is in charge of typesetting a given document could concentrate on defining environments for the particular styles encountered in the particular document.

share|improve this question
    
ooh xmltex:-) If I was doing this I'd use XSLT, it really is a lot easier to get XSLT to handle the XML re-arrangement and write out some tex rather than get TeX to do it at the same time. –  David Carlisle Mar 20 '13 at 16:31
    
Oh, now that is an interesting comment, considering the person who makes it :-). So would it arguably be better to improve writer2LaTeX’s XSLT instead? –  Christian Gagné Mar 20 '13 at 16:56
1  
I haven't looked at their XSLT, but that's where I'd start. –  David Carlisle Mar 20 '13 at 18:25
1  
Seriously: Forget about XMLTeX and use ConTeXt instead. Or use pandoc. –  Martin Schröder Mar 21 '13 at 12:45
2  
See ConTeXt wiki article on typesetting TEI to get an idea of how to typeset xml using context –  Aditya Aug 19 '13 at 15:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.