17

I need one (or maybe two) LaTeX symbols that I don't find in the comprehensive list of symbols. The symbol is like the normal plus-minus sign \pm, but with parenthesis around the minus sign. Is such a symbol available somewhere? And if not, what is the best way to construct it from (, \pm and )?

Preferably I would also want the opposite: \mp with parenthesis around the plus.

Any ideas?

3
  • please provide a citation to where these symbols can be found in published material, and also say what they are used for and provide a meaningful name. they are not in unicode. send this information also to [email protected]; i am the representative of the stix project to unicode, and if suitable documentation is provided, i will communicate uncoded symbols to them for consideration. Commented May 6, 2011 at 12:34
  • @barbara: I actually asked because a friend asked me about it, so I'm not sure of the context in which is was needed. I'll check if he has any references. I think I've seen such a symbol in basic math or physics textbooks, eg, to indicate that a quadratic equation has two roots of different signs, but only the positive root is of (say physical) interest.
    – Olof
    Commented May 6, 2011 at 13:32
  • 1
    I did a web search for this symbol and found this discussion. This kind of a symbol is very useful when neglecting, say, negative (or positive) solutions to quadratic equations because of known constraints. I use it often in my teaching. How extensive would the list of pointers to literature have to be in order for the symbol to be considered to be added?
    – user11079
    Commented Jan 23, 2012 at 14:17

1 Answer 1

16

I once proposed the following definitions

\newcommand\varpm{\mathbin{\vcenter{\hbox{%
  \oalign{\hfil$\scriptstyle+$\hfil\cr
          \noalign{\kern-.3ex}
          $\scriptscriptstyle({-})$\cr}%
}}}}
\newcommand\varmp{\mathbin{\vcenter{\hbox{%
  \oalign{$\scriptstyle({+})$\cr
          \noalign{\kern-.3ex}
          \hfil$\scriptscriptstyle-$\hfil\cr}%
}}}}

Example

\documentclass{article}
\newcommand\varpm{\mathbin{\vcenter{\hbox{%
  \oalign{\hfil$\scriptstyle+$\hfil\cr
          \noalign{\kern-.3ex}
          $\scriptscriptstyle({-})$\cr}%
}}}}
\newcommand\varmp{\mathbin{\vcenter{\hbox{%
  \oalign{$\scriptstyle({+})$\cr
          \noalign{\kern-.3ex}
          \hfil$\scriptscriptstyle-$\hfil\cr}%
}}}}

\begin{document}
$a\varpm b\varmp c$
\end{document}

enter image description here

5
  • Is this still the 'best' solution out there? I find the vertical gap between + and - too large, and would like the parentheses to be smaller and somewhat denser.
    – Jost
    Commented Nov 26, 2014 at 15:10
  • @Jost You can reduce the spacing with \kern-0.5ex. About the parentheses, it would be possible to reduce them too, but I'm not sure it's worth trying.
    – egreg
    Commented Nov 26, 2014 at 15:23
  • You can add \hspace{-0.1ex} between the + sign to make the parentheses denser.
    – yoki
    Commented Nov 26, 2014 at 15:27
  • @yoki \mkern-3mu or so.
    – egreg
    Commented Nov 26, 2014 at 15:28
  • I'd replace \scriptstyle by \scriptscriptstyle
    – Convexity
    Commented Sep 12, 2022 at 18:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .