# How to remove “Chapter: [Number]” in the toc and on the page itself from particular chapters?

I was given the following code for creating a "chapter" on top of the page, followed by the "title" of the page, which is displayed below "chapter".

This is the document class I use:

\documentclass[chapterprefix]{scrreprt}


I have the following problem: I would like only particular \chapters to display "chapter: [number]" in the toc before a "title". The title should still be displayed just without "chapter: [number]". Right now all my \chapters display a chapter: [number] in front of the title in the toc and on the page.

Also, how to I remove the colons that appear after "Chapter[:]" on the page (but leave them in the table of contents)?

Additionally, by applying the \documentclass that was given to me something changed. I don't know whether the font got smaller but my pages shrank from about 60 to 54. Any idea?

\pagestyle{headings} %chapter in toc and on page (numbering)

\renewcommand*{\chapterformat}{%
\mbox{\chapappifchapterprefix{\nobreakspace}\thechapter\autodot:
\IfUsePrefixLine{}{\enskip}}%
}
\renewcommand*{\chaptermarkformat}{\chapapp\ \thechapter\autodot:\enskip}
\RedeclareSectionCommand[
tocentrynumberformat=\tocentrywithprefix{\chapapp},
tocdynnumwidth
]{chapter}
\newcommand\tocentrywithprefix[2]{\mbox{#1~#2:}}
\renewcommand*{\raggedchapter}{\centering}


• For the number of pages that shrank, in your last post you used the option 12pt with the class scrreprt, but here you removed it. Maybe it's only that the font size shrank from 12pt to 11pt. You could try to put the option 12pt back. – Vincent Feb 28 '20 at 0:35
• \documentclass[chapterprefix][12pt]{scrreprt} Latex displays an error if I do it like that. – Karl L. Feb 28 '20 at 0:40
• Try \documentclass[12pt,chapterprefix]{scrreprt}. – Vincent Feb 28 '20 at 0:42
• thanks it worked! Unfortunately, I still haven't worked out my main problem – Karl L. Feb 28 '20 at 0:57

To remove the : from the chapter heading, remove the redefinition of \chapterformat. It was only redefined to add the colon.

Unfortunaly I do not understand what you really want to do.

If the prefix should be removed only in appendix, you can use

\documentclass[
12pt,
chapterprefix,
%appendixprefix=false,% no prefixline for appendix chapters
numbers=noenddot
]{scrreprt}
\usepackage{lipsum}% only for dummy text

\renewcommand*{\raggedchapter}{\centering}
\renewcommand*{\chaptermarkformat}{\chapappifchapterprefix{\nobreakspace}\thechapter\autodot:\enskip}

\IfArgIsEmpty{#1}
}
\RedeclareSectionCommand[
tocentrynumberformat={\def\autodot{:}},
tocdynnumwidth
]{chapter}

\let\originalappendix\appendix
\renewcommand*{\appendix}{%
\originalappendix
%\renewcommand*\chapterformat{}% remove the chapter number  from chapter heading
%\renewcommand*\chaptermarkformat{}% remove the chapter number from header entry
\renewcommand*{\addchaptertocentry}[2]{% remove the chapter number from ToC entry
}%
}

\begin{document}
\tableofcontents
\chapter{Foo}
\lipsum
\appendix
\chapter{Bar}
\lipsum
\end{document}


Run three times to get

If you only want to use unnumbered chapters with ToC and header entry, replace \chapter by \addchap:

\documentclass[
12pt,
chapterprefix,
numbers=noenddot
]{scrreprt}
\usepackage{lipsum}% only for dummy text

\renewcommand*{\raggedchapter}{\centering}
\renewcommand*{\chaptermarkformat}{\chapappifchapterprefix{\nobreakspace}\thechapter\autodot:\enskip}

\IfArgIsEmpty{#1}
}
\RedeclareSectionCommand[
tocentrynumberformat={\def\autodot{:}},
tocdynnumwidth
]{chapter}

\begin{document}
\tableofcontents