HaTeX: The Haskell LaTeX library.

[ bsd3, latex, library ] [ Propose Tags ]

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.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 1.0.0, 1.0.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 3.0.0, 3.1.0, 3.2,, 3.3, 3.4, 3.5, 3.6,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Change log CHANGELOG.md
Dependencies base (>=4 && <5), bibtex (>=0.1 && <0.2), bytestring (>= && <0.13), containers (>= && <0.7), ghc-prim, hashable (>=1.2 && <1.5), matrix, parsec (>=3.1.6), prettyprinter, QuickCheck, semigroups, text (>= && <2.2), transformers (>=0.2.2 && <0.7) [details]
License BSD-3-Clause
Author Daniel Casanueva (daniel.casanueva `at` proton.me)
Maintainer Daniel Casanueva (daniel.casanueva `at` proton.me)
Category LaTeX
Home page https://gitlab.com/daniel-casanueva/haskell/HaTeX
Bug tracker https://gitlab.com/daniel-casanueva/haskell/HaTeX/-/issues
Uploaded by DanielDiaz at 2023-11-23T20:05:40Z
Distributions LTSHaskell:, NixOS:, Stackage:
Reverse Dependencies 15 direct, 9 indirect [details]
Downloads 46860 total (110 in the last 30 days)
Rating 2.25 (votes: 4) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-11-23 [all 1 reports]

Readme for HaTeX-

[back to package description]

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:

  • 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.