It has already been mentioned that it could be tricky to get uppercase letters in chapter for scrbook
. However, the solution in Using \MakeUppercase in \@startsection works for scrreprt
.
The solution used in tudscr
adds a custom command to make the text uppercase, but then chapter has to be redefined.
\makeatletter
\newcommand*\mymakeuppercase[1]{%
\ifdin{\begingroup\MakeTextUppercase{#1}\endgroup}{#1}%
}
\makeatother
Any other alternative, that would be applicable to all koma scripts?
MWE:
\documentclass[chapterprefix=on]{scrbook}
% Fix \MakeUppercase
\usepackage{makerobust}
\makeatletter
\MakeRobustCommand\@hangfrom
\newcommand*{\ModMakeUppercase}{%
\MakeRobustCommand\@svsec
\MakeUppercase
}
\makeatother
\addtokomafont{part}{\MakeUppercase}
\addtokomafont{chapter}{\MakeUppercase} % <- doesn't work
\addtokomafont{section}{\ModMakeUppercase}
\addtokomafont{subsection}{\ModMakeUppercase}
\begin{document}
\tableofcontents
\end{document}