The lhs2tex package

[ Tags: development, gpl, language, program ] [ Propose Tags ]

This tool is primarily intended for people who want to write articles or books using LaTeX that contain some Haskell code. It works on literate Haskell documents where the non-Haskell parts form essentially a valid LaTeX document, then processes the Haskell code in the document and replaces it with formatted LaTeX output. It is not fully automatic in the sense that it will turn an arbitrary literate Haskell document into a LaTeX document without further work.

Nearly all aspects about the output and formatting are configurable. Output of code can be made using proportional fonts in such a way that even complex horizontal alignment is preserved. The preprocessor can also be invoked in another mode to just extract the Haskell code.


Versions 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.18.1, 1.19, 1.20
Change log CHANGELOG
Dependencies base (>=4.2 && <5), directory, filepath, mtl, process, regex-compat [details]
License GPL
Author Ralf Hinze <>, Andres Loeh <>
Maintainer Andres Loeh <>
Category Development, Language
Home page
Bug tracker
Source repository head: git clone
Uploaded Fri Sep 29 08:58:18 UTC 2017 by AndresLoeh
Distributions Debian:1.19, FreeBSD:1.19, LTSHaskell:1.19, NixOS:1.19
Executables lhs2TeX
Downloads 6852 total (234 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2017-09-29 [all 2 reports]
Hackage Matrix CI


Maintainer's Corner

For package maintainers and hackage trustees