3

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"

  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Dec 30 '14 at 8:26
  • It's tedious to get 'custom' classes downloaded and functionally – user31729 Dec 30 '14 at 8:27
  • Right after \ListoSymbols (or what ever the command is called) try \addcontentsline{toc}{chapter}{List of Symbols} (perhaps with a preceeding \phantomsection) – user31729 Dec 30 '14 at 8:58
  • I have added a MWE in terms of the .tex file. I looked at the .dtx file for the class and I can't say I know where to begin stripping it down to something I can post – SVC Dec 30 '14 at 9:00
4

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

  • That works perfectly. Can I trouble you for a brief explanation or a referral to documentation somewhere? – SVC Dec 30 '14 at 9:19
  • @SVC I've just searched for other lists to see how they are defined in the .cls file (e.g. the "List of Plates", see the definition of \ryethesis@insertlop) – karlkoeller Dec 30 '14 at 9:22
  • @SVC BTW: \includenomenclature is not needed since you are passing the option los to the class. – karlkoeller Dec 30 '14 at 9:25
0

You can the intoc option when importing nomencl:

\RequirePackage[intoc]{nomencl}

If using usepackage to import (inside the documentclass):

\usepackage[intoc]{nomencl}

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.