Wie bekomme ich "Anhang" undauf derselben Linie

Wie bekomme ich "Anhang" undauf derselben Linie

Ist es möglich, „Anhang X“ und „Anhang X“ in derselben Zeile zu erhalten, möglicherweise mit einem Doppelpunkt nach dem Kennbuchstaben des Anhangs?

MWE:

\documentclass{report} 
\begin{document}
\tableofcontents
\chapter{CHapter one name}
\chapter{Chapter two name two}
\appendix
\chapter{Theory}
\section{Some theory}
\section{Some other theory}
\chapter{Method}
\section{LOLZ}
\section{ROLF}
\end{document}

Wie Sie sehen, schreibt das kompilierte PDF:

Appendix A

Theory

A.1 Some Theory

Ich möchte, dass es ungefähr so ​​aussieht:

Appendix A: Theory

A.1 Some Theory

Antwort1

Hier ist eine Möglichkeit mit titlesecund apptools. Anhangskapitel werden oben auf der Seite platziert, aber die Abstandsparameter können nach Belieben geändert werden:

\documentclass{report}

\usepackage{showframe} 
\usepackage{titlesec}
\usepackage{apptools}
\AtAppendix{\titleformat{\chapter}[block]{\LARGE\bfseries}{\appendixname~\thechapter:}{0.333em}{}%
\titlespacing*{\chapter}{0pt}{-20pt}{40pt}}

\begin{document}

\tableofcontents
\chapter{Chapter one name}
\chapter{Chapter two name two}

\appendix
\chapter{Theory}
\section{Some theory}
\section{Some other theory}
\chapter{Method}
\section{LOLZ}
\section{ROLF}

\end{document} 

Bildbeschreibung hier eingeben

verwandte Informationen