Theses, Books, Title pagesHow do I get in Appendices Appendix appears in the header

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

How do I get in Appendices Appendix appears in the header

Post by templateuser »

Place appendages in the template, but in the header of each page tells me chapter, instead of appendix, as I do to change me to Appendix chapter, thank you very much.

caedvaur

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

How do I get in Appendices Appendix appears in the header

Post by Stefan Kottwitz »

Usually this is simply done by starting the appendix by

\appendix

in the document.

However, currently the template doesn't respect the changes made by this command. You can fix it by adding

\renewcommand*{\chaptername}{\appendixname}

The template itself could be fixed by changing that line in structure.tex (PAGE HEADERS section):

Code: Select all

\renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries\chaptername\ 
\thechapter.\ #1}{}} % Chapter text font settings
to

Code: Select all

\makeatletter
\renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries\@chapapp\ 
\thechapter.\ #1}{}} % Chapter text font settings
\makeatother	
The reason is, \appendix in the book class does this:

Code: Select all

\newcommand\appendix{\par
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \gdef\@chapapp{\appendixname}%
  \gdef\thechapter{\@Alph\c@chapter}}
Stefan
LaTeX.org admin
sdey15
Posts: 1
Joined: Wed Apr 21, 2021 8:55 am

How do I get in Appendices Appendix appears in the header

Post by sdey15 »

I am very new to LaTex. So please excuse if my language is technically incorrect/incomplete.

My .sty file has this command that you mentioned to be a default for the \appendix command in books.

Code: Select all

\renewcommand\appendix{\par
   \setcounter{chapter}{0}%
   \setcounter{section}{0}%
   \gdef\@chapapp{\appendixname}%
   \gdef\thechapter{\@Alph\c@chapter}
I am not able to figure out where I should implement the changes your suggested in order to get an "Appendix" header instead of the "Chapter" header for the appendix section. Please help.
Post Reply