My current document is processed like this:
1. Some chapter
1.1. Some section
1.1.1. Some subsection
Appendix A.
Some appendix
What I want to have:
1 Some chapter
1.1 Some section
1.1.1 Some subsection
Appendix A: Some appendix
So I want the last dots of the numbering removed for the main part. For the appendix, I want a colon instead of the dot and the title in the same line.
A small example, including all packages used:
\documentclass[appendixprefix=true,11pt,a4paper]{scrreprt}
%The packages used in my document
\usepackage{listings}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{chngcntr}
\usepackage[usenames,dvipsnames]{color}
%Appendix definition (Write "Appendix A")
\makeatletter
\newcommand\appendix@numberline[1]{\appendixname\ #1: }
\g@addto@macro\appendix{%
\addtocontents{toc}{
\let\protect\numberline\protect\appendix@numberline}%
}
\makeatother
\begin{document}
\chapter{First chapter}
\section{First section}
\subsection{First subsection}
\appendix
\chapter{Last chapter}
\end{document}
How can I make the colon and the title in the same line. And how do I remove the last dots of the titles?
Symbol1's answer doesn't work. Error message:
Undefined control sequence. \@makechapterhead ...mdepth >\m@ne \if@mainmatter
\huge \bfseries \@chapapp ... l.108 \chapter{Definition of the Problem}







\autodotworks, but\def\autodot{}solves part of the question. – Manuel Sep 29 '14 at 20:44numbers=noenddotremoves the dots in a simpler way, btw – Tobias Kienzler Nov 30 '15 at 15:55