I want to typeset

$y^{1- -1}$ 

in my document, but it looks strange. I'd like one minus sign to look like the operator and the other to look like it is designating a negative number.


[edit] I found a partial solution, I can write

$y^{1 - ^- 1}$

but I'm still wondering if there's something better.

  • the standard fonts don't have a any special character for the raised minus, so {}^{-} is probably as good as anything (you want that or {^-1} though otherwise -^- will superscript the infix - – David Carlisle Jan 30 '17 at 1:48
  • 2
    Do you want the first - symbol to denote the binary operator and the second - symbol to denote the unary (negation) operator? (Both symbols are "operators".) – Mico Jan 30 '17 at 2:48

The visual distinction that TeX makes between a binary operator and a unary operator is apparent when the material is in display or text style math mode, but not when the material is in script or scriptscript style math mode. This is because \medmuskip -- the "skip" (horizontal whitespace) that's inserted around binary operators -- is zero for material in script and scriptscript style mode.

In cases such as yours, it may be best to use parentheses to provide visual grouping.

Even if the material is in text and display style math mode, using parentheses may be a good method for eliminating any chance for confusion.

enter image description here

$y^{1-(-1)}=y^2 \quad y^{1--1}=y^2$

$1-(-1)=2\quad 1--1=2$
| improve this answer | |

Two imperfect solutions, one lifted from another question.

enter image description here


\newcommand{\unaryminus}{\scalebox{0.5}[0.72]{\( - \!\)}}
    $x^{1- \unaryminus1}$

| improve this answer | |
  • 1
    I've taken the liberty of providing a screenshot of your solution. Feel free to change and/or delete. – Mico Jan 30 '17 at 3:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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