<div dir="ltr"><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
</blockquote><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr"><div class="im"><br></div>I am not much familar with xparse. Can you tell me why this does not work:<div class="im">
<br><br>

<p style="margin: 0px; text-indent: 0px;">\documentclass{minimal}</p>
<p style="margin: 0px; text-indent: 0px;">\usepackage{xparse}</p>
<p style="margin: 0px; text-indent: 0px;">\DeclareSymbolFont{monospace}{OT1}{cmtt}{m}{n}</p>
</div><p style="margin: 0px; text-indent: 0px;">\newcommand{\test}[1]{%</p>
<p style="margin: 0px; text-indent: 0px;">\textbf{#1}</p><div class="im">
<p style="margin: 0px; text-indent: 0px;">\ExplSyntaxOn</p>
<p style="margin: 0px; text-indent: 0px;">\cs_new_eq:NN \orig_mathbf:n \mathbf</p>
<p style="margin: 0px; text-indent: 0px;">\RenewDocumentCommand \mathbf { m } {</p>
<p style="margin: 0px; text-indent: 0px;"> \orig_mathbf:n {</p>
<p style="margin: 0px; text-indent: 0px;">   \prg_stepwise_inline:nnnn { `0 } { \c_one } { `9 } {</p>
<p style="margin: 0px; text-indent: 0px;">     \mathcode ##1 = \numexpr "100 * \symmonospace + ##1 \relax</p>
<p style="margin: 0px; text-indent: 0px;">   }</p>
<p style="margin: 0px; text-indent: 0px;">   #1</p>
<p style="margin: 0px; text-indent: 0px;"> }</p>
<p style="margin: 0px; text-indent: 0px;">}</p>
<p style="margin: 0px; text-indent: 0px;">\ExplSyntaxOff</p>
<p style="margin: 0px; text-indent: 0px;">}</p>
<p style="margin: 0px; text-indent: 0px;">\begin{document}</p>
</div><p style="margin: 0px; text-indent: 0px;">\test{test}</p><div class="im">
<p style="margin: 0px; text-indent: 0px;">$abc 012 \mathbf{abc 012} abc 012$</p>
<p style="margin: 0px; text-indent: 0px;">\end{document}</p><br></div></div></blockquote><div><br><br><br>No worries. I got it. <br></div></div><br></div>