[comp.text] Changing Math subscript fonts in LaTeX...

gonnason@enelk.uucp (02/17/89)

I'd like to know how I can change the size of font that LaTeX uses for
subscripts and subsubscripts in mathematical equations.  I've written my
entire thesis in LaTeX, and have some 200 equations throughout, most
with subscripted variables.  Now I find our local (to this University)
administrators have decreed that NO fonts in a thesis (INCLUDING fonts
used for subscripts) shall be less than 10 points in size...

You can imagine how happy I am at the thought of going into a couple of
hundred equations to add font information everywhere I have
subscripts...

So, is there an easy way to change the font size???  According to the
LaTeX manual, section C.14.4, it seems that the fonts scriptstyle and
scriptscriptstyle are both preloaded...  I suspect this means I'm up the
creek?  I've tried using the following sequence, which I thought might
work, but with no success:

     \load{large}{displaystyle}
     \load{large}{script}
     \load{large}{scriptscript}

Any help or ponters to help would be greatly appreciated.


                OS/2 - the other half is in the mail...

 - gonnason@enel.UCalgary.CA  ( University of Calgary Electrical Engineering )

mrd@sun.soe.clarkson.edu (Michael DeCorte) (02/19/89)

Well the first thing you should do is find out who made this rule and
tell him/her to figure it out.

As this person may be dead or some such little bit of inconvenience
you may want to try this.

I am going to assume that you are using article at 12pt.  If you
aren't using 12 point then you should switch; this way the scripts
will a bit smaller than the 12 pt normal text.

If you aren't using article then simpley replace all references to
article with book or report and replace all references to art12 with
bk12 or rep12.

You are going to make yourself a style file, lets call it dumb.sty for
dumb rules ok?

In art12.doc around line 58 you will find

\def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
\def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
\def\large{\@setsize\large{18pt}\xivpt\@xivpt}
\def\Large{\@setsize\Large{22pt}\xviipt\@xviipt}
\def\LARGE{\@setsize\LARGE{25pt}\xxpt\@xxpt}
\def\huge{\@setsize\huge{30pt}\xxvpt\@xxvpt}

you should change this while following the rules below

% Each size-changing command \SIZE executes the command
%        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
% where:
%   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual 
%                  value will be \baselinestretch * BASELINESKIP.)
%
%  \FONTSIZE     = Name of font-size command.  The currently available
%                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
%                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
%                  \xivpt, \xviipt, \xxpt, \xxvpt.
%  \@FONTSIZE    = The same as the font-size command except with an
%                  '@' in front---e.g., if \FONTSIZE = \xivpt then
%                  \@FONTSIZE = \@xivpt.
%

You may want to try something like this:

\def\scriptsize{\@setsize\scriptsize{12pt}\xpt\@xpt} % I changed this
\def\tiny{\@setsize\tiny{12pt}\xpt\@xpt}             % and this
\def\large{\@setsize\large{18pt}\xivpt\@xivpt}
\def\Large{\@setsize\Large{22pt}\xviipt\@xviipt}
\def\LARGE{\@setsize\LARGE{25pt}\xxpt\@xxpt}
\def\huge{\@setsize\huge{30pt}\xxvpt\@xxvpt}

To use it set your documentstyle to

\documentstyle[dumb]{article}
--

Michael DeCorte // (315)265-2439 // P.O. Box 652, Potsdam, NY 13676
Internet: mrd@sun.soe.clarkson.edu  // Bitnet:   mrd@clutx.bitnet        
---------------------------------------------------------------------------
Clarkson Archive Server // commands = help, index, send, path
archive-server@sun.soe.clarkson.edu
archive-server%sun.soe.clarkson.edu@omnigate.bitnet
dumb1!dumb2!dumb3!smart!sun.soe.clarkson.edu!archive-server
---------------------------------------------------------------------------

mc3i+@andrew.cmu.edu (Martin Costabel) (02/19/89)

Michael DeCorte's first advice is right: Shoot the guy who made those rules.
(Michael formulated it more politely).

Michael's second advice, namely copying a piece of code from art12.sty and
modifying it, is relatively simple and has only one drawback:
It doesn't work.
(At least when I just tried it. Rule #1 for TeXhackers: Never believe that a
macro works until you preview the result)

The following worked for me:

Like Michael, I assume that you are using a 12pt style. I further assume that
you use \normalsize formulas (This is the default and is one of the  reasons why
Michael's rules don't work: His changed definition of \scriptsize will normally
never be executed.) The \normalsize command (which you don't normally see, it is
executed by the \begin{document} command) in a 12pt style uses the command
\xiipt to set the various fontsizes. The command \xiipt is defined in the file
lfonts.tex, and this definition has to be changed.

To use the changed definition, you can
1. put it into a dumb.sty file and use
\documentstyle[12pt,dumb]{article}
as Michael suggested, or you can
2. put it into your .tex file. In that case, you have to enclose it between
\makeatletter and \makeatother (to make the @-signs work). Make sure that the
new definition appears (after the \documentstyle statement and) BEFORE the
\begin{document} statement (then it is valid throughout your document), or else
you have to activate it by inserting a line
\@normalsize \normalsize
right before the \makeatother statement. (Try it, it won't work otherwise!) In
this way, you could switch between different styles inside your document.

The changed definition follows (I have changed all cases of six, sev, egt, or
nin to ten)
%
\def\xiipt{\textfont\z@\twlrm
  \scriptfont\z@\tenrm \scriptscriptfont\z@\tenrm  % <--
\textfont\@ne\twlmi \scriptfont\@ne\tenmi \scriptscriptfont\@ne\tenmi  % <--
\textfont\tw@\twlsy \scriptfont\tw@\tensy \scriptscriptfont\tw@\tensy  % <--
\textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
\def\unboldmath{\everymath{}\everydisplay{}\@nomath\unboldmath
          \textfont\@ne\twlmi
          \textfont\tw@\twlsy \textfont\lyfam\twlly
          \@boldfalse}\@boldfalse
\def\boldmath{\@ifundefined{twlmib}{\global\font\twlmib\@mbi\@magsc
ale1\global
        \font\twlsyb\@mbsy \@magscale1\global\font
         \twllyb\@lasyb\@magscale1\relax\@addfontinfo\@xiipt
              {\def\boldmath{\everymath
                {\mit}\everydisplay{\mit}\@prtct\@nomathbold
                \textfont\@ne\twlmib \textfont\tw@\twlsyb
                \textfont\lyfam\twllyb\@prtct\@boldtrue}}}{}\@xiipt\
boldmath}%
\def\prm{\fam\z@\twlrm}%
\def\pit{\fam\itfam\twlit}\textfont\itfam\twlit \scriptfont\itfam\tenit  % <--
   \scriptscriptfont\itfam\tenit % <--
\def\psl{\fam\slfam\twlsl}\textfont\slfam\twlsl
     \scriptfont\slfam\tensl \scriptscriptfont\slfam\tensl % <--
\def\pbf{\fam\bffam\twlbf}\textfont\bffam\twlbf
   \scriptfont\bffam\tenbf \scriptscriptfont\bffam\tenbf
\def\ptt{\fam\ttfam\twltt}\textfont\ttfam\twltt
   \scriptfont\ttfam\tentt \scriptscriptfont\ttfam\tentt
\def\psf{\fam\sffam\twlsf}\textfont\sffam\twlsf
    \scriptfont\sffam\tensf \scriptscriptfont\sffam\tensf
\def\psc{\@getfont\psc\scfam\@xiipt{\@mcsc\@magscale1}}%
\def\ly{\fam\lyfam\twlly}\textfont\lyfam\twlly
   \scriptfont\lyfam\tenly \scriptscriptfont\lyfam\tenly % <--
 \@setstrut \rm}
%

--Martin Costabel

dlau@cs.utexas.edu (David Lau) (02/22/89)

In article <728@cs-spool.calgary.UUCP> gonnason@enel.UCalgary.CA writes:
>
>I'd like to know how I can change the size of font that LaTeX uses for
>subscripts and subsubscripts in mathematical equations.  I've written my

A very simple solution, albeit a TeX solution, is to say:

    \scriptfont1=\tenmi

anywhere after begin{document}. This solution has the additional
appeal that no LaTeX source lines need to be changed, as was suggested
by several others.


David
dlau@cs.utexas.edu