[texhax] Question about math fonts in LaTeX

Vafa Khalighi vafakhlgh at gmail.com
Thu Jan 20 17:59:32 CET 2011


>
> Here is a hackish solution:
>
> \documentclass{minimal}
> \usepackage{xparse}
> \DeclareSymbolFont{monospace}{OT1}{cmtt}{m}{n}
> \ExplSyntaxOn
> \cs_new_eq:NN \orig_mathbf:n \mathbf
> \RenewDocumentCommand \mathbf { m } {
>  \orig_mathbf:n {
>    \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {
>      \mathcode ##1 = \numexpr "100 * \symmonospace + ##1 \relax
>    }
>    #1
>  }
> }
> \ExplSyntaxOff
> \begin{document}
> $abc 012 \mathbf{abc 012} abc 012$
> \end{document}
>
>
>
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110121/3855b423/attachment.html>


More information about the texhax mailing list