# Nomenclature Package and Appendices

There are a lot of similar posts to this but I have yet to find one that correctly solves my issue. The tl;dr is: How do I make nomenclature produce only a list of variables without producing a new chapter?

Long version:

I want to use the nomencl package to create a sorted list of variables in the first appendix chapter of my thesis. I am writing in Overleaf.

The appendix package works fine on its own. In my main .tex file, I have

\include{introduction}
...
\include{conclusion}
\appendix
\include{appa}
\include{appb}
\include{biblio}
\end{document}


My appendix files appa and appb both start with a chapter title. For example, appb begins with \chapter{Figures} which displays on the page as

The nomenclature package on its own works just fine. I define all of my variables and a new chapter containing a list appears where I place \printnomenclature. I only want the list though. It should appear on the page as

Appendix A

Nomenclature

(list of nomenclature)

Because \printnomenclature starts a new chapter, if I write

\chapter{Nomenclature}
\printnomenclature


in appa I end up with

with Chapter A: Nomenclature on page 55 and the list actually on page 57. It only appears in the ToC because I included [intoc] for the sake of illustration. I want everything to be on page 55 with the page itself appearing like Appendix B did in the first figure. How do I do this?

I tried various solutions from other posts to remove the chapter title on Page 57, but I couldn't find a way to prevent that chapter from being produced itself. As a result, I end up with skipped pages between the chapter title on page 55 and the list on page 57.

• Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Apr 21, 2020 at 20:21

IF you want to completely ignore all \chapter* commands in your appendices, and do the sectioning yourself, then you can declare

\makeatletter
\makeatother


IF you want to treat those \chapter* declarations as numbered (lettered) chapters (appendices), then the incantation is

\makeatletter
\makeatother


(The "*" is consumed before \@schapter goes to work.)

Note that these make assumptions on how the document class defines \chapter, so can't be relied on everywhere.

• Welcome Back....happy to see you.... Apr 22, 2020 at 5:03

The nomencl makes use of \chapter*{} (if available in the class) to create the list of symbols and so a new page is created.

First, load the nomencl package with the option notocbasic (but not intoc otherwise the entry will be duplicated in table of contents), that is,

\usepackage[notocbasic]{nomencl}


From nomencl.sty we find:

\makeatletter % added
\def\thenomenclature{%
\providecommand*{\listofnlsname}{\nomname}%
\if@nomencl@tocbasic
\let\list@fname\listofnlsname
\def\@currext{nls}%
\else
\@ifundefined{chapter}%
{
\section{\nomname}
}%
{
\chapter{\nomname} %%% <----------- deleted * here
\@mkboth{\nomname}{\nomname}%
}%
\fi
\nompreamble
\if@nomentbl
\let\itemOrig=\item
\def\item{\gdef\item{\\}}%
\expandafter\longtable\expandafter{\@nomtableformat}
\else
\list{}{%
\labelwidth\nom@tempdim
\leftmargin\labelwidth
\itemsep\nomitemsep
\let\makelabel\nomlabel}%
\fi
}


and then simply put the code above on your preamble. In the document, you simply use \appendix and \printnomenclature.
• Thanks for the help. That didn't solve the problem, unfortunately. I added the code to the preamble followed by \usepackage[notocbasic]{nomencl} \makenomenclature and still have Appendix A: Nomenclature on page 55 and Nomenclature followed by the list on Page 57. What other info can I provide to help? Apr 22, 2020 at 2:23
• Still doesn't work for me. I also wasn't sure where to place \makenomenclature, so I tried both before and after the code block and it doesn't seem to make a difference. Apr 22, 2020 at 21:29