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)

Lucas
  • 928
  • 3
  • 11
  • 20
  • 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 07 '12 at 15:27
  • Oh, weird. That's some strange behavior. – Lucas Jul 07 '12 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. – David Carlisle Jul 07 '12 at 16:03

1 Answers1

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.

David Carlisle
  • 757,742
  • Would \ensuremath be useful in the definitions for \minus and \plus? – JohnReed Jul 07 '12 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. – David Carlisle Jul 07 '12 at 18:11
  • @JohnReed See http://tex.stackexchange.com/q/34830/575 for that question. – Ryan Reich Jul 07 '12 at 18:12
  • Thanks to both of you for the comments and link. Always learning... – JohnReed Jul 07 '12 at 19:36
  • This is, of course, how I did it in the first place. The badness of how they look is what motivated the use of \scalebox. I'd rather hack it to make it look how I want than do it properly so that it doesn't. – Lucas Jul 08 '12 at 06:06
  • 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. – David Carlisle Jul 08 '12 at 09:38