Big latex subscript font using python.sty and manual.cls
Dear list, 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 ( see page 55 of http://bp6.stat.rice.edu:8080/simuPOP_doc/userGuide.pdf ). I doubt that the following piece of code in python.sty is causing the problem but can not fix it. (I get errors when commenting out this block of code.) Does anyone know what is happening here? Maybe there is a font size setting somewhere? Note that the subscripts are OK if I use other classes like report.cls. Many thanks in advance. Bo %%%%% 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Anyone? I guess this list is no longer active? Bo On Tue, 15 Feb 2005 20:47:55 -0600, Bo Peng <ben.bob@gmail.com> wrote:
Dear list,
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 ( see page 55 of http://bp6.stat.rice.edu:8080/simuPOP_doc/userGuide.pdf ). I doubt that the following piece of code in python.sty is causing the problem but can not fix it. (I get errors when commenting out this block of code.) Does anyone know what is happening here? Maybe there is a font size setting somewhere?
Note that the subscripts are OK if I use other classes like report.cls.
Many thanks in advance.
Bo
%%%%% 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
On Saturday 05 March 2005 05:09, Bo Peng wrote:
Anyone? I guess this list is no longer active?
The list is still active; sorry for the delay. I've been travelling for business lately and haven't had time to look into this at all. I'll try to take a look in the next week or so, but my time is pretty limited right now. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org>
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
On Thursday 24 March 2005 00:24, Bo Peng wrote:
Problem solved. ... This part *is* causing the problem. After commenting out these lines and use \usepackage{underscore} for my underscores int ext, subscripts are fine now.
Your TeX-fu is much greater than mine. I don't think I'd have found this solution, since I didn't have underscore.sty in my installation. I found a copy using Google, and it did the trick. I've made this change in the CVS for the Python trunk, and added your name to Doc/ACKS. Thanks for pursuing this! -Fred -- Fred L. Drake, Jr. <fdrake at acm.org>
participants (2)
-
Bo Peng -
Fred L. Drake, Jr.