Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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)

share|improve this question
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 '12 at 15:27
    
Oh, weird. That's some strange behavior. –  Lucas Jul 7 '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 7 '12 at 16:03
add comment

1 Answer

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.

share|improve this answer
    
Would \ensuremath be useful in the definitions for \minus and \plus? –  JohnReed Jul 7 '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 7 '12 at 18:11
    
@JohnReed See tex.stackexchange.com/q/34830/575 for that question. –  Ryan Reich Jul 7 '12 at 18:12
    
Thanks to both of you for the comments and link. Always learning... –  JohnReed Jul 7 '12 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. –  David Carlisle Jul 8 '12 at 9:38
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.