I have been struggling to fix this for a while now. I hope one of you could help me fix this tiny issue with table of contents.
- I want the regular chapters to have a Chapter prefix
- I want the appendix chapters to only have 'Appendix' prefix and NOT "Appendix Chapter" prefix as shown below.
How can I fix this issue? I've tried many complicated workarounds like using \chapter* and manually adding entry to table of contents, but this messes with chapter formatting and further when I link the appendix in the main manuscript, the link is lost. And so I am hesitant to go through the route of complicated workarounds. Are there any minimal clean solutions for me to rename appendix prefixes?
Summary of the Problem and Solution
My thesis.sty file was messing up the format. As @Sveinung suggested, found the code related to the chapter definition in the STY file
\makeatletter \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect Chapter \numberline{\thechapter:} #1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
and modified it slightly (i.e. replaced "Chapter" with "Appendix") and placed it just below \appendix command of Thesis.TEX as shown below.
\appendix \makeatletter \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect Appendix \numberline{\thechapter:} #1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}