1

I've made little superscript plus and minus signs for something by defining

\newcommand{\minus}[1]{{#1}^{\scalebox{0.8}{-}}}
\newcommand{\plus}[1]{{#1}^{\scalebox{0.6}{\!+}}}

the problem is that compared to the plus, the minus looks really heavy. See for yourselves: Stupid + and -

I think I'd rather have a heavier plus. Any thoughts? (other than that I should be less anal)

3
  • 6
    Your plus and minus should be in math mode here, which in particular means that the minus is not a minus: you've got a hyphen. Try \newcommand{\minus}[1]{{#1}^{\scalebox{0.8}{$-$}}}
    – Joseph Wright
    Jul 7, 2012 at 15:27
  • Oh, weird. That's some strange behavior.
    – Lucas
    Jul 7, 2012 at 15:31
  • 1
    Alos ypu really don't want to use \scalebox If you had just use \pi^- and \pi++ they would naturally be smaller size from teh scriptstyle font. By using a box command you go out of math mode so back to text size and then have to shrink by hand. Jul 7, 2012 at 16:03

1 Answer 1

11

You should use math mode not text mode with shrinking via the graphics driver.

\newcommand{\minus}[1]{{#1}^{-}}
\newcommand{\plus}[1]{{#1}^{+}}

This will make a minus sign not a hyphen, and be naturally smaller because of the superscript.

6
  • Would \ensuremath be useful in the definitions for \minus and \plus?
    – JohnReed
    Jul 7, 2012 at 18:06
  • well perhaps except really you should know if you are in math or not. definitions like \alpha or the primitive ^ superscripting operation only work in math mode, and TeX really expects the author to maintain that distinction. Blurring it with \ensuremath doesn't always make things clearer. Jul 7, 2012 at 18:11
  • @JohnReed See tex.stackexchange.com/q/34830/575 for that question.
    – Ryan Reich
    Jul 7, 2012 at 18:12
  • Thanks to both of you for the comments and link. Always learning...
    – JohnReed
    Jul 7, 2012 at 19:36
  • 3
    You didn't say that you had tried that, It has the distinct advantage of taking the - and + from the same, mathematical font such that the - will be the same size and aligned with the bar of the + in almost all fonts. Using a hyphen character from a text font is just wrong, and a + from a text font may look OK, but isn't ideal either. Jul 8, 2012 at 9:38

You must log in to answer this question.

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