Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Try this first. tex.stackexchange.com/questions/14/how-to-look-up-a-symbol –  qubyte Mar 1 '12 at 13:18
add comment

3 Answers

up vote 5 down vote accepted

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.

share|improve this answer
    
That's OK. When using the displaymath mode (and not the math mode), the letters and the circle appear at their right places in the 2nd solution. For the first, even in displaymath, the circle is slightly moved to the right with regard to its expected position. Thanks a lot. –  Robert Mar 1 '12 at 14:44
    
What you mean? displaymath is math mode. You'll have to define a second symbol for inline math though, but this will be just a variation on the above. –  qubyte Mar 1 '12 at 14:58
    
displamath : \begin{displaymath} ... \end{displaymath} and math : $ ... $ –  Robert Mar 1 '12 at 15:01
    
My code will work in all equation environments except $...$ style inlines. These include the usual \[...\], equation, align etc. –  qubyte Mar 1 '12 at 15:05
2  
@MarkS.Everitt I wouldn't use \DeclareMathOperator*, but \mathop and \displaylimits. The macro is intended for defining "text" operators, rather than symbols, and does many things which are useless here. –  egreg Mar 1 '12 at 23:51
show 7 more comments

The fdsymbol package provides this symbol as \osum or \modtwosum:

\documentclass{article}
\usepackage{fdsymbol}
\begin{document}
$\modtwosum$
\end{document}

Result:

the \modtwosum symbol as provided by fdsymbol

However, this changes the math font of your whole document. If that's not what you want, you can just import this single symbol without loading fdsymbol:

\documentclass{article}
\usepackage{amsmath}
\DeclareFontFamily{U}{FdSymbolE}{}
\DeclareFontShape{U}{FdSymbolE}{m}{n}{
    <-7.1> s * [1.0] FdSymbolE-Book
    <7.1-> s * [1.0] FdSymbolE-Book
}{}
\DeclareFontShape{U}{FdSymbolE}{b}{n}{
    <-7.1> s * [1.0] FdSymbolE-Medium
    <7.1-> s * [1.0] FdSymbolE-Medium
}{}
\DeclareSymbolFont{fdlargesymbols}{U}{FdSymbolE}{m}{n}
\SetSymbolFont{fdlargesymbols}{bold}{U}{FdSymbolE}{b}{n}
\DeclareMathSymbol{\tosum}{\mathop}{fdlargesymbols}{"3A}
\DeclareMathSymbol{\dosum}{\mathop}{fdlargesymbols}{"3B}
\makeatletter
\def\modtwosum{\DOTSB\tosum\slimits@}
\makeatother
\begin{document}
$\modtwosum$
\end{document}
share|improve this answer
2  
Doesn't this package completely change the mathematics typeface though? –  qubyte Mar 1 '12 at 14:55
    
A compilation error appears at line 1548 in the release I use: "\vec is already defined"... –  Robert Mar 1 '12 at 15:21
3  
@MarkS.Everitt You're right, it does replace the whole math alphabet. See my updated answer on how to import only this very symbol, without affecting the rest. –  diabonas Mar 1 '12 at 15:39
    
@Robert Most likely one the packages you use is not compatible with fdsymbol (e. g. amssymb). In this case, try my updated solution which doesn't rely on loading fdsymbol to avoid such conflicts. –  diabonas Mar 1 '12 at 15:41
add comment

If you find no other alternative, then perhaps this will work. You'll need to use the mathtools package. Use the following declaration in your preamble:

\DeclareMathOperator*{\osum}{\mathrlap{\hspace{1ex}\circ}{\sum}}

Now you can use the new \osum operator, and it'll behave like the usual \sum operator with respect to subscripts and superscripts.

G=\osum_a^b H

enter image description here

share|improve this answer
    
mathtools loads amsmath. –  Torbjørn T. Mar 1 '12 at 13:58
    
My bad. Thanks. –  qubyte Mar 1 '12 at 14:11
    
Thanks for your answer. But when using this code the letters a, b and the circle appears on the right side of sigma. I'm investigating... –  Robert Mar 1 '12 at 14:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.