2

In an earlier question I asked how to display a triple line integral. This was not possible with the earlier package mathpazo which I use, so I would like to switch to pxfonts. This package, if I understand it correctly, contains a set of different fonts of different families, including an extended Palatino that allows me to use the \oiiint command.

My earlier font combination was the standard KOMA Script sans serif font (forgot its name unfortunately) with Palatino as serif font, which fits nicely in my opinion.
How can I achieve the same combination using the scrbook class and the pxfonts package?

1
  • So the question is "How do I switch back to the default serif font from KOMA script?"
    – Seamus
    Mar 14, 2011 at 17:39

2 Answers 2

7

Besides redefining \sfdefault, as lockstep suggested, the math sans serif font should also be changed. Otherwise it would still be Helvetica.

\documentclass{scrartcl}
\usepackage{pxfonts}
\renewcommand*{\sfdefault}{cmss}
\DeclareMathAlphabet{\mathsf}{OT1}{cmss}{m}{n}
\SetMathAlphabet{\mathsf}{bold}{OT1}{cmss}{bx}{n}
\begin{document}
\section{Text}
Text
\( \mathsf{Text} \)
\boldmath
\( \mathsf{Text} \)
\end{document}

cmss with pxfonts

0
8

The \sfdefault macro defaults to cmss (Computer Modern Sans Serif) (or lmss in case you use the lmodern package). The pxfonts package redefines \sfdefault to pxss (Helvetica), and this needs to be undone.

EDIT: How did I find out about cmss and pxss? I put \show\sfdefault in the document preamble to display the definition of the \sfdefault macro (first with, then without loading pxfonts).

\documentclass{scrbook}

\usepackage{pxfonts}
\renewcommand{\sfdefault}{cmss}

\usepackage{blindtext}

\begin{document}

\chapter{A chapter}

\blindtext

\end{document}
2
  • could you say a little about how to find the code for a particular font like that? Say I wanted to use the sans font that the libertine package loads, how would I find that information?
    – Seamus
    Mar 14, 2011 at 18:07
  • 1
    @Seamus simply search for redefinitions of \sfdefault $ grep -e "sfdefault" libertine.sty \renewcommand\sfdefault{\biolinum@param}% followed by: grep -e "biolinum@param" libertine.sty delivers the font families: fxb, fxbj, fxbo, fxbjo
    – Josef
    Mar 15, 2011 at 14:21

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.