Mercurial > cpython-lru_cache-weakref
diff Doc/texinputs/python.sty @ 34807:2380f9d1ebab legacy-trunk
clean up the underscore mess for the typeset formats so that subscripts
work in math displays (thanks to Bo Peng on the Doc-SIG)
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 24 Mar 2005 06:21:37 +0000 |
| parents | 0349257e1ed5 |
| children | 66322fca91b4 |
line wrap: on
line diff
--- a/Doc/texinputs/python.sty Wed Mar 23 22:16:22 2005 +0000 +++ b/Doc/texinputs/python.sty Thu Mar 24 06:21:37 2005 +0000 @@ -7,6 +7,7 @@ [1998/01/11 LaTeX package (Python markup)] \RequirePackage{longtable} +\RequirePackage{underscore} % Uncomment these two lines to ignore the paper size and make the page % size more like a typical published manual. @@ -541,28 +542,6 @@ {\reset@font\normalsize\py@HeaderFamily}} -% This gets the underscores closer to the right width; the only change -% from standard LaTeX is the width specified. - -\DeclareTextCommandDefault{\textunderscore}{% - \leavevmode \kern.06em\vbox{\hrule\@width.55em}} - -% Underscore hack (only act like subscript operator if in math mode) -% -% The following is due to Mark Wooding (the old version didn't work with -% Latex 2e. - -\DeclareRobustCommand\hackscore{% - \ifmmode_\else\textunderscore\fi% -} -\begingroup -\catcode`\_\active -\def\next{% - \AtBeginDocument{\catcode`\_\active\def_{\hackscore{}}}% -} -\expandafter\endgroup\next - - % Now for a lot of semantically-loaded environments that do a ton of magical % things to get the right formatting and index entries for the stuff in % Python modules and C API.
