[Haskell-cafe] Re: Pandoc questions

Andrew Coppin andrewcoppin at btinternet.com
Sat Oct 18 04:21:54 EDT 2008

John MacFarlane wrote:
>>> 1. Nobody has written the LaTeX -> MathML code yet, and I've been too
>>> lazy.  Anyone who is interested in doing this should get in touch.
>> Well, I'd certainly be "interested". I use mathematics *a lot* in my  
>> writing. Presumably modifying a large program like Pandoc is intractably  
>> difficult though?
> Just write a separate library that parses LaTeX input and returns MathML
> output. Pandoc could then use this library. So you wouldn't need to know
> anything about pandoc's internals. Just write a function 
> teXMathToMathML :: String -> String. 
> This would be a great contribution!  You could get a head start by
> looking at the LaTeXMathML.js code.

OK. I'll give that a go at some point...

> I think it makes good sense to use LaTeX, which is already designed to
> be natural but flexible, and is already known by most mathematicians.

Seems like a valid argument.

> My guess is that in designing a more natural format, one would
> eventually reinvent something like LaTeX...

I would dispute that. I don't think anybody will claim that 
"\DeclareMathOperator{\erf}{erf}" is natural or intuitive, nor the 
low-level trickery required to correctly typeset arrays and so forth. 
(Look at how LaTeX typesets tables. Now look at how Markdown does it. Yeah.)

Even so, designing something better is probably a research project 
[since typeset mathematics uses *so* many obscure symbols and advanced 
typesetting conventions, and ASCII is woefully unable to cope]. Using 
LaTeX is probably a very useful step in the right direction.

More information about the Haskell-Cafe mailing list