I'm trying to have the same chapter title styles for the normal chapters and the appendix chapters but add the word "Appendix" before the appendix titles, as only the letters are shown before the appendix title. Right now the chapter title style is defined using this piece of code:
% Chapter title settings
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\Huge\bfseries\filcenter}
{{\fontsize{50pt}{1em}\vspace{-4.2ex}\selectfont \textnormal{\thechapter}}}{1ex}{}[]
I have managed to get it to work in the table of contents but not in the appendix titles.
The appendix code looks like this:
\usepackage[titletoc]{appendix}
% APPENDICES
\cleardoublepage
\appendix
\setcounter{page}{1}
\pagenumbering{Roman} % Capitalized roman numbering starting from I (one)
\begin{appendices}
\input{include/backmatter/Appendix_1}
\end{appendices}
Example:
\documentclass[12pt,a4paper,twoside,openright]{report}
\usepackage[utf8]{inputenc}
\usepackage[titletoc]{appendix}
\usepackage{moreverb} % List settings
\usepackage{textcomp} % Fonts, symbols etc.
\usepackage{lmodern} % Latin modern font
\usepackage{helvet} % Enables font switching
\usepackage[T1]{fontenc} % Output settings
\usepackage[english]{babel} % Language settings
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\Huge\bfseries\filcenter}
{{\fontsize{50pt}{1em}\vspace{-4.2ex}\selectfont \textnormal{\thechapter}}}{1ex}{}[]
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter.\space#1}{}}
% Select one-sided (1) or two-sided (2) page numbering
\def\layout{2} % Choose 1 for one-sided or 2 for two-sided layout
% Conditional expression based on the layout choice
\ifnum\layout=2 % Two-sided
\fancyhf{}
\fancyhead[LE,RO]{\nouppercase{ \leftmark}}
\fancyfoot[LE,RO]{\thepage}
\fancypagestyle{plain}{ % Redefine the plain page style
\fancyhf{}
\fancyfoot[LE,RO]{\thepage} % Added for the extra even pages
\renewcommand{\headrulewidth}{0pt}}
\fancyfoot[LE,RO]{\thepage}
\else % One-sided
\fancyhf{}
\fancyhead[C]{\nouppercase{ \leftmark}}
\fancyfoot[C]{\thepage}
\fi
\makeatletter
\setlength{\@fptop}{0pt}
\makeatother
\title{Test}
\author{Mr Need Help}
\date{\today}
\begin{document}
\maketitle
\pagenumbering{roman}
\cleardoublepage
\tableofcontents
\setcounter{page}{1}
\pagenumbering{arabic} % Arabic numbering starting from 1 (one)
\setlength{\parskip}{0pt plus 1pt}
\chapter{Introduction}
\chapter{Method}
% APPENDICES
\cleardoublepage
\appendix
\setcounter{page}{1}
\pagenumbering{Roman} % Capitalized roman numbering starting from I (one)
\begin{appendices}
\chapter{Test 1}
\chapter{Test 2}
\end{appendices}
\end{document}