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?
Thanks in advance...
$\rho\gamma^{}_{PH}$
The fake exponent lowers the subscript.
Ciao
Enrico
Perhaps look at the subdepth package?
Joseph Wright
Thanks - I'll give that a try.
Ah, yes - forgot about that. I'd seen it mentioned before, but
couldn't recall what this package did.
Thanks - I'll give it a try.
Actually, subdepth *prevents* the lowering of the subscript when a
superscipt is also in place. So, it does exactly the *opposite* of
what I'm looking for.
Works fine (and thanks!), but exchanges one fixed subscript depth for
another fixed (although the latter is better than the default, IMO).
I'm wondering if there is something that gives more precise control -
such that you can specify precisely (points, mm, or some unit) the
default height/depth? I have to believe that there is a more elegant
approach, or a package that does same.
I ask because I might have 20-30 sub/superscripts per page, over
hundreds and hundres of pages, and having to do the 'fake exponent'
approach gets cumbersom.
Not exactly; it does lower the subscript a little bit.
But I do agree it's not exactly what you're looking for.
I'm slowly working on an update to the package that might help you,
but it's nowhere near ready. In the meantime, you could try reading
the great article "Appendix G Illuminated" by Bogaslaw Jackowski for
the parameters to adjust the subscript/superscript heights, and use
the method in subdepth to apply the changes.
Sorry not to be of more help,
Will
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}
Found a previous post that helps considerably:
\def\xstrut{\rule{0pt}{2ex}}
$p_{\xstrut X,Y}(x,y) = p_{\xstrut X}(x) p_{\xstrut Y}(y)$
So, in my case:
\def\xstrut{\rule{0pt}{2ex}}
$\rho\gamma_{\xstrut PH}
which IMO looks *much* better* (less prone to misread) than
$\rho\gamma_{PH}$
I do note that this problem seems most acute with Computer Modern as
the font (among the few fonts I've tried).
On Sat, 27 Oct 2007 18:55:12 -0700, Will Robertson <wsp...@gmail.com>
wrote:
Agreed; I've avoided caps subscripts in the past for this very reason.
(Reminds me of Knuth's redesign of \delta when he realised that he was
avoiding using that character in his maths because he subconsciously
found it ugly. Or so the story goes.)
W
This doesn't work, 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).
Steve
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.)
Dan
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
Yes, it compiles, but on my system at least, it doesn't change
anything. \the\fontdimen16\textfont2
is 1.5pt when the document starts, and within the math environment.
Am I missing something?
Steve
Never mind, changing everymath to everydisplay did the trick.
Steve
>On Oct 28, 9:36 am, cooc...@NOSPAMverizon.net wrote:
\
Yeah, given that you put in all the work to make a package that will
help stiffs like me, you should appologize. ;-)
Not. Thanks! I'll look forward to the 'improved' package when its
ready.
:)
I'll take that as a nudge that I'm being a bit slow with getting my
package out. Sorry again! Got distracted by another mini-project --
released on CTAN today, so I might be able to get back to the subdepth
thing.
Cheers,
Will