# Uppercase chapter with KOMA-script

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{begingroupMakeTextUppercase{#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
[email protected]
newcommand*{ModMakeUppercase}{%
[email protected]
MakeUppercase
}
makeatother

begin{document}
tableofcontents
end{document}


TeX - LaTeX Asked by s__C on December 29, 2020

Update

Since KOMA-Script version 3.19 the recommended way is redefining sectionlinesformat, chapterlinesformat:

documentclass[chapterprefix]{scrbook}[2015/10/03]

makeatletter
renewcommandsectionlinesformat[4]{%
@hangfrom{hskip #2#3}{MakeUppercase{#4}}%
}
renewcommandchapterlinesformat[3]{%
@hangfrom{#2}{MakeUppercase{#3}}%
}
makeatother
renewcommandchapterlineswithprefixformat[3]{%
MakeUppercase{#2#3}%
}
renewcommand{sectioncatchphraseformat}[4]{%
hskip #2#3MakeUppercase{#4}%
}

usepackage{blindtext}
begin{document}
tableofcontents
listoffigures
chapter{Test}
KOMAScriptVersion
blinddocument
end{document}


There is a problem in KOMA-Script Version 3.16 (and 3.15). As a workaround:

documentclass[chapterprefix=on]{scrbook}

% Fix MakeUppercase
usepackage{makerobust}
makeatletter
[email protected]
newcommand*{ModMakeUppercase}{%
[email protected]
MakeUppercase
}
makeatother

% workaround for version 3.15 and 3.16

usepackage{blindtext}
begin{document}
tableofcontents
listoffigures
chapter{Test}
KOMAScriptVersion
blinddocument
end{document}


Correct answer by esdd on December 29, 2020

## Related Questions

### why does make4ht generate an extra : in this math expression?

2  Asked on October 3, 2021

3  Asked on October 3, 2021 by jonalv

### How do you copy all the images referenced in a document into a single directory?

1  Asked on October 3, 2021

### Can we make a macro for begin{frame}[t]end{frame}?

2  Asked on October 3, 2021

### inline spacing within the cases command when document is in doublespace mode

3  Asked on October 3, 2021

### Labeling multi-line equation not working as expected

1  Asked on October 3, 2021

### glossaries(extra) document available labels

1  Asked on October 3, 2021 by daniel-bckenhoff

### Why is code appended to endabstract still indented?

2  Asked on October 3, 2021

### inputenc Error: Unicode char u8: not set up for use with LaTeX

13  Asked on October 3, 2021

### Change caption label delimiter with babel french in memoir but without caption package?

1  Asked on October 3, 2021

### Add vertical space in moderncv

1  Asked on October 3, 2021

### table settings for multiple columns

1  Asked on October 3, 2021

### Correct syntax for using setstretch{} color{} textit{} and scriptsize in same macro?

0  Asked on October 3, 2021

### mathcal in equation

1  Asked on October 2, 2021

### Multilines, multipages phantom analog macro

3  Asked on October 2, 2021 by alfazaz

### How do I install an individual package on a Linux system?

8  Asked on October 2, 2021 by andrew-stacey

### How to print title chapters on the right side and odd pages on right side in the book class

1  Asked on October 2, 2021

### Non italic font in displaymath

2  Asked on October 2, 2021 by noitalicinmath

### A Blank Page Before Title Page

2  Asked on October 2, 2021