# pgfmathprintnumber in bold and/or sans serif

I've set some pgfkeys such as precision=2 and use comma. Now I wonder how do I get the results of

\pgfmathprintnumber{123.567}


to be bold and/or sans serif?

I thought this is easy, but everything I find online is just concerning plots, and does not work for me.

• A good answer to your question heavily depends on what you are doing: could you post an example starting with \documentclass, ending with \end{document}? – Claudio Fiandrino Jun 15 '13 at 14:34

Regular text formatting doesn't apply to math mode and \pgfmathprintnumber inherently uses \ensuremath behind the scenes around the number. You can turn it off via
\pgfmathprintnumber[assume math mode=true]{123.567}

But I recommend keeping the math mode and (changing the math font) or (using \mathbf{} type of math font modifiers).
• ah ok, did not know that it uses \ensuremath. thanks. – sauerburger Jun 15 '13 at 15:25
• additionally, how would one change the font size \pgfmathprintnumber prints? – joaocandre Nov 16 '13 at 20:36