Comprehensive TeX Archive Network

Direc­tory macros/latex/contrib/listings

Listings package

Copyright 1996--2004 Carsten Heinz (the package)
Copyright 1996--2007 individual authors (language drivers)
Copyright 2006--2007 Brooks Moses (continued maintenance)
Copyright 2013--     Jobst Hoffmann (continued maintenance)

$Id: README 38 2013-06-16 19:03:21Z j_hoffmann $

Released under the LaTeX Project Public License 1.3 or later

The `listings' package is a source code printer for LaTeX.
You can typeset stand alone files as well as listings with
an environment similar to `verbatim' as well as you can
print code snippets using a command similar to \verb'.
Many parameters control the output and if your preferred
programming language isn't already supported, you can make
your own definition.

Down­load the con­tents of this pack­age in one zip archive (1.4M).

list­ings – Type­set source code list­ings us­ing

The pack­age en­ables the user to type­set pro­grams (pro­gram­ming code) within ; the source code is read di­rectly by —no front-end pro­ces­sor is needed. Key­words, com­ments and strings can be type­set us­ing dif­fer­ent styles (de­fault is bold for key­words, italic for com­ments and no spe­cial style for strings). Sup­port for hy­per­ref is pro­vided.

To use, \usep­a­ck­age{list­ings}, iden­tify the lan­guage of the ob­ject to type­set, us­ing a con­struct like: \lst­set{lan­guage=Python}, then use en­vi­ron­ment lstlist­ing for in­line code. Ex­ter­nal files may be for­mat­ted us­ing \lstin­put­list­ing to pro­cess a given file in the form ap­pro­pri­ate for the cur­rent lan­guage. Short (in-line) list­ings are also avail­able, us­ing ei­ther \lstin­line|...| or |...| (af­ter defin­ing the | to­ken with the \lstMakeShortIn­line com­mand).

Li­censeThe Project Public Li­cense 1.3
Copy­right2006,2007,2013 Brooks Moses, Jobst Hoff­mann
Main­tainerJobst Hoff­mann
Brooks Moses (in­ac­tive)
Carsten Heinz (in­ac­tive)
Con­tained inTeX Live as list­ings
MiKTeX as list­ings
Topics high­light syn­tax of com­puter code, etc.
com­puter code list­ing
See also listing
Guest Book Sitemap Contact Contact Author