5

I have a document using scrbook as document class. Somewhere during the text I would like certain words to have exactly the same font size as the section titles.

Consulting the documentation, I found out that for class options headings=big|normal the section title font size is Large, while for headings=small it is large.

How can I always have the proper font size in case I switch to headings=small without manually replacing all local font size declarations? In other words: how can I extract and transfer the current section title font size to some other text?

4
  • \addtokomafont{section}{\footnotesize}
    – Johannes_B
    Dec 22 '16 at 12:30
  • 3
    Probably \usefontofkomafont{section}. Dec 22 '16 at 12:30
  • @Piet, thank you, that worked! If you like to post your comment as an answer, I will gladly accept.
    – user61658
    Dec 22 '16 at 12:53
  • 3
    You could use \usesizeofkomafont{section} if only the font size should be the same as for sections (but not the family, series, shape and all other settings as color etc.)
    – esdd
    Dec 22 '16 at 13:00
2
\documentclass[headings=small]{scrbook}

\newcommand*\fontsizeofsectionheadings{\usefontofkomafont{section}}

\begin{document}
\chapter{Test}
\section{chapter}
I need {\fontsizeofsectionheadings words} as {\fontsizeofsectionheadings big} as the section titles, even if \verb|headings=small|.
\end{document}

Your Answer

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