1

I searched in the TSE and found a solution to define the \bigcupdot. As you see the size of the dot in the \bigcupdot is fixed no matter whether it's in display style or not. I tried to use \ifx command to make the dot automatically change its size but failed! Who can fix the following codes? Any help is welcome.

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\makeatletter
\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{%
    \ifx\displaystyle\scalebox{1.7}{$\m@th#1\cdot$}\else
    \ifx\textstyle\scalebox{1.4}{$\m@th#1\cdot$}\else
    \ifx\scriptstyle\scalebox{1.2}{$\m@th#1\cdot$}\else
    \scalebox{1.1}{$\m@th#1\cdot$}\fi\fi\fi
    }%
    \advance\dimen@ by -\ht0 %
    \dimen@=.5\dimen@
    \hidewidth\raise\dimen@\box0\hidewidth
  }%
}
\makeatother

\begin{document} [ \bigcupdot a=\biguplus mn] \end{document}

M. Logic
  • 4,214

1 Answers1

1

You can parametrize the scaling factor:

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

\makeatletter \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{@dotscale{#1}}{$\m@th#1\cdot$}}% \advance\dimen@ by -\ht0 \dimen@=.5\dimen@ \hidewidth\raise\dimen@\box0\hidewidth }% } \newcommand{@dotscale}[1]{% \ifx#1\displaystyle 1.7\else\ifx#1\textstyle 1.4\else \ifx#1\scriptstyle 1.2\else 1.1\fi\fi\fi } \makeatother

\begin{document}

$\displaystyle\bigcupdot$ $\textstyle\bigcupdot$ $\scriptstyle\bigcupdot$ $\scriptscriptstyle\bigcupdot$

\end{document}

enter image description here

M. Logic
  • 4,214
egreg
  • 1,121,712