[Python-checkins] CVS: python/dist/src/Doc/texinputs python.sty,1.72,1.73

Fred L. Drake fdrake@users.sourceforge.net
Tue, 10 Apr 2001 08:53:09 -0700


Update of /cvsroot/python/python/dist/src/Doc/texinputs
In directory usw-pr-cvs1:/tmp/cvs-serv25968/texinputs

Modified Files:
	python.sty 
Log Message:

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.


Index: python.sty
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/python.sty,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -r1.72 -r1.73
*** python.sty	2001/03/02 18:57:05	1.72
--- python.sty	2001/04/10 15:53:06	1.73
***************
*** 186,189 ****
--- 186,210 ----
  }
  
+ % 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--}}