I am using the latest version of the LaTeX template of Matthias Pospiech, see http://www.matthiaspospiech.de/blog/2016/05/09/latex-thesis-template-3-2-4-released/.
In my MWE I try to achieve the following: I created a chapter with \chapter[Chapter 1: Headline]{Headline}
and in the ToC it is printed as 1 Chapter 1: Headline
.
I want to remove the first 1
, so that Chapter 1: Headline
will be displayed in combination that the styling of the chapter itself on the page where the chapter begins and the styling of the header of the pages should be still the same. So only removing the chapter number 1
without changing something else in the document.
\documentclass[paper=a4,version=last,english]{scrbook}
\usepackage{templatetools}
\usepackage{lipsum}
\usepackage{babel}
\usepackage[style=apa,backend=biber]{biblatex}
\usepackage[automark,komastyle]{scrpage2}
\usepackage{pageslts}
\ifcsdef{chapter}
{\usepackage{titlesec}}
{\usepackage{titlesec} \csundef{chapter}}
\usepackage{titletoc}
\usepackage{pdfpages}
\IfPackageLoaded{scrpage2}{
\IfElseDefined{chapter}{
\pagestyle{scrheadings}
}{
\pagestyle{scrplain}
}
\IfElseDefined{chapter}{
\ohead{\pagemark}
\ihead{\headmark}
\ofoot[\pagemark]{}
}{
\cfoot[\pagemark]{\pagemark}
}
\IfElseDefined{chapter}{
\automark[section]{chapter}
}{
\automark[subsection]{section}
}
\IfDefined{chapter}{
\setheadsepline{.4pt}[\color{black}]
}
}
\IfPackageLoaded{titlesec}{
\titleformat{\chapter}[display]
{\usekomafont{chapter}\Large \color{black}}
{\LARGE\MakeUppercase{\chaptertitlename}
\Huge~\thechapter \filright}
{1pt}
{
\titlerule \vspace{0.9pc}\vspace{-\parskip}
\filright
\IfColorDefined{sectioncolor}{\color{sectioncolor}}{}
}
[\color{black} \vspace{0.9pc} \filright {\titlerule}]
}
\makeatletter
\@ifundefined{frontmatter}{
\newcommand{\frontmatter}{
\pagenumbering{roman}
}
}{}
\@ifundefined{mainmatter}{
\newif\if@mainmatter\@mainmattertrue
\newcommand{\mainmatter}{
\pagenumbering{arabic}
\setcounter{page}{1}
}
}{}
\makeatother
\begin{document}
\frontmatter
\IfPackageLoaded{scrpage2}{\pagestyle{scrheadings}}
\tableofcontents
\mainmatter
\addchap{General Introduction}
\lipsum[1]
\chapter[Chapter 1: Headline]{Headline}
\lipsum[3-10]
\end{document}
Best Answer
Note that neither package
titletoc
nor packagetitlesec
should be used with a KOMA-Script class. Packagescrpage2
is deprecated for years. Its successor isscrlayer-scrpage
.You could add
to remove the chapter numbers from TOC and page header. Note that the chapter entries in TOC then will be controlled by package
tocbasic
.Remove package
titletoc
and useBut I think it would be better to remove the optional argument of the chapters (and the manuel numbering in it) and insert the chapter prefix in TOC by changing
entrynumberformat
for chapterentries:Then you have to run the code three times to get:
Code: