[Python-checkins] CVS: python/dist/src/Doc/texinputs python.sty,1.91,1.92
Fred L. Drake
fdrake@users.sourceforge.net
Thu, 28 Mar 2002 14:28:45 -0800
Update of /cvsroot/python/python/dist/src/Doc/texinputs
In directory usw-pr-cvs1:/tmp/cvs-serv16268/texinputs
Modified Files:
python.sty
Log Message:
Extend \verbatiminput so that the typeset version provides the same appearance
as a verbatim environment. (The HTML version is already fine.)
Index: python.sty
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/python.sty,v
retrieving revision 1.91
retrieving revision 1.92
diff -C2 -d -r1.91 -r1.92
*** python.sty 26 Mar 2002 19:14:41 -0000 1.91
--- python.sty 28 Mar 2002 22:28:43 -0000 1.92
***************
*** 176,179 ****
--- 176,180 ----
\let\py@OldEndVerbatim=\endverbatim
\RequirePackage{verbatim}
+ \let\py@OldVerbatimInput=\verbatiminput
% Variable used by begin code command
***************
*** 194,197 ****
--- 195,211 ----
\py@OldEndVerbatim%
\end{minipage}%
+ }
+ \renewcommand{\verbatiminput}[1]{%
+ {\setlength{\parindent}{1cm}%
+ % Calculate the text width for the minipage:
+ \setlength{\py@codewidth}{\linewidth}%
+ \addtolength{\py@codewidth}{-\parindent}%
+ %
+ \small%
+ \begin{list}{}{\setlength{\leftmargin}{1cm}}
+ \item%
+ \py@OldVerbatimInput{#1}%
+ \end{list}
+ }%
}