[Tex/LaTex] The modulo two sum sign in LaTeX

math-modemath-operatorssymbols

I would like to know how I can obtain the 'modulo two sum' sign (unicode 2A0A i.e., the letter sigma with a circle in its middle).

enter image description here

I know I can obtain it by using the unicode-math package. But does anybody know an alternative method to obtain it? For information, I use TexMaker. Thanks for answering me. Best regards.

Best Answer

Here's an alternative that uses TikZ. With the amsmath and tikz packages loaded, put the following in your preamble

\newcommand\constructosum[3]{%
    \begin{tikzpicture}[baseline=(char.base), inner sep=0, outer sep=0]
        \draw (#1,0) circle (#2); 
        \node (char) at (0,0) {$#3\sum$}; % Want to define a second symbol for inline...
    \end{tikzpicture}%
}

\newcommand{\modtwosum}{\mathop{\mathchoice
        {\constructosum{-0.3ex}{0.1}{\displaystyle}}
        {\constructosum{-0.3ex}{0.06}{\textstyle}}
        {\constructosum{-0.2ex}{0.04}{\scriptstyle}}
        {\constructosum{-0.15ex}{0.03}{\scriptscriptstyle}}
    }\displaylimits
}

This defines four operators corresponding to display style math environments, inline math, script size math and script script size math in that order. Each has a coordinate for the loop which may be adjusted, and a size for the loop. For example the display style version has

\constructosum{-0.3ex}{0.1}{\displaystyle}

which places the loop at -0.3ex (moves it horizontally backwards a bit) with a radius of 0.1cm. To use it, simply use the new operator \modtwosum inside any math environment. e.g.

\[
G=\modtwosum_a^b H
\]

A demo of this operator in each of the four situations that may occur:

enter image description here

Thanks goes to egreg for pointing out that I could reduce the original version of this with a helper \newcommand to contain the TikZ code.

Related Question