3

The following code doesn't use KOMA-script ans is able to generate title with small caps:

\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage[frenchb]{babel}
\usepackage[utf8]{inputenc}

\begin{document}

text \textsc{small caps text}

\section{title \textsc{small caps title}}

\end{document}

However, if I change the documentclass to scrreport to use KOMA-script, the title is no longer in small caps.

I took a look to the PDF properties and it looks like the fonts sfbx1728, and sfcx1728 were replaced by sfsx1728. How do I undo that ?

Nek6rxEd
  • 33
  • 2
  • Because the default sans serif doesn't provide with small caps. If you want all the sections to be in \rmfamily adding \addtokomafont{sectioning}{\rmfamily} in the preamble should do. – Manuel Jun 23 '14 at 15:46
  • Or, if this is a special, one-use case, you could do \textrm{\textsc{small caps title}}. Probably look pretty terrible, however.... – jon Jun 23 '14 at 15:50
  • Duh. I tried the \rmfamily solution earlier, but with a \setkomafont and it didn't do what I expected. It works perfectly with \addtokomafont, what's the differences between the two ? – Nek6rxEd Jun 23 '14 at 16:03
  • 1
    With \setkomafont you set that “font” to be exactly what you use there, e.g., if you use \setkomafont{sectioning}{\rmfamily} you loose all the sizes (\large), series (\bfseries), shape (\upshape) etc. With \addtokomafont (which is the one I usually use), you only override those parameters you write, so \addtokomafont{sectioning}{\rmfamily} will keep every series/shape but only override the family. – Manuel Jun 23 '14 at 16:07

1 Answers1

3

Because the default sans serif doesn't provide with small caps. If you want all the sections to be in \rmfamily adding \addtokomafont{sectioning}{\rmfamily} in the preamble should do. Of course you could also load another font which does provide with sans serif small caps.

\documentclass{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[frenchb]{babel}
\usepackage[utf8]{inputenc}

\addtokomafont{sectioning}{\rmfamily}

\begin{document}

text \textsc{small caps text}

\section{title \textsc{small caps title}}

\end{document}
Manuel
  • 27,118