HaTeX

From HaskellWiki

About HaTeX

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.