[Tex/LaTex] Is a cupdot symbol available in amsmath?

amsmathsymbols

I'm looking for a command in amsmath that makes something like \cupdot in MnSymbol (I hope spell it right…).

Look at the picture below:

capdot

i.e. a command that puts a dot instead of the "+".

One more thing: I don't want that the dot will be above the cup sign – the dot should be inside the cup.

Best Answer

If the preferred math font does not contain the symbol, it can be provided by putting \cup and \cdot together:

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\providecommand*{\cupdot}{%
  \mathbin{%
    \mathpalette\@cupdot{}%
  }%
}
\newcommand*{\@cupdot}[2]{%
  \ooalign{%
    $\m@th#1\cup$\cr
    \hidewidth$\m@th#1\cdot$\hidewidth
  }%
}
\makeatother

\begin{document}
\[ a\cupdot b\]
\end{document}

Result

Remarks:

  • \mathbin keeps the spacing of a binary operator (like \cup) for the new symbol.
  • The trick with \mathpalette ensures that the symbol adopts its size if used in fractions, subscripts, ...

Variant with vertically centered dot and \bigcupdot

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}

\makeatletter
\providecommand*{\cupdot}{%
  \mathbin{%
    \mathpalette\@cupdot{}%
  }%
}
\newcommand*{\@cupdot}[2]{%
  \ooalign{%
    $\m@th#1\cup$\cr
    \sbox0{$#1\cup$}%
    \dimen@=\ht0 %
    \sbox0{$\m@th#1\cdot$}%
    \advance\dimen@ by -\ht0 %
    \dimen@=.5\dimen@
    \hidewidth\raise\dimen@\box0\hidewidth
  }%
}

\providecommand*{\bigcupdot}{%
  \mathop{%
    \vphantom{\bigcup}%
    \mathpalette\@bigcupdot{}%
  }%
}
\newcommand*{\@bigcupdot}[2]{%
  \ooalign{%
    $\m@th#1\bigcup$\cr
    \sbox0{$#1\bigcup$}%
    \dimen@=\ht0 %
    \advance\dimen@ by -\dp0 %
    \sbox0{\scalebox{2}{$\m@th#1\cdot$}}%
    \advance\dimen@ by -\ht0 %
    \dimen@=.5\dimen@
    \hidewidth\raise\dimen@\box0\hidewidth
  }%
}
\makeatother

\begin{document}
\[ \bigcupdot a\cupdot b\]
\end{document}
\documentclass{article}
\usepackage{amsmath}

\makeatletter
\providecommand*{\cupdot}{%
  \mathbin{%
    \mathpalette\@cupdot{}%
  }%
}
\newcommand*{\@cupdot}[2]{%
  \ooalign{%
    $\m@th#1\cup$\cr
    \sbox0{$#1\cup$}%
    \dimen@=\ht0 %
    \sbox0{$#1\cdot$}%
    \advance\dimen@ by -\ht0 %
    \dimen@=.5\dimen@
    \hidewidth\raise\dimen@\hbox{$\m@th#1\cdot$}\hidewidth
  }%
}
\makeatother

\begin{document}
\[ \bigcupdot_{i=1}^{\infty} a_i\cupdot b \]
\end{document}

Result

Related Question