HaTeX

From HaskellWiki

About HaTeX[edit]

HaTeX consists in a set of combinators which allow you to build LaTeX code, following the LaTeX syntax in a type-safe manner.

This allows you to build programs which generates LaTeX code automatically for any purpose you can figure out.