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


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}

Then it will assume that it is already in the math mode and won't modify the number printing. That means the number will be interpreted as regular text.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.