The Haskell LaTeX library.
This library implements the LaTeX syntax and provides some useful abstractions.
Some of the things you can do with HaTeX are:
Write LaTeX documents with all the advantages you already have in Haskell: recursion, type system, high order functions, ...
Create a LaTeX backend for your own program.
Parse a LaTeX file and obtain its Abstract Syntax Tree (AST).
Pretty-print Haskell values in LaTeX.
Generate TikZ scripts (images!) easily.
Browse the examples
directory in the source distribution to see some simple examples. It might help you to get started.
If you prefer to write in LaTeX and all you want is to program some parts of the document, or if you already have the LaTeX document written and you just want to add some automatically generated LaTeX code somewhere, check haskintex: https://daniel-casanueva.gitlab.io/haskell/haskintex. It allows you to embed Haskell in LaTeX. It also makes it easy to use HaTeX within a LaTeX document.
The HaTeX library
HaTeX is a Haskell library that implements the LaTeX syntax, plus some abstractions on top.
Check a list of usage examples in the Examples directory of the repository in GitHub. A good starting point is simple.hs. Run any example script executing the main
function.
How to contribute
There are the options for potential contributors:
- Fork the GitLab repository and open a merge request.
- Report bugs or make suggestions opening a ticket in the Issue Tracker.
Related projects
- haskintex: Tool to use Haskell (and, additionaly, the HaTeX library) within a LaTeX file.
- TeX-my-math: Experimental library to ease the production of mathematical expressions using HaTeX.