CTAN
Comprehensive TeX Archive Network

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.

Files

Name Size Date Notes
Make­file 5689 2015-02-10 21:52
README 723 2015-02-10 21:52
list­ings.dtx 634410 2015-06-04 22:35
list­ings.ins 1192 2015-02-10 21:52
list­ings.pdf 731003 2015-06-04 22:35
lst­drvrs.dtx 334964 2015-06-04 22:35
lst­drvrs.ins 1846 2015-06-04 22:35
lst­drvrs.pdf 503595 2015-06-04 22:35

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
Ver­sion1.6
Li­censeThe LaTeX Project Public Li­cense 1.3
Copy­right2006,2007,2013 Brooks Moses, Jobst Hoff­mann
Main­tainerCarsten Heinz (in­ac­tive)
Jobst Hoff­mann
Brooks Moses (in­ac­tive)
Con­tained inTeX Live 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 Contact Author