3

I use the following preamble to get a sans serif font in my docs:

\usepackage{lmodern}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}

The siunitx package works well with this, producing all its output in the same sans serif font as the surrounding text.

But when I try to make the maths sans serif as well:

\usepackage{sansmath}
\sansmath

The maths outputs in sans serif, but anything from siunitx eg \num{2.3e-5} now outputs in the standard serif font!

Is there a way to get everything in sans serif font?

closed as unclear what you're asking by schtandard, Stefan Pinnow, Raaja, Tiuri, siracusa Jul 31 at 11:59

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    Try with \usepackage[detect-all]{siunitx} – user11232 May 10 '15 at 8:16
  • @HarishKumar ^^^^^ – Johannes_B May 10 '15 at 9:37
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – user11232 May 10 '15 at 11:23
  • 1
    It didn't work for me though. – Zack Fair May 23 '17 at 8:22
  • Can you please add your working code? because for me \usepackage[detect-all]{siunitx} doesn't work. – gvgramazio May 6 '18 at 14:36

Browse other questions tagged or ask your own question.