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.

5
  • 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, 2010 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, 2010 at 19:03
  • 3
    @Khaled. See the related discussion here: tex.stackexchange.com/questions/4756/…
    – Joseph Wright
    Nov 27, 2010 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. Nov 27, 2010 at 21:06
  • Good point -- and it would be good to mention that in the question. Nov 28, 2010 at 9:18

7 Answers 7

29

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.

2
  • 2
    Cool, I didn't know that \scalebox has an optional argument for the vertical scaling. (It might be worth explaining this in the answer.) Nov 29, 2010 at 14:52
  • 5
    Simple macro for this: \newcommand{\unaryminus}{\scalebox{0.75}[1.0]{\( - \)}}. Then you can insert a unary minus with \unaryminus. Jan 21, 2013 at 13:53
44

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

3
  • 3
    Hi and welcome, this is no minus sign.
    – Johannes_B
    Apr 15, 2015 at 14:45
  • 12
    @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, 2015 at 16:49
  • 3
    @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, 2015 at 18:52
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

2
  • 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. Feb 12, 2019 at 16:28
  • 3
    Best answer to the question. Also, the syntax of (re)declaring symbols as math binary operators looks useful. Jan 23, 2021 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}
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}
1
  • 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 tex.stackexchange.com/a/469724/4427
    – egreg
    Jan 19 at 17:36

You must log in to answer this question.

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