At 09:18 AM 7/19/2005, Elena Fraboschi <[EMAIL PROTECTED]> wrote:
So, I have been delving into ConTeXt, and I like its syntax: far "cleaner" than LaTeX. I have also read that there is work in progress
to convert XML to ConTeXt --- my question is, any thoughts, hints,
recommendations about reverse-engineering, that is, from ConTeXt to
XML?  If the IUMJ switched production to ConTeXt, we would still want
to preserve on "archival" copy in XML.

I'm reminded of a presentation that Kaveh Bazargan (from River Valley Technologies) gave at the PracticalTeX 2004 conference on a LaTeX/XML process they use, but unfortunately he hasn't provided any paper to go with his presentation.

One of the things, though, that I specifically remember was that, since they also were archiving XML, their process specifically converted the authors' LaTeX to XML (specifically with the mathematics in MathML, rather than as embedded LaTeX as I know some publishers do), and then converted that from XML back to LaTeX and thence to PDF (or Postscript, possibly) for actual production -- thus guaranteeing that the archival XML would in fact reproduce the production versions exactly.

With a workflow like that, I'm not certain how much conversion from ConTeXt to XML will be necessary -- you'll probably, at least for the time being, still be getting author submissions in LaTeX. You could then convert that to XML using a version of your present process, adjust the XML as needed to fit your standards, archive the XML, and then dump the XML into an automated sort of process that converts it to ConTeXt and thence to PDF, html, and whatever else you need.

The only requirement, then, is that the XML -> ConTeXt -> PDF workflow not involve any manual adjustments to the ConTeXt code -- all manual changes would need to be made in the XML. (That may be a good idea anyway, as it guarantees that the XML is always the "true" version.)

(As of now we translate LaTeX to XML using "hermes", but it would
not work with ConTeXt.)  If nothing is contemplated in the
area of *from ConTeXt to XML", might this strategy work

ConTeXt -> pdf - pdf to XML ?

I suspect that, insofar as it worked, you'd probably lose most of the metadata (this is a section header, this is a subsection header, etc.) unless it was a PDF to XML converter that was very specific to your particular PDF files.

...

On a different note, it may be worth pointing out that ConTeXt's support for typesetting of complicated equations -- that is, the sort of stuff for which one really wants the AMSmath package in LaTeX -- really isn't especially great; it's pretty much limited to the capabilities of Plain TeX. I'm currently working (very slowly) on trying to improve this by doing a port of AMSmath to ConTeXt, but I have no idea how compatible that will be with ConTeXt's MathML/XML support, nor when I'd have it to a point where it would be ready for production work.

The other alternative I know of for doing math in XML is embedding bits of LaTeX code within the XML. Since most "conversion to non-PDF formats" involves converting the math to bitmap images anyway (or, at least, any conversion to HTML for the web does!), I don't think that's really complicating things much. It's certainly possible in theory to embed LaTeX-coded equations in ConTeXt, and there's a small bit of comment on this on the Wiki. In practice, it may take a bit of coding to make work, but the amount won't be excessive.

...

And, on yet a third note, you might find it useful to talk to Steve Grathwohl at the Duke University Press -- he was also at the PracticalTeX 2004 conference, and had clearly "caught the ConTeXt bug", and I suspect he may well have some useful practical experience in this area.

- Brooks

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to