There are a couple of things wrong with your sample file, and one thing wrong with your class file.
First, your testfile has the following code:
\appendix
\appendices
This is incorrect. Since you are using the appendix
package, you should use the appendices
environment (it's not a macro.) However, because your class file does some funny things with the appendix command, you need to add some code after the \begin{appendices}
line to make the appendices show up with letters: So you should have:
\begin{appendices}
\makeatletter
\renewcommand*{\th@DefTheChapter}{\Alph{chapter}}
\makeatother
...
\end{appendices}
Furthermore, (although this isn't apparent in the output) your use of the \begin{thebibliography}
environment is incorrect. You have:
\begin{thebibliography}{Bibliography}
But the argument of the thebibliography
environment is not the title (this is generated automatically) but a string representing the largest label you will have. Since you are using a numeric bibliography style, you should use something like the following:
\begin{thebibliography}{99} % assuming you have less than 100 references
(I'm assuming you are using natbib
and bibtex
to do your actual bibliography instead of doing it by hand.)
The reason your bibliography looks wrong (including the page number) is because your class file makes its title in the table of contents a part
level instead of a chapter
level. This can be fixed by putting the following code after the begin document (i.e. not in the preamble.)
(Alternatively, you can simply fix this code in your version of the class file itself, in which case you don't need to add the code to your document and you shouldn't wrap the code in \makeatletter/makeatother
.)
\makeatletter
\renewenvironment*{thebibliography}[1]{
\begin{th@OldBib}{#1}
\ULforem% set \em to underline
\begin{singlespace}
\addcontentsline{toc}{chapter}{\bibnameToC} % changed from part to chapter
}{
\end{singlespace}
\EmphReset% set \em back to the user-specified default.
\end{th@OldBib}
}
\makeatother
(This definition is quite awful. Does your university really require you to use underlining instead of italics?)
There's also a spurious space in the TOC entry for the bibliography. This is caused by the an extra space in the following definition in the class file (line 389):
\newcommand*{\bibnameToC}{% put a comment marker here to remove the space
\normalsize\th@HdFnt Bibliography\normalfont}