[Haskell-cafe] Input and output of mathematical expressions

John MacFarlane fiddlosopher at gmail.com
Thu Jun 9 17:47:12 CEST 2011


There's also http://hackage.haskell.org/package/texmath
which converts LaTeX to MathML, and even handles LaTeX
macros.  The problem is that MathML support in browsers
is still spotty.

http://hackage.haskell.org/packages/archive/texmath/0.5.0.1/doc/html/Text-TeXMath-Types.html
contains types for representing formulas in Haskell.

John

+++ Daniel Patterson [Jun 09 11 11:04 ]:
>    (I originally sent this reply from the wrong address, see below)
> 
>    On Jun 9, 2011, at 11:03 AM, Daniel Patterson wrote:
> 
>    Also if you are doing this for web, I haven't used it personally (yet),
>    but [1]http://www.mathjax.org/ looks really good... would allow you to
>    actually just write it in LaTeX (as writing MathML by hand is not
>    something I'd like to subject anyone to).
>    On Jun 9, 2011, at 10:59 AM, Chris Smith wrote:
> 
>      Ae you looking to do this in a web application, or client-side?
>      Since one of your requirements is to display a typeset equation,
>      that makes a bit of difference.  In a web-based setting, the best
>      way to do that is probably MathML, whereas a GUI will be a bit
>      harder.
> 
>    On Jun 9, 2011 8:24 AM, "Jacek Generowicz"
>    <[2]jacek.generowicz at cern.ch> wrote:
>    > Greetings Cafe,
>    >
>    > What would you recommend as a Haskell-based means of interactively
>    > reading and writing mathematical formulae?
>    >
>    > As a toy example, what might I use to write a program which presents
>    > the user with
>    >
>    > Please simplify the expression: \pi x^2 + 3\pi x^2
>    >
>    > (Where the TeX-style expression would be presented with a greek pi
>    and
>    > superscript twos on the xs.)
>    >
>    > The user should then have the ability to reply with something that
>    > looks like the result of TeXing
>    >
>    > 5 \pi x^2
>    >
>    > Whatever means the user uses to enter this expression, he should be
>    > able to preview the "typeset" version of his input before submitting.
>    >
>    > Any ideas?
>    >
>    > Thanks.
>    >
>    >
>    > _______________________________________________
>    > Haskell-Cafe mailing list
>    > [3]Haskell-Cafe at haskell.org
>    > [4]http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
>      _______________________________________________
>      Haskell-Cafe mailing list
>      [5]Haskell-Cafe at haskell.org
>      [6]http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
> References
> 
>    1. http://www.mathjax.org/
>    2. mailto:jacek.generowicz at cern.ch
>    3. mailto:Haskell-Cafe at haskell.org
>    4. http://www.haskell.org/mailman/listinfo/haskell-cafe
>    5. mailto:Haskell-Cafe at haskell.org
>    6. http://www.haskell.org/mailman/listinfo/haskell-cafe

> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe




More information about the Haskell-Cafe mailing list