0

I have a problem. I would like to add an appendix, unfortunately I do not have an appendix heading. It should look like this

What I want

Appendix A
Heading

enter image description here However, it looks like this

What I have
A. Heading

enter image description here

It is due to the following

However, I would like the heading of the appendix to come first. How can I solve this problem?

\titleformat{\chapter}
  {\normalfont\LARGE\bfseries}{\thechapter}{1em}{}
\titlespacing*{\chapter}{0pt}{-10pt}{40pt}

MVP

\documentclass[a4paper,12pt]{report}
%\usepackage{tocbibind}
%\usepackage[toc,page]{appendix}
\usepackage[a4paper, left={2.5cm}, right={2cm}, top={3cm}, bottom={3cm}, headheight=15pt]{geometry}
\usepackage[ngerman]{babel}

\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\usepackage{titlesec}

\setcounter{secnumdepth}{4}
\usepackage{verbatim}
\usepackage{float} 
\usepackage[nohyperlinks, printonlyused]{acronym}
\usepackage{graphicx}
\usepackage[driverfallback=hypertex]{hyperref} 
\titleformat{\chapter}
  {\normalfont\LARGE\bfseries}{\thechapter}{1em}{}
\titlespacing*{\chapter}{0pt}{-10pt}{40pt}

\usepackage{tikz}
\usepackage{lmodern}


\usepackage{fancyhdr}
\usepackage{lipsum}% just to generate text for the example

\usepackage{tabularx}
\renewcommand\tabularxcolumn[1]{m{#1}} % for vertical centering text in X column
\usepackage{caption}
\captionsetup[table]{position=bottom}


\fancypagestyle{plain}{%
  \fancyhf{}%
  \fancyhead[L]{\nouppercase{\leftmark}}%
  \fancyfoot[R]{\thepage}}
\pagestyle{plain}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{}}
\usepackage[parfill]{parskip}

\newcommand{\secref}[1]{\ref{#1} \nameref{#1}}


\usepackage[toc,page]{appendix}

\usepackage{hyperref}
\usepackage[ngerman]{cleveref}


\usepackage[titles]{tocloft}
\usepackage{tocloft}
\setlength{\cftfigindent}{0pt}
\setlength{\cfttabindent}{0pt}


\begin{document}    
\tableofcontents

\chapter{Introduction}
  this is my introduction
  \subsection{Test}
\chapter{Finish}
\appendix
%\addcontentsline{toc}{chapter}{Appendix}
\chapter{Hyperparameter Tuning für XGBoost}

\subsection{Further Settings}
\chapter{Hyperpa}
\end{document}

1 Answer 1

1

Try

\appendix   
\titleformat{\chapter}[display]
{\normalfont\LARGE\bfseries}{\chaptertitlename~\thechapter}{1em}{}
\titlespacing*{\chapter}{0pt}{-10pt}{40pt}
\chapter{Hyperparameter Tuning für XGBoost}

\subsection{Further Settings}

a

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .