I've been using LaTeX for three days (nights) now, and just came up with
the following typesetting problem: I would like to get a character like
the \pm or \mp, but with parenthesis around either sign, for example:
(+)
-
I made a \newcommand \pM for the above:
\newcommand{\pM}{\overset{(+)}{\underset{-}{}}}
and analogous \newcommands for \Pm \mP and \Mp. I don't like the outcome
that much however, compared with the normal \pm sign, the spacing
between the + and - is too big. So my question is, has anyone made a
good \newcommand for these? I assume there isn't any ready made in the
"standard" packages, I couldn't find one at least (which was a bit of a
surprise).
And the context where I needed this:
\begin{equation}
v=\frac{c^2}{u_{xB}} \pM
\sqrt{(\frac{c^2}{u_{xB}})^2-c^2} \; \stackrel{v<c}{=} \;
\frac{c^2}{u_{xB}}\Biggl[ 1-\sqrt{1-(\frac{u_{xB}}{c})^2}
\Biggr]
\label{OE1.29}\end{equation}
Have a nice day,
Mikael Johansson
University of Helsinki
Department of Chemistry
for e-mail, correct the address
\def\pM{\mathrel{\raise 2pt \hbox{\tiny(}\!
\raise 1pt \hbox{+}
\settowidth {\dimen03} {+}
\hskip-\dimen03
\raise -2.4pt \hbox {$-$}
\!\raise 2pt \hbox{\tiny)}}}
This works acceptably well with 10pt Computer Modern
fonts, but will need manual adjusting in other cases.
Basically, there are four different parameters to adjust:
2pt ... (two instances) Vertical shift for ( and )
1pt ... Vertical shift for +
\tiny . (two instances) Size of ()
-2.4pt. Vertical shift for -
--
Gernot Katzer
Everything about Herbs & Spices: http://www-ang.kfunigraz.ac.at/~katzer/engl
Gernot Katzer wrote:
> \def\pM{\mathrel{\raise 2pt \hbox{\tiny(}\!
> \raise 1pt \hbox{+}
> \settowidth {\dimen03} {+}
> \hskip-\dimen03
> \raise -2.4pt \hbox {$-$}
> \!\raise 2pt \hbox{\tiny)}}}
Thanks! This works nicely after some small adjustments to 11pt. Learned
something about \raise as well!
Have a nice day,
Mikael J.