Import the alltt package and wrap that environment in a similar way to

the way we handle verbatim, so that it picks up the same indentation and
minipage behavior.
This commit is contained in:
Fred Drake 2001-04-10 15:53:06 +00:00
parent e9901f325e
commit b5309a956e
1 changed files with 21 additions and 0 deletions

View File

@ -185,6 +185,27 @@
\end{minipage}%
}
% This does a similar thing for the {alltt} environment:
\RequirePackage{alltt}
\let\py@OldAllTT=\alltt
\let\py@OldEndAllTT=\endalltt
\renewcommand{\alltt}{%
\setlength{\parindent}{1cm}%
% Calculate the text width for the minipage:
\setlength{\py@codewidth}{\linewidth}%
\addtolength{\py@codewidth}{-\parindent}%
%
\par\indent%
\begin{minipage}[t]{\py@codewidth}%
\small%
\py@OldAllTT%
}
\renewcommand{\endalltt}{%
\py@OldEndAllTT%
\end{minipage}%
}
\newcommand{\py@modulebadkey}{{--just-some-junk--}}