I need to include a transformed XML document into my LaTeX source. Transformation is specified inside the XML via XSLT. I recently started using LaTeX and I have bib database in XML. However, this XML file contains a lot more information than a .bib file can contain (or should contain).

Therefore, it looks like one of these will do the trick:

  • Including transformed XML text directly (which will produce well formed .bib file)
  • Including a program output (which will output well formed .bib file)

I have seen options like running application before and obtaining results using .bat or makefiles. However, I will consider these as last resort because it will not be portable. Other people receiving my file should change their editor settings to be able to compile it.

  • I'm forbidden from telling you that ConTeXt can handle XML, so you should probably use that instead of LaTeX. – Martin Schröder Sep 20 '11 at 18:37
  • :) I found a bad solution, but i will keep the question open if there is a way to do it better. – Cem Kalyoncu Sep 21 '11 at 12:59
  • Would you mind sharing your solution with the community? – doncherry Oct 13 '11 at 13:26

As Martin already pointed out, ConTeXt can handle XML.

Another solution would be to use LuaTeX and write a custom parser in Lua or use a library for that purpose. The options are endless. If you write a custom function in Lua it is at least portable to users of LuaTeX and furthermore a very flexible solution.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.