Comprehensive TeX Archive Network
Cover Upload Browse Search

Direc­tory tex-archive/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.


Name Size Date Notes
Makefile 5022 2014-09-06 19:39
README 723 2013-10-24 11:18
listings.dtx 630568 2014-09-06 19:44
listings.ins 1192 2013-10-24 11:18
listings.pdf 717861 2014-09-06 19:44
lstdrvrs.dtx 332764 2014-09-06 19:44
lstdrvrs.ins 1847 2014-09-06 19:44
lstdrvrs.pdf 495406 2014-09-06 19:44

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 LaTeX

The pack­age en­ables the user to type­set pro­grams (pro­gram­ming code) within LaTeX; the source code is read di­rectly by TeX—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).

Pack­age De­tailslist­ings
Li­censeThe LaTeX Project Public Li­cense 1.3
Copy­right2006,2007,2013 Brooks Moses, Jobst Hoff­mann
Main­tainerBrooks Moses (in­ac­tive)
Carsten Heinz (in­ac­tive)
Jobst Hoff­mann
Con­tained inTeXlive as list­ings
MikTeX as list­ings
Topics com­puter code list­ing
high­light syn­tax of com­puter code, etc.
See also listing
Guest Book Sitemap Contact