Commit 823606ce authored by Fred Drake's avatar Fred Drake

clean up the underscore mess for the typeset formats so that subscripts

work in math displays (thanks to Bo Peng on the Doc-SIG)
parent bca63a06
...@@ -23,7 +23,7 @@ Fred Allen ...@@ -23,7 +23,7 @@ Fred Allen
A. Amoroso A. Amoroso
Pehr Anderson Pehr Anderson
Oliver Andrich Oliver Andrich
Jess Cea Avin Jesús Cea Avión
Daniel Barclay Daniel Barclay
Chris Barker Chris Barker
Don Bashford Don Bashford
...@@ -54,7 +54,7 @@ Blame Andy Eskilsson ...@@ -54,7 +54,7 @@ Blame Andy Eskilsson
Carey Evans Carey Evans
Martijn Faassen Martijn Faassen
Carl Feynman Carl Feynman
Hernn Martnez Foffani Hernán Martínez Foffani
Stefan Franke Stefan Franke
Jim Fulton Jim Fulton
Peter Funk Peter Funk
...@@ -71,7 +71,7 @@ Anders Hammarquist ...@@ -71,7 +71,7 @@ Anders Hammarquist
Mark Hammond Mark Hammond
Harald Hanche-Olsen Harald Hanche-Olsen
Manus Hand Manus Hand
Gerhard Hring Gerhard Häring
Travis B. Hartwell Travis B. Hartwell
Janko Hauser Janko Hauser
Bernhard Herzog Bernhard Herzog
...@@ -108,11 +108,11 @@ Erno Kuusela ...@@ -108,11 +108,11 @@ Erno Kuusela
Detlef Lannert Detlef Lannert
Piers Lauder Piers Lauder
Glyph Lefkowitz Glyph Lefkowitz
Marc-Andr Lemburg Marc-André Lemburg
Ulf A. Lindgren Ulf A. Lindgren
Everett Lipman Everett Lipman
Mirko Liss Mirko Liss
Martin von Lwis Martin von Löwis
Fredrik Lundh Fredrik Lundh
Jeff MacDonald Jeff MacDonald
John Machin John Machin
...@@ -136,11 +136,12 @@ Zooko O'Whielacronx ...@@ -136,11 +136,12 @@ Zooko O'Whielacronx
William Park William Park
Joonas Paalasmaa Joonas Paalasmaa
Harri Pasanen Harri Pasanen
Bo Peng
Tim Peters Tim Peters
Christopher Petrilli Christopher Petrilli
Justin D. Pettit Justin D. Pettit
Chris Phoenix Chris Phoenix
Franois Pinard François Pinard
Paul Prescod Paul Prescod
Eric S. Raymond Eric S. Raymond
Edward K. Ream Edward K. Ream
......
\documentclass{howto}
\title{Test of python.sty with math}
\begin{document}
\maketitle
\section{Subscripts in Math Mode}
This contains an inline formula containing a subscript: $H_20$.
This display doesn't make sense, but contains a subscript as well:
$$\sum_1^2 = a_x$$
\end{document}
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
[1998/01/11 LaTeX package (Python markup)] [1998/01/11 LaTeX package (Python markup)]
\RequirePackage{longtable} \RequirePackage{longtable}
\RequirePackage{underscore}
% Uncomment these two lines to ignore the paper size and make the page % Uncomment these two lines to ignore the paper size and make the page
% size more like a typical published manual. % size more like a typical published manual.
...@@ -541,28 +542,6 @@ ...@@ -541,28 +542,6 @@
{\reset@font\normalsize\py@HeaderFamily}} {\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 % 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 % things to get the right formatting and index entries for the stuff in
% Python modules and C API. % Python modules and C API.
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment