[Doc-SIG] Re: Big latex subscript font using python.sty and manual.cls

Bo Peng ben.bob at gmail.com
Thu Mar 24 06:24:02 CET 2005


> I am writing a manual for my python extension using Python (2.4) latex
> classes. Everything seems to be fine except that the subscripts are as
> big as normal text

Problem solved.

> %%%%% in python.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> % 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
> 


This part *is* causing the problem. After commenting out these lines and use 
  \usepackage{underscore}
for my underscores int ext, subscripts are fine now. 

Please consider fixing the problem.
Bo


More information about the Doc-SIG mailing list