Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse

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
Makefile 4770 2014-03-04 08:54
README 723 2013-10-24 11:18
listings.dtx 630480 2014-03-04 09:02
listings.ins 1192 2013-10-24 11:18
listings.pdf 717262 2014-03-04 09:02
lstdrvrs.dtx 329112 2014-03-04 09:02
lstdrvrs.ins 1787 2014-03-04 09:02
lstdrvrs.pdf 491024 2014-03-04 09:02

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.5c
Li­censeThe LaTeX Project Public Li­cense
Copy­right2006,2007,2013 Brooks Moses, Jobst Hoff­mann
Main­tainerBrooks Moses (in­ac­tive)
Jobst Hoff­mann
Carsten Heinz (in­ac­tive)
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