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 make the \circ symbol smaller and centered when using it between two letters. For example, I want to say

\begin{align}
\forall\  a,b,c \in S,\ a\circ( b\circ c)= (a\circ b)\circ c
\end{align}

The default symbol is just too big for my tastes. Please bear in mind that I am a newbie.

Edit: My preamble.

\documentclass[letterpaper,12pt]{memoir}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{braket}
\usepackage{graphicx}
\usepackage{fancyvrb}
setlrmarginsandblock{1.25in}{1.0in}{1}
\setulmarginsandblock{1in}{1in}{1}
\checkandfixthelayout

\theoremstyle{plain} \newtheorem{theorem}{Theorem} \newtheorem{proposition}  {Proposition} \newtheorem{lemma}{Lemma} \newtheorem*{corollary}{Corollary}
\theoremstyle{definition} \newtheorem{definition}{Definition} \newtheorem{conjecture}   {Conjecture} \newtheorem*{example}{Example} \newtheorem{algorithm}{Algorithm}
\theoremstyle{remark} \newtheorem*{remark}{Remark} \newtheorem*{note}{Note}      \newtheorem{case}{Case}
\theoremstyle{algorithm} \newtheorem*{properties}{Properties}

\mathchardef\ordinarycolon\mathcode`\:
\mathcode`\:=\string"8000
\begingroup \catcode`\:=\active
\gdef:{\mathrel{\mathop\ordinarycolon}}
\endgroup

\begin{document}
\include{front_cover}
\tableofcontents
\include{lecture_3}
\end{document}
share|improve this question
2  
The code is not using \circ at all. \cdot is already quite small and centered. Thus make a complete example that would also show the fonts you are using. –  Heiko Oberdiek Nov 25 '12 at 21:20
    
Sorry, changed it now. –  Antillar Maximus Nov 25 '12 at 21:26

2 Answers 2

up vote 8 down vote accepted

I'm usually pretty satisfied with the size of \circ. But if you want it reduced you can do like this

\documentclass{article}
\newcommand{\ccirc}{\mathbin{\mathchoice
  {\xcirc\scriptstyle}
  {\xcirc\scriptstyle}
  {\xcirc\scriptscriptstyle}
  {\xcirc\scriptscriptstyle}
}}
\newcommand{\xcirc}[1]{\vcenter{\hbox{$#1\circ$}}}
\begin{document}
$f\circ g$

$f\ccirc g$

$\displaystyle\lim_{f\ccirc g}$
\end{document}

The first line is just for comparison.

enter image description here

How to "exchange" the \circ command with the new one? Just replace the given code with

\let\latexcirc=\circ
\newcommand{\ccirc}{\mathbin{\mathchoice
  {\xcirc\scriptstyle}
  {\xcirc\scriptstyle}
  {\xcirc\scriptscriptstyle}
  {\xcirc\scriptscriptstyle}
}}
\newcommand{\xcirc}[1]{\vcenter{\hbox{$#1\latexcirc$}}}
\let\circ\ccirc

You need to comment out only the last line in case you want to return back to the default.

share|improve this answer
    
Thank you. This also works for me. What is the defference between this one and the answer above? –  Antillar Maximus Nov 26 '12 at 3:47
    
@AntillarMaximus My answer uses more efficient ways for selecting a smaller circle and spacing it; moreover it works also in subscripts and superscripts, which Count Zero's doesn't. –  egreg Nov 26 '12 at 10:20
    
How could I let \circ be your \ccirc but keeping the usual \circ in \oldcirc but avoiding TeX capacity exceeded, sorry [grouping levels=255]. when compiling my document? –  Manuel Nov 28 '12 at 2:05
    
@Manuel You need to use a "copy" of \circ. I added a workaround –  egreg Nov 28 '12 at 10:11
    
Thank you @egreg. –  Manuel Nov 28 '12 at 10:40

My solution is this:

\newcommand{\ccirc}{\kern0.5ex\vcenter{\hbox{$\scriptstyle\circ$}}\kern0.5ex}

in the preamble and then:

\begin{align}
\forall\ a,b,c \in S,\ a\ccirc(b\ccirc c)= (a\ccirc b)\ccirc c
\end{align}

It may seem convoluted, but \circ requires math mode, so with \scriptstyle you can set the size. Then \vcenter does some silly thing inserting huge horizontal spaces to the point where the rest of the equation is off the page, so I must force it with \hbox to behave. If I just left it like that, the symbols next to the newly defined \ccirc would be too close, so I added some kerning. Whew!... :)

Of course, you can fiddle with the size, by using a different command from \scriptsize.

share|improve this answer
    
Why not \newcommand{\ccirc}{\kern0.5ex\vcenter{\hbox{$\scriptstyle\circ$}}\kern0.5ex}? Seems a little less convoluted and still achieves the same effect. –  A.Ellett Nov 25 '12 at 22:20
    
Wouldn't \mathbin help better than that pair of \kern0.5ex spacings? –  egreg Nov 25 '12 at 22:22
    
But if you put it in a limit \lim_{f \ccirc g} it's weird. It doesn't fit good. –  Manuel Nov 25 '12 at 22:22
    
@A.Ellett: Thanks! I updated my answer. –  Count Zero Nov 25 '12 at 22:33
    
@Manuel: The problem is that \scriptstyle doesn't set the style relatively, so it won't fit it to the subscript you are using. –  Count Zero Nov 25 '12 at 22:40

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.