Re: changing height\depth of sub- and superscripts
- From: Enrico Gregorio <gregorio@xxxxxxxxxxxxx>
- Date: Mon, 29 Oct 2007 17:41:52 +0200
Dan <luecking@xxxxxxxx> wrote:
On Oct 29, 3:30 am, StevieD83 <StephenMDal...@xxxxxxxxx> wrote:
On Oct 27, 10:13 pm, Martin Heller <mr_hel...@xxxxxxxx> wrote:
cooc...@xxxxxxxxxxxxxxxxx skrev:
I *think* I've seen this discussed in an earlier post, but despite my
better efforts, I can't seem to track it down.
I'm interested in techniques/options for changing the height (for
superscripts) or depth (for subscripts) from the LaTeX defaults - in
other words, change (overrride) the default vertical spacing rules for
sub- and superscripts. I ask because quite often, my students make
mistakes on assignments by confusing what should have been subscripts
as separate variables in an equation.
For example, $\rho\gamma_{PH}$. The PH product should be a subscript
for \gamma, but in \cm font, if you're not paying attention when
reading, it looks a lot like rho * gamma* PH. In other words, the
subscript depth for {PH} isn't 'deep' enough for the reader to
unambiguously see that the {PH} is a subscript. THis would be solved,
I think, if I could make the subscript a bit deeper (same being true
in reverse for superscripts).
Suggestions? Pointers to the obvious?
Try changing \fontdimen16 and \fontdimen17 (maybe only locally).
\documentclass{article}
\everymath{%
\fontdimen16\textfont2=3.0pt
\fontdimen17\textfont2=3.0pt
}
\begin{document}
\(
\rho\gamma_{PH}
\)
\end{document}
This doesn't work,
The above example works for me. Unfortunately, \everymath
is one of those things, like \everypar, that LaTeX takes hold
of from time to time.
because \textfont2 is not defined the way it would
be in plain TeX. On a side note, what is the name of math font 2 in
LaTeX (it is not \textfont2 or \tensy).
In LaTeX it is also \textfont2. Except that it is done symbolically,
using \symsymbols instead of 2.
LaTeX delays the definition of \textfont2 until the first actual use
of math mode. Thus, \textfont2 may be \nullfont until then.
I am not quite sure when \textfont2 comes into existence, but I
have never had any trouble invoking it inside macros that produce
actual mathematical symbols.
(The purpose of LaTeX's delayed scheme seems to be to avoid
using up TeX's limited number of math families if they are not
actually to be used.)
Every assignment to a \fontdimen is global; but if we use math at
various sizes, the assignment must be repeated after having checked
the fonts.
There is a token list that can help, \frozen@everymath, which is used
to restore the default value of \everymath: therefore
\makeatletter
\frozen@everymath={\check@mathfonts
\fontdimen16 \textfont2=\fontdimen17 \textfont2
\the\everymath}
\makeatother
should accomplish the task of putting every subscript at the same
level as in display math. I wouldn't use explicit values like 3pt,
which are surely wrong when large fonts are used. Probably expressing
the dimension in ex units is better, if you want settings different
from the above one.
Ciao
Enrico
.
- References:
- changing height\depth of sub- and superscripts
- From: cooch17
- Re: changing height\depth of sub- and superscripts
- From: Martin Heller
- Re: changing height\depth of sub- and superscripts
- From: StevieD83
- Re: changing height\depth of sub- and superscripts
- From: Dan
- changing height\depth of sub- and superscripts
- Prev by Date: Re: How to cite used software with BibTeX?
- Next by Date: Re: Red line and text in \maakbriefhoofd
- Previous by thread: Re: changing height\depth of sub- and superscripts
- Next by thread: Re: changing height\depth of sub- and superscripts
- Index(es):
Relevant Pages
|