[texhax] Question about math fonts in LaTeX

Vafa Khalighi vafakhlgh at gmail.com
Fri Jan 21 06:14:14 CET 2011


On Fri, Jan 21, 2011 at 8:30 AM, jfbu <jfbu at free.fr> wrote:

> Sorry for posting twice, but I do not see my posts on the mailing list,
> and did not receive them (although I checked that my profile does
> say to include me in the list of the recipients of my own messages)
>
> motivated by Philipp's code, I can propose a further method
>
> (of course OT1 can be T1, etc..)
>
> \documentclass{minimal}
> \DeclareSymbolFont{fontfordigits}{OT1}{cmtt}{m}{n}
>
> \newcommand\hackit{%
> \edef\tmp{0\the\symfontfordigits}%
> \mathcode`\0=\expandafter"\tmp30\relax%
> \mathcode`\1=\expandafter"\tmp31\relax%
> \mathcode`\2=\expandafter"\tmp32\relax%
> \mathcode`\3=\expandafter"\tmp33\relax%
> \mathcode`\4=\expandafter"\tmp34\relax%
> \mathcode`\5=\expandafter"\tmp35\relax%
> \mathcode`\6=\expandafter"\tmp36\relax%
> \mathcode`\7=\expandafter"\tmp37\relax%
> \mathcode`\8=\expandafter"\tmp38\relax%
> \mathcode`\9=\expandafter"\tmp39\relax}
>
> \let\oldmathbf\mathbf
> \renewcommand\mathbf[1]{{\oldmathbf{\hackit\relax#1}}}
>
> \begin{document}
>
> \[\mathbf{0s12{s3xyz098}76\alpha01234xyz}\quad
> 0s12{s3xyz098}76\alpha01234xyz\]
>
> \end{document}
>
> Regards,
>
> Jean-Francois Burnol
>
>
>
>

Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110121/ff0d6aa1/attachment.html>


More information about the texhax mailing list