From ben.bob at gmail.com Sat Mar 5 16:09:57 2005 From: ben.bob at gmail.com (Bo Peng) Date: Sat Mar 5 16:09:59 2005 Subject: [Doc-SIG] Re: Big latex subscript font using python.sty and manual.cls In-Reply-To: <6ea7b543050215184714551657@mail.gmail.com> References: <6ea7b543050215184714551657@mail.gmail.com> Message-ID: <6ea7b543050305070957c1a559@mail.gmail.com> Anyone? I guess this list is no longer active? Bo On Tue, 15 Feb 2005 20:47:55 -0600, Bo Peng 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 > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > From fdrake at acm.org Mon Mar 7 04:18:15 2005 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Mon Mar 7 04:18:37 2005 Subject: [Doc-SIG] Re: Big latex subscript font using python.sty and manual.cls In-Reply-To: <6ea7b543050305070957c1a559@mail.gmail.com> References: <6ea7b543050215184714551657@mail.gmail.com> <6ea7b543050305070957c1a559@mail.gmail.com> Message-ID: <200503061718.15771.fdrake@acm.org> 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. From ben.bob at gmail.com Thu Mar 24 06:24:02 2005 From: ben.bob at gmail.com (Bo Peng) Date: Thu Mar 24 06:24:03 2005 Subject: [Doc-SIG] Re: Big latex subscript font using python.sty and manual.cls In-Reply-To: <6ea7b543050215184714551657@mail.gmail.com> References: <6ea7b543050215184714551657@mail.gmail.com> Message-ID: <6ea7b5430503232124346363c9@mail.gmail.com> > 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 From fdrake at acm.org Thu Mar 24 07:23:44 2005 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Thu Mar 24 07:24:00 2005 Subject: [Doc-SIG] Re: Big latex subscript font using python.sty and manual.cls In-Reply-To: <6ea7b5430503232124346363c9@mail.gmail.com> References: <6ea7b543050215184714551657@mail.gmail.com> <6ea7b5430503232124346363c9@mail.gmail.com> Message-ID: <200503240123.44940.fdrake@acm.org> 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.