Vertical placement of math symbol in LaTeX
I'm using the symbol \otimes
as a unary operator and it's vertical alignment doesn't seem right to me. It wants to sit a bit below the baseline. For example, if I define \newcommand{\myop}{\ensurem开发者_JAVA百科ath \otimes}
, then $\myop I$
becomes
and $F_{\myop I}$
becomes
I tried using \raisebox
to fix this, e.g.,
\newcommand{\myop}{\ensuremath \raisebox{1pt}{$\otimes$}}
This fixes $\myop I$
:
But \raisebox
doesn't seem to be sensitive to subscripts. The operator stays the same size while everything around it shrinks:
The problem, I think, is that \raisebox
creates its own LR box, which doesn't inherit the settings in the surrounding math environment. Is there a version of \raisebox
that "respects math"?
Try \mathchoice
(or \mathpalette
):
\newcommand{\myop}{%
\mathchoice{\raisebox{1pt}{$\displaystyle\otimes$}}
{\raisebox{1pt}{$\otimes$}}
{\raisebox{0.5pt}{$\scriptstyle\otimes$}}
{\raisebox{0.2pt}{$\scriptscriptstyle\otimes$}}}
The amsopn documentation says:
... the vertical spacing may not be optimal in script and scriptscript sizes. Unfortunately TeX provides no easy way to do math mode vertical spacing that varies with current math style like mu units.
$F_{\raisebox{1pt}{\scriptsize$\otimes$} I}$
精彩评论