The TeX-my-math package

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

For tl;dr: look at

This is an attempt to get convenient math syntax in HaTeX (i.e., in data structures compatible / convertable to those from

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.


Dependencies base (>=4.8 && <4.11), decimal-literals, dumb-cas (>= && <0.2), hashable, haskell-src-meta, HaTeX (>3.4), template-haskell, text, unordered-containers, vector-space, void [details]
License GPL-3
Author Justus Sagemüller
Maintainer (@) jsagemue $
Category math
Home page
Uploaded Thu Nov 2 10:50:53 UTC 2017 by leftaroundabout
Distributions NixOS:
Downloads 515 total (26 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees