19

I need the symbol "dot over dash" or "dot over minus", but I am unable to find it in a list of LaTeX symbols. When composing it via \dot{-}, the dot is so hight, that it looks weired. It should look like this:

enter image description here

Did I overlook the symbol in the list or how can I compose it?

  • 2
    have you looked for it in this list? – Nils L May 14 '13 at 09:39
  • I can’t post this as an answer, but an alternative to morbusg’s/egreg’s solution which does not need arbitrary shifts, and also uses a less heavy dot (which I find more pleasing to the eye) is \mathbin{\scriptstyle\dot{\smash{\textstyle-}}}. One can define a macro working also in sub/superscripts with \newcommand\dotminus{\mathbin{\mathchoice{\scriptstyle\dodotminus\displaystyle}{\scriptstyle\dodotminus\textstyle}{\scriptscriptstyle\dodotminus\scriptstyle}{\scriptscriptstyle\dodotminus\scriptscriptstyle}}} \newcommand\dodotminus[1]{\dot{\smash{#1-}}}. – Emil Jeřábek Nov 04 '13 at 16:40
  • I also observe that while plain \mathbin{\dot-} looks awful in LaTeX, it works just perfect in Mathjax, strangely enough. – Emil Jeřábek Nov 04 '13 at 16:43
  • @ManuelFaux Could you help to comment how to input the symbol "dot over dash" ? – SOUser Apr 26 '18 at 13:29

5 Answers5

15

A variation of morbusg solution that works also for subscripts and superscripts.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\dotminus}{\mathbin{\text{\@dotminus}}}

\newcommand{\@dotminus}{%
  \ooalign{\hidewidth\raise1ex\hbox{.}\hidewidth\cr$\m@th-$\cr}%
}
\makeatother

\begin{document}
$a\dotminus b_{c\dotminus d}$ \fbox{$\dotminus$}

$a-b_{c-d}$ \fbox{$-$}
\end{document}

The formulas are repeated with - to see that the space occupied is the same.

enter image description here

egreg
  • 1,121,712
10

According to the Comprehensive List of LateX symbols (a very useful guide, by the way), the \dotdiv command (part of the mathabx package) produces the desired operator.

ach
  • 1,024
6

Here's a try at building one:

\def\dotminus{\mathbin{\ooalign{\hss\raise1ex\hbox{.}\hss\cr
  \mathsurround=0pt$-$}}}

$ a \dotminus b $
\bye

enter image description here

morbusg
  • 25,490
  • 4
  • 81
  • 162
3

The official unicode name is dot minus, and among the packages that have it is mnsymbol:

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{mnsymbol,lmodern}

\begin{document}
$a \dotminus b$
\end{document}

enter image description here

Nils L
  • 9,716
  • 1
    That solution works, but the mnsymbol package changes my other symbols (e.g. the equals sign gets narrower). – Manuel Faux May 14 '13 at 10:00
  • The issue is that mnsymbol (unlike, say, amssymb) is not just a motley collection of supplementary symbols for Computer Modern: it’s a mathematics support package for documents using Adobe Minion, and should therefore not be used unless the text font is also changed. – Alex Shpilkin Mar 23 '21 at 21:41
3

If using unicode-math is an option, you could input it directly

\documentclass{article}
\usepackage{unicode-math}
    \setmathfont{XITS Math}
\begin{document}
    $A ∸ B = θ$
\end{document}

Result of the above code

Evpok
  • 2,832