7

I'm doing some CS theory papers and need to use a monus operator.

Picture below:

enter image description here

What package should I use to be able to use it? I've Google'd, but nothing came up.

Thanks for the help.

jn1kk
  • 241
  • @Werner Any idea why Detexify2 fails to solve this? Even after repeated tries? – Masroor Dec 01 '13 at 01:37
  • @MMA: I tried as well, but the symbol is available in the Comprehensive LaTeX Symbol List (and therefore a duplicate). It may be a very low sought-after symbol, and Detexify can be trained to recognize symbols once it's found. Minimal training -> low recognition, perhaps. – Werner Dec 01 '13 at 01:39
  • @Werner I also had to look up CLST when Detexify2 failed. Just wondering why it failed, I recommend it to other people often. – Masroor Dec 01 '13 at 01:40
  • It would help to see this symbol relative to other text, to judge both the scale and relative positioning that is desired. – Steven B. Segletes Dec 01 '13 at 02:49
  • 1
    To the voters for closing: there are \dotdiv or \dotminus in the list of symbols, but they *don't* solve the problem. Closing as a duplicate of "how to look up" is meaningful only if the symbol is available without any special package that might change the appearance of all symbols. – egreg Dec 01 '13 at 10:29
  • @egreg: I'm inclined to disagree here, since there was no context given other than "I'm looking for a symbol like this" (despite the OP preferring a graphic/tikz solution). If the question is closed as a duplicate and this is not what the OP was after, I'm sure re-open votes would be cast. – Werner Dec 02 '13 at 07:19

3 Answers3

6

Keeping this up for visibility since there doesn't seem to be any similar question on StackExchange.

Use \dotdiv from package mathabx.

jn1kk
  • 241
5

While \dotdiv from mathabx could be used (see Importing a Single Symbol From a Different Font), it would waste a math family.

Here's a way without any package other than amsmath.

\documentclass{article}
\usepackage{amsmath}

\providecommand{\dotdiv}{% Don't redefine it if available
  \mathbin{% We want a binary operation
    \vphantom{+}% The same height as a plus or minus
    \text{% Change size in sub/superscripts
      \mathsurround=0pt % To be on the safe side
      \ooalign{% Superimpose the two symbols
        \noalign{\kern-.35ex}% but the dot is raised a bit
        \hidewidth$\smash{\cdot}$\hidewidth\cr % Dot
        \noalign{\kern.35ex}% Backup for vertical alignment
        $-$\cr % Minus
      }%
    }%
  }%
}

\begin{document}
$a-b\dotdiv c_{\dotdiv}$
\end{document}

enter image description here

egreg
  • 1,121,712
  • 1
    how does this differ from \dotdiv or \dotminus or unicode U+2238? if it is really different, and a published reference can be cited, i will be happy to submit it for unicode consideration. – barbara beeton Dec 01 '13 at 15:10
  • @barbarabeeton I don't think it differs from those symbols. It's just the usual problem that loading mathabx has the known side effects. – egreg Dec 01 '13 at 16:51
  • Thanks you helped me alot. You should add \protect before \ooalign if you dont want to get into trouble when using the new symbol inside a caption :) – Florian May 24 '23 at 13:01
  • 1
    @Florian Better yet, replace \providecommand{\dotdiv} with \ProvideDocumentCommand{\dotdiv}{} (don't forget the {}). – egreg May 24 '23 at 13:56
4

This is obsession!

\documentclass{article}
\usepackage{tikz,amsmath}
\newcommand{\Monus}{%
  \mathop{%
  \text{%
  \begin{tikzpicture}
  \fill (0,1ex) circle (0.75ex);
  \draw[thick] (-3ex,-.5ex) -- (3ex,-.5ex);
  \end{tikzpicture}%
}
}
}
\begin{document}
 $A \Monus B_{\Monus B}$
\end{document}

enter image description here