Settings Help
CTAN
Comprehensive TeX Archive Network
Home Upload Browse

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

Type­set pro­grams (pro­gram­ming code) within LaTeX. The source code is read di­rectly by TeX. 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). In­cludes sup­port for hy­per­ref. To use, sim­ply \usep­a­ck­age{list­ings}, iden­tify the lan­guage with \lst­set{lan­guage=Python}, then em­ploy the \be­gin{lstlist­ing} ... \end{lstlist­ing} en­vi­ron­ment or the \lstin­put­list­ing{file­name.py} com­mand. 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).

CTAN path/macros/la­tex/con­trib/list­ings
Doc­u­men­ta­tion Pack­age Readme
Pack­age doc­u­men­ta­tion
Ver­sion1.4
Li­censeThe LaTeX Project Public Li­cense
Copy­right2006,2007 Brooks Moses
Main­tainerBrooks Moses
Carsten Heinz (in­ac­tive)
Con­tained inTeXLive as list­ings
MiKTeX as list­ings
Topics code list­ing, syn­tax high­light­ing
high­light syn­tax of com­puter code, etc.
See also list­ing
Guest Book Sitemap Contact 2013-04-07 20:44