In the latex math mode, with two adjacent characters, both with
subscripts and one with a superscript, the subscripts are not
vertically aligned. The one superscript "pushes" its corresponding
subscript down relative to the height of the other subscript. e.g.
$S_{a,b}^\top \Lambda S_{a,b}$
The result isn't horrible, but it isn't very pleasing either. Does
anyone know a decent way of forcing them to be aligned? The first
thing that I thought of was to insert a vphantom superscript, but that
seems a bit of a hack:
$S_{a,b}^\top \Lambda S^{\vphantom{\top}}_{a,b}$
Any help is appreciated.
Thanks,
Matt Walter
This can be "fixed" with the subdepth package (which I wrote based on
code by Donald Arseneau). It currently has the side-effect of forcing
superscripts to remain the same height in different contexts, as well
(e.g., $x^2$ vs. $\sqrt{x^2}$). At some stage I'd like to change
that...any other comments you have will be helpful for getting me
motivated to release a new version :)
(I say "fixed" above because the default behaviour is better
sometimes, but not always; it depends on the type of maths you're
typesetting.)
Will
Will,
I am working on my thesis and would be afraid that the package might
have undesirable effects (as you said, the default is sometimes
preferred) that I might miss. I may hold off trying it out on my
thesis, but will definitely play with it on smaller projects. I'll
send along any comments.
Thanks,
Matt
Chemists like to have simultaneous subscripts and superscripts so the mhchem
package copes with this well, using the \ce command, at the cost of making
the variables upright. But this can be dealt with.
This looks nice:
\usepackage[version=3]{mhchem}
...
% use italics for variables
\makeatletter
\def\mhchem@option@mathfont{\mathit}
\makeatother
...
$\ce{S_{a,b}^\top \Lambda S_{a,b}}$
Steve Mayer
Just realised that the \def line isn't necessary as mhchem has the
\mhchemoptions command for changing fonts:
\usepackage[version=3]{mhchem}
...
% use italics for variables
\mhchemoptions{mathfontcommand=\mathit}
I figured that a lot of others must have encountered the same problem.
I'll try out the mhchem package since it should allow me to specify
when it is called (i.e. hopefully I don't have to worry about it
affecting the rest of my document).
thanks,
Matt
On Jan 2, 1:13 pm, "Steve Mayer" <mayer at dial dot pipex dot com>
wrote:
p129 Texbook
$P_2^2$
$P{}_2^2$
--
from
David Roderick