ANNOUNCE: lhs2tex-1.9

Andres Loeh andres at
Fri Jan 23 14:19:45 EST 2004

                     lhs2TeX version 1.9

We are pleased to announce the first official release of
lhs2TeX, a preprocessor to generate LaTeX code from literate
Haskell sources.

lhs2TeX includes the following features:

* Different styles to process your source file: for instance,
  "tt" style uses a monospaced font for the code while still 
  allowing you to highlight keywords etc, whereas
  "poly" style uses proportional fonts for identifiers, handles
  indentation nicely, is able to replace binary operators by
  mathematical symbols and take care of complex horizontal

* Formatting directives, which let you customize the way certain
  tokens in the source code should appear in the processed 

* A liberal parser that can handle most of the language 
  extensions; you don't have to restrict yourself to Haskell 98.

* Preprocessor-style conditionals that allow you to generate
  different versions of a document from a single source file
  (for instance, a paper and a presentation).

* Active documents: you can use Haskell to generate parts of the 
  document (useful for papers on Haskell).

* A manual explaining all the important aspects of lhs2TeX.


Although development on lhs2TeX has begun as early as 1997,
it has never been formally released before. This is a first
release that should be mostly compatible to versions that
have been inofficially distributed so far. It should compile
with the latest GHC versions.

Two completely new modes have been added compared to previous
versions: "poly" mode is designed to replace the old math
mode; the restriction of having only one alignment column 
per code block is lifted and replaced by a generic mechanism
that allows complex layouts; "newcode" is a replacement for
the old "code" mode that can handle formatting directives
and produces LINE pragmas in the generated code.

Requirements and Download

A source distribution that should be suitable for Unix-based
environments is available from

It has been verified to build on Linux and MacOSX.

You need a recent version of GHC (5.04.X or higher should do) 
to build lhs2TeX, and, of course, you need a TeX distribution 
to make use of lhs2TeX's output. The program includes a 
configuration that is suitable for use with LaTeX. In theory, 
there should be no problem to generate code for other TeX 
flavors, such as plainTeX or ConTeXt.

  Happy lhs2TeXing,
  Ralf Hinze and Andres Loeh

  ralf at
  lhs2TeX at

More information about the Haskell mailing list