[texhax] Question about math fonts in LaTeX

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


>
>
> I am not much familar with xparse. Can you tell me why this does not work:
>
>
> \documentclass{minimal}
>
> \usepackage{xparse}
>
> \DeclareSymbolFont{monospace}{OT1}{cmtt}{m}{n}
>
> \newcommand{\test}[1]{%
>
> \textbf{#1}
>
> \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}
>
> \test{test}
>
> $abc 012 \mathbf{abc 012} abc 012$
>
> \end{document}
>
>


No worries. I got it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110121/6106151b/attachment.html>


More information about the texhax mailing list