How can I prepare source code listings?

Q How can I prepare source code listings?
A \usepackage{listings}

See also http://www.ctan.org/tex-archive/macros/latex/contrib/listings/listings.pdf

\usepackage{listings}
\usepackage{bold-extra}
\lstset{
    language=PASCAL,
    basicstyle=\scriptsize,
    columns= fullflexible
}

\begin{lstlisting}
\end{lstlisting)

For Smalltalk code, use st80.tex. Demo usage: st80demo.tex

Last changed by admin on 21 April 2009