From page 5 of the siunitx manual:
By default, all text is typeset in the current upright, serif math font. This can be changed by setting the appropriate options: \sisetup{detect-all}
will use the current font for typesetting.
Thus, just replace the options detect-family
and detect-weight
in the preamble's \sisetup{...}
instruction with detect-all
, and your students will be all set.
Incidentally, if you run \addto\extrasngerman{\sisetup{locale=DE}}
after loading the babel
package with the option ngerman
, you don't have to specify the options output-decimal-marker={\text{,}}
exponent-product = \cdot
, and number-unit-separator=\text{\,}
explicitly while loading the siunitx
package.
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\addto\extrasngerman{\sisetup{locale=DE}}
\usepackage{siunitx}
\sisetup{detect-all} % note: just one option still needs to be specified
\begin{document}
\sffamily
\SI{1.23}{\%}
1,23\,\%
\end{document}
From the tagging, it seems that you are using KOMAscript
and the class scrbook
. Then you change the font either with \setkomafont
or \addtokomafont
(see section 3.6, page 51 in the revised manual), and with the modifier chapterprefix
. Try:
\setkomafont{chapterprefix}{\rmfamily\Large\bfseries}
or, to change to a serif typeface only:
\addtokomafont{chapterprefix}{\rmfamily}
To change all sectioning to the default Roman font, reverse all font changes you have done to chapter
, and try
\addtokomafont{sectioning}{\rmfamily}
It seems from your comment that somebody has tampered with the definitions in your classfile. This minimal example works for me, giving me sans serif in heading and body text.
\documentclass[twoside,12pt,a4paper,pointlessnumbers,headsepline,idxtotoc]{scrbook}
\usepackage{fixltx2e}
\usepackage[UKenglish]{babel}
\usepackage{tgheros}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}
In your document, comment out (or delete) all usepackage{secsty}
etc. that changes the headings. Or add packages and commands from you preamble to my code.
If you are going to use Helvetica as sans serif font, I suggest using the Tex-Gyre version instead, by loading the package tgheros
. I have changed my MWE correspondingly.
Best Answer
The font
TeX Gyre Pagella
is based onPalatino
, which was designed by Herrmann Zapf. Within the past ten years or so, Zapf has designed a sans-serif font, calledPalatino Sans
, to accompanyPalatino
. Note, though, thatPalatino Sans
isn't free and isn't include in any of the standard TeX distributions.You may want to use
Helvetica
as your document's sans serif font. If you do so, you should probably look into scalingHelvetica
down a bit as its x-height is rather larger than that ofPalatino
.