comparison Doc/texinputs/python.sty @ 17380:4622af4da9e2 legacy-trunk

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.
author Fred Drake <fdrake@acm.org>
date Tue, 10 Apr 2001 15:53:06 +0000
parents 38e17a089492
children db928a277f8b
comparison
equal deleted inserted replaced
17379:0f6d8fe4a3a9 17380:4622af4da9e2
183 \renewcommand{\endverbatim}{% 183 \renewcommand{\endverbatim}{%
184 \py@OldEndVerbatim% 184 \py@OldEndVerbatim%
185 \end{minipage}% 185 \end{minipage}%
186 } 186 }
187 187
188 % This does a similar thing for the {alltt} environment:
189 \RequirePackage{alltt}
190 \let\py@OldAllTT=\alltt
191 \let\py@OldEndAllTT=\endalltt
192
193 \renewcommand{\alltt}{%
194 \setlength{\parindent}{1cm}%
195 % Calculate the text width for the minipage:
196 \setlength{\py@codewidth}{\linewidth}%
197 \addtolength{\py@codewidth}{-\parindent}%
198 %
199 \par\indent%
200 \begin{minipage}[t]{\py@codewidth}%
201 \small%
202 \py@OldAllTT%
203 }
204 \renewcommand{\endalltt}{%
205 \py@OldEndAllTT%
206 \end{minipage}%
207 }
208
188 209
189 \newcommand{\py@modulebadkey}{{--just-some-junk--}} 210 \newcommand{\py@modulebadkey}{{--just-some-junk--}}
190 211
191 212
192 %% Lots of index-entry generation support. 213 %% Lots of index-entry generation support.