I'm trying to remap the % character in mathmode to a different font. Typically, if I were to remap a character, I would do something like this:
Code: Select all
\DeclareSymbolFont{mymathvariables}{<encoding>}{<fontfamily>}{<weight>}{<style>}
\DeclareSymbolFontAlphabet{\mathnormal}{mymathvariables}
\DeclareMathSymbol{$}{\mathalpha}{mymathvariables}{"24}
which would map the "$" character to <fontfamily> in mathmode instead of the default fontfamily. However, remapping the % character is a little tricky as the % character is the comment symbol in LaTeX. So,
Code: Select all
\DeclareMathSymbol{%}{\mathalpha}{mymathvariables}{"25}
doesn't work as the LaTeX parser doesn't interpret anything after the % sign.Likewise, if I try something like this
Code: Select all
\DeclareMathSymbol{\%}{\mathalpha}{mymathvariables}{"25}
I get an error saying that "LaTeX Error Command `\%' already defined."
Does anyone know how to get around this problem? Thanks.