47

I am doing some display typography with an equation in it using the mathpazo package. At one point I have this fraction:

$\sqrt{-\frac{1}{9}}$

To me, the minus looks too long. I would like to make it shorter, but use of \textrm{-} gives me something that is too thick. Is there a way to get something with the thickness of the minus above, but of a similar length to a hyphen?

Edited to add: this is really for a special case of enormous type on a T-shirt design, and the standard minus sign looks strange. I would not do this for standard use of math in an article.

  • 14
    You do know that a minus sign is supposed to be longer than a hyphen? More generally, this is part of the font design and it's usually best for non-experts to 'take it or leave it' with a font: if you don't like it, pick another font. – Joseph Wright Nov 27 '10 at 18:49
  • 1
    @Joseph: +1, though I can see why one would prefer the negativity sign to be a bit shorter than the minus (though I'm not that experienced with math typography to know if it makes sense or not). – خالد حسني Nov 27 '10 at 19:03
  • 3
    @Khaled. See the related discussion here: http://tex.stackexchange.com/questions/4756/typesetting-of-negative-versus-minus – Joseph Wright Nov 27 '10 at 19:13
  • 8
    Yes, I know, but this is really for a special case of enormous type on a T-shirt design, and the standard minus sign looks strange. I would not do this for standard use of math in an article. – Michael Hoffman Nov 27 '10 at 21:06
  • Good point -- and it would be good to mention that in the question. – Hendrik Vogt Nov 28 '10 at 09:18

7 Answers7

43

I use \text{-} for a shorter minus sign.

Werner
  • 603,163
florian
  • 431
  • 4
  • 2
  • 3
    Hi and welcome, this is no minus sign. – Johannes_B Apr 15 '15 at 14:45
  • 11
    @Johannes_B The question clearly says it's for a t-shirt. So why not use whatever sign as long as it looks ok on a t-shirt? – Keks Dose Apr 16 '15 at 16:49
  • 2
    @KeksDose At the time of writing, i haven't read the question. My mistake. But still, the answer states that this is a short minus sign, which is not. As some other user could stumble upon this, in a hurry, looking for solutions, he might not read the question as well and should be informed. Of course, if he really is iin a hurry, he might not read my comment. – Johannes_B Apr 16 '15 at 18:52
28

Would something as simple as a \scalebox do?

\documentclass{article}
\usepackage{fixltx2e,graphicx,mathpazo}
\begin{document}
\( \sqrt{\scalebox{0.75}[1.0]{\( - \)}\frac{1}{9}} \)

% cf.
\( \sqrt{-\frac{1}{9}} \) 
\end{document}

Here, I am using the optional argument to \scalebox to set the vertical scaling to 1, so that only the horizontal size changes.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • 1
    Cool, I didn't know that \scalebox has an optional argument for the vertical scaling. (It might be worth explaining this in the answer.) – Hendrik Vogt Nov 29 '10 at 14:52
  • 5
    Simple macro for this: \newcommand{\unaryminus}{\scalebox{0.75}[1.0]{\( - \)}}. Then you can insert a unary minus with \unaryminus. – Danilo Bargen Jan 21 '13 at 13:53
24

There is actually a short dash with rounded ends in amsfonts. It is called \dabar@ and it is only used in the definition of \dasharrow=\dashrightarrow and \dashleftarrow (hence the name). It looks exactly like a shorter version of the Computer Modern minus sign, and is also compatible with mathpazo (which has a nearly identical minus sign).

I'm redeclaring this character below as a binary operator so that its spacing matches that of - in all situations.

\documentclass{article}

\usepackage{amsfonts} %% <- also included by amssymb
\DeclareMathSymbol{\shortminus}{\mathbin}{AMSa}{"39}

\usepackage{mathpazo} %% <- because the OP uses mathpazo, optional

\begin{document}

\[
    -5, \shortminus5
\]

\end{document}

mathpazo output

This is what it looks like with the mathpazo line commented out:

cm output

Circumscribe
  • 10,856
  • 2
    I had a similar problem, where I have a figure, with a label that reads "-w". The nomal minus looks freakishly long, but this is just right. – Rikki-Tikki-Tavi Feb 12 '19 at 16:28
  • 3
    Best answer to the question. Also, the syntax of (re)declaring symbols as math binary operators looks useful. – Cyriac Antony Jan 23 '21 at 13:49
8

for a unary minus that isn't going to be surrounded by a lot of other math -- you did say this would be on a t-shirt -- you might try an en-dash. it's thinner and wider than a hyphen, but at about the same height off the baseline as a hyphen, so you might want to fiddle a bit with the vertical position.

4

Here is a very hackish solution that draws a rule instead:

\def\minus{%
  \setbox0=\hbox{-}%
  \vcenter{%
    \hrule width\wd0 height \the\fontdimen8\textfont3%
  }%
}
$$
-A \quad \minus A
$$
\bye

Update: a LaTeX version:

\documentclass{article}
\usepackage{mathpazo}

\begin{document}
\newcommand\minus{%
  \setbox0=\hbox{-}%
  \vcenter{%
    \hrule width\wd0 height \the\fontdimen8\textfont3%
  }%
}
\[
-A \quad \minus A \quad \textrm{-}A
\]
\end{document}
3

I stumbled on this solution:

pdflatex of this latex file

\documentclass{article}
\def\-{\raisebox{.75pt}{-}}
\begin{document}
$ -8 \quad \-8 \quad {\scriptstyle -8} $
\end{document}
TeXnician
  • 33,589
Dan Gordon
  • 39
  • 1
1

I think this is best solution for this question.

\documentclass{article}
\usepackage{amssymb}

\DeclareMathSymbol{\shortminus}{\mathbin}{AMSa}{"39}

\begin{document}

\begin{equation} -5, \shortminus5 \end{equation}

\end{document}

  • Quite curiously, amssymb doesn't define a user level name for this symbol. It's defined as \dabar@ for use in \dashleftarrow and \dashrightarrow. But you find the same in another answer, namely https://tex.stackexchange.com/a/469724/4427 – egreg Jan 19 '24 at 17:36