TeX-my-math: Render general Haskell math to LaTeX. Or: math typesetting with high signal-to-noise–ratio.

[ gpl, library, math, program ] [ Propose Tags ]

For tl;dr: look at https://github.com/leftaroundabout/Symbolic-math-HaTeX/blob/master/EXAMPLES.md.

This is an attempt to get convenient math syntax in HaTeX (i.e., in data structures compatible / convertable to those from http://hackage.haskell.org/package/HaTeX).

The idea is to combine these features:

Ideally, one would write expressions as if only meaning Haskell to calculate them, but get the result back as a full pretty-printing LaTeX math string. /And the actual calculated result as well/, if possible!

To this end, we use a minimal symbolic-manipulation EDSL, namely dumb-cas, set up in a way so the leaves of the syntax tree, i.e. the individual symbols, are represented by LaTeX expressions in memory and by single-letter variables in the Haskell code. These can then be combined with operators corresponding to LaTeX's maths operators, to obtain a very compact and almost WYSIWYG-like code appearance, while retaining the ability to apply any LaTeX-specific tweaks whenever necessary. At the same time, because the AST is fully precedence-aware, it is safely possible to transform the expressions via e.g. Template Haskell, to actually compute concrete numerical results, or apply exact symbolic-manipulation techniques.

Versions [faq],,,,,
Dependencies base (>=4.8 && <4.15), decimal-literals, directory, dumb-cas (>=0.2.1 && <0.3), filepath, hashable, haskell-src-meta, HaTeX (>=, process, template-haskell, TeX-my-math, text, unordered-containers, vector-space, void [details]
License GPL-3.0-only
Author Justus Sagemüller
Maintainer (@) jsag $ hvl.no
Revised Revision 2 made by leftaroundabout at 2021-01-11T15:16:34Z
Category math
Home page http://github.com/leftaroundabout/Symbolic-math-HaTeX
Uploaded by leftaroundabout at 2021-01-11T12:51:39Z
Distributions NixOS:
Executables TeXmyMath-example
Downloads 2397 total (11 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user [build log]
All reported builds failed as of 2021-01-11 [all 3 reports]




Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees