[texhax] changing the font of % in math mode in LaTeX

Heiko Oberdiek heiko.oberdiek at googlemail.com
Thu Jul 7 16:58:20 CEST 2011


On Thu, Jul 07, 2011 at 10:12:13PM +1000, Vafa Khalighi wrote:

> Sorry that should be \mathbin and not \mathord.
> 
> On Thu, Jul 7, 2011 at 10:11 PM, Vafa Khalighi <vafa018 at gmail.com> wrote:
> 
> > Is \DeclareMathSymbol{`\%}{\mathord}{operators}{`%} the right way to do it?

The first argument is not a number, but a command sequence or active char.
In the last argument you get a problem with the precent as comment char.

\documentclass{article}
\DeclareMathSymbol{\modulo}{\mathbin}{operators}{`\%}
\begin{document}
\begin{equation}
a \equiv b \modulo m
\end{equation}
\end{document}

Yours sincerely
  Heiko Oberdiek


More information about the texhax mailing list