[Tex/LaTex] Determine KOMA-Script section title font size

fontsizekoma-scriptsectioning

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?

Best Answer

\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}