summaryrefslogtreecommitdiffstats
path: root/Doc/texinputs/python.sty
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2005-03-24 06:21:37 (GMT)
committerFred Drake <fdrake@acm.org>2005-03-24 06:21:37 (GMT)
commit712f07082df29ee29352e5d0b57e28370e4e8a33 (patch)
tree40f0074abfd3662023db45a879dcee3c1abc4b1a /Doc/texinputs/python.sty
parent8efd90485c5d560571a71e72046d1b90ef8529a4 (diff)
downloadcpython-712f07082df29ee29352e5d0b57e28370e4e8a33.zip
cpython-712f07082df29ee29352e5d0b57e28370e4e8a33.tar.gz
cpython-712f07082df29ee29352e5d0b57e28370e4e8a33.tar.bz2
clean up the underscore mess for the typeset formats so that subscripts
work in math displays (thanks to Bo Peng on the Doc-SIG)
Diffstat (limited to 'Doc/texinputs/python.sty')
-rw-r--r--Doc/texinputs/python.sty23
1 files changed, 1 insertions, 22 deletions
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty
index 1f480a9..4cb02de 100644
--- a/Doc/texinputs/python.sty
+++ b/Doc/texinputs/python.sty
@@ -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.