# Defining a new binary operator

I am trying to find a way to define the % symbol as a binary operator that behaves essentially like the + symbol. I have heard of the command DeclareMathOperator, but I was under the impression that this was for operators like the logarithm and sine functions. What is an appropriate command? An an example, I would like the following to lines to have similar spacing.

\begin{equation*}
a % b % c
\end{equation*}
\begin{equation*}
a + b + c
\end{equation*}

-

If using macros to represent the new symbol is fine, then you have a couple of options:

\documentclass{article}
\newcommand{\percA}{\mathbin{\%}}
\newcommand{\percB}{\mathbin{\ooalign{$\hidewidth\%\hidewidth$\cr$\phantom{+}$}}}
\begin{document}
$\begin{array}{|@{}c@{}|} a \percA b \percA c \\[\jot] % Option A a \percB b \percB c \\[\jot] % Option B a + b + c % Control \end{array}$
\end{document}


Option A \percA inserts \% as a binary math symbol using \mathbin{\%}. However, \% is slightly wider than +. That's where option B provides \percB which oversets a zero-width \% with a \phantom{+}.

For the inner working behind \ooalign, see \subseteq + \circ as a single symbol (“open subset”).

-
Why the Google short link? I don't remember exactly where, but I think short links are generally frowned upon on SE. –  doncherry Nov 13 '12 at 5:36
meta.stackexchange.com/q/29518/162565, meta.stackexchange.com/q/99136/162565, meta.stackexchange.com/q/64450/162565 -- not a clear ban of shortened URLs, but definitely a distinct dislike. –  doncherry Nov 13 '12 at 5:42
@doncherry: The motivation was purely out of self-interest to track badge progress, since Google's URL shortner provides a "CLICKS" tally. There's no other way to estimate progress on badges like Announcer, Booster or Publicist. Do you know whether a tool for tracking these badges exist, even through some Ninja search or the Data Explorer? –  Werner Nov 13 '12 at 6:00
No, none that I know of. While I don't think it's very likely, there might yet be one; I just recently learned that anonymous and low-rep user feedback is accessible via data.se .. even though it seems broken now, these queries used to work: data.stackexchange.com/tex/query/73917/…, data.stackexchange.com/tex/query/60668/feedback-on-my-posts –  doncherry Nov 13 '12 at 6:05
@doncherry: This seems to still be an open question on Meta.SO, dating back to 2010: View progress towards Announcer badge. Even then, one of the mods "suggest" a URL shortner. :-| –  Werner Nov 13 '12 at 6:26