[Tex/LaTex] Why doesn’t nomenclature show up in TOC using this custom class

document-classesnomenclaturetable of contentstexshop

Background:

I'm trying to use a LaTeX class found HERE
to create a thesis. The class has a scheme for enabling/disabling the creation of a "List of Symbols" using LaTeX's nomenclature package. When I typeset LaTeX, run the nomenclature makeindex command, and typeset LaTeX again, the List of Symbols page is successfully generated.

Problem:

The List of Symbols (nomenclature) does not appear in the Table of Contents and I can't figure out how to make it appear. I'm new to LaTeX and I'm a little lost when it comes to searching through the .tex file and class file trying to figure out what's wrong.

Environment details:

TeXShop 3.48.1 on Mac OS 10.10.1

MWE .tex:

\documentclass[draft,los]{ryethesis}
\includenomenclature

\author{Me}
\title{Thesis}
\degreeName{Doctor of Philosophy}
\degreeYear{1847}
\program{Education}
\abstract{}

\begin{document}

\begin{equation}
a^2+b^2=c^2
\nomenclature{a}{length of adjacent side}
\nomenclature{b}{length of opposite side}
\nomenclature{c}{length of hypotenuse}
\end{equation}

\end{document}

MWE .dtx snippets

\ifthenelse{\boolean{@ryenomenclature}}{%
\RequirePackage{nomencl}
\renewcommand{\nomname}{List of Symbols}
\makenomenclature
}{}

\newcommand{\ryethesis@insertnom}{%
\ifthenelse{\boolean{@ryenomenclature}}{\ryethesis@clearpage\printnomenclature}{}
}

Later on in the file, this is called:

\ryethesis@insertnom

This produces an 8 page document mostly containing template information set up by the class. The portions of interest are the "List of Symbols" page which features the a,b,c symbols shown above in the \nomenclature lines, and the "Contents" page which does not list an entry for "List of Symbols"

Best Answer

Insert the following code before \includenomenclature:

\makeatletter
\renewcommand{\ryethesis@insertnom}{%
\ifthenelse{\boolean{@ryenomenclature}}{\ryethesis@clearpage\phantomsection\label{listofsymbols}\addcontentsline{toc}{section}{\textit{\mdseries{}List
    of Symbols}}\printnomenclature}{}
}
\makeatother

MWE:

\documentclass[draft,los]{ryethesis}

\makeatletter
\renewcommand{\ryethesis@insertnom}{%
\ifthenelse{\boolean{@ryenomenclature}}{\ryethesis@clearpage\phantomsection\label{listofsymbols}\addcontentsline{toc}{section}{\textit{\mdseries{}List
    of Symbols}}\printnomenclature}{}
}
\makeatother

\includenomenclature

\author{Me}
\title{Thesis}
\degreeName{Doctor of Philosophy}
\degreeYear{1847}
\program{Education}
\abstract{}

\begin{document}

\begin{equation}
a^2+b^2=c^2
\nomenclature{a}{length of adjacent side}
\nomenclature{b}{length of opposite side}
\nomenclature{c}{length of hypotenuse}
\end{equation}

\end{document} 

Output:

enter image description here

Related Question