3

I am trying to display the appendix in my thesis TOC as

Appendix A

instead of

Chapter A

using our university's class file 'kfupm_thesis.cls'.

The same question was asked and answered here. But in my case I want to add appendices chapter wise so if I use command "\appendix", the numbering of subsequent chapters changes to alphabetical. That's why I think I have to use "\begin{appendices} and \end{appendices}". Now, using these commands, the already provided solution in the above mentioned post doesn't work for my case.

Here is the sample code

\documentclass[ms, 12pt]{kfupm_thesis}
\usepackage{appendix}

\begin{document}

\tableofcontents

\chapter{First Chapter}
\section{BLA}
\subsection{BLA-BLA}

\chapter{Second Chapter}
\section{BLA}
\subsection{BLA-BLA}

\begin{appendices}
\chapter{Parameters}
\section{BLA}
\subsection{BLA-BLA}
\end{appendices}

\chapter{Third Chapter}
\section{BLA}
\subsection{BLA-BLA}

\end{document}

Kindly suggest a solution for this. Thanks a lot.

1

The solution consists in patching the appendices environment:

\documentclass[ms, 12pt]{kfupm_thesis}
\usepackage{appendix}
\usepackage{apptools, etoolbox}

\makeatletter
\patchcmd{\@chapter}{\protect {CHAPTER }}{\ifappendix{APPENDIX }\else{CHAPTER }\fi}{}{}
\makeatother
\AtBeginEnvironment{appendices}{\appendixtrue}

\begin{document}

\tableofcontents

\chapter{First Chapter}
\section{BLA}
\subsection{BLA-BLA}

\chapter{Second Chapter}
\section{BLA}
\subsection{BLA-BLA}

\begin{appendices}%
  \chapter{Parameters}
  \section{BLA}
  \subsection{BLA-BLA}
\end{appendices}

\chapter{Third Chapter}
\section{BLA}
\subsection{BLA-BLA}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.