[texhax] Question about math fonts in LaTeX

Vafa Khalighi vafakhlgh at gmail.com
Thu Jan 20 17:31:03 CET 2011


I came up with a solution that I think will work however I am not aware of
its side-effects. If you know any of its side-effects, then please let me
know.

 \documentclass{minimal}

\makeatletter

\let\orig at mathbf\mathbf

\DeclareMathAlphabet {\new at mathbf}{OT1}{cmtt}{m}{n}

\renewcommand{\mathbf}[1]{\expandafter\@math at bf #1@}

\newcommand{\@math at bf}[1]{%

\ifx @#1% then terminate

\else

\ifx0#1\new at mathbf{0}\else\ifx1#1\new at mathbf{1}\else\ifx2#1\new at mathbf
{2}\else\ifx3#1\new at mathbf{3}\else\ifx4#1\new at mathbf
{4}\else\ifx5#1\new at mathbf{5}\else\ifx6#1\new at mathbf
{6}\else\ifx7#1\new at mathbf{7}\else\ifx8#1\new at mathbf
{8}\else\ifx9#1\new at mathbf{9}\else\orig at mathbf
{#1}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi

\expandafter\@math at bf

\fi

}

\makeatother

\begin{document}

$\mathbf{0s12s3xyz09876\alpha01234xyz}$

\end{document}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110121/bdb3c438/attachment.html>


More information about the texhax mailing list