First off, are you making your definitions inline with the text? Since the nomenclature is a specialized index, it's really meant to be used as you're introducing new terms, and not as a big list of items at the end of the document.
That having been said, as long as there's body text in the document, it looks like your code works. Not having any of your included content, the following works fine:
\documentclass{report}
\usepackage{nomencl}
\let\abbrev\nomenclature
\makenomenclature
\newcommand{\Abkuerzung}{
\printnomenclature
\newpage
}
\begin{document}
\tableofcontents
\listoffigures
\addcontentsline{toc}{chapter}{\nomname}
\Abkuerzung
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%makeindex thesis.nlo -s nomencl.ist -o thesis.nls
Uncomment this text, so the abbrev command will have something to reference. Otherwise, nothing works.
\abbrev{dex}{Dalvik Executable}
\abbrev{XML}{Extensible Markup Language}
\abbrev{VM}{Virtual Machine}
\abbrev{JIT}{Just In Time}
\abbrev{DVM}{Dalvik Virtual Machine}
\abbrev{JVM}{Java Virtual Machine}
\end{document}
But it didn't work at all until I had actual text in the body of the document. I'll edit or remove this answer depending on what else you find out.
You have to restore the tocdepth
counter after the appendix with \addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
:
\documentclass{report}
\begin{document}
\tableofcontents
\listoffigures
\begin{figure}
\caption{figure}
\end{figure}
\appendix
\addcontentsline{toc}{chapter}{9 \enspace Appendices}
\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}
\chapter{Appendix chapter that is not listed in the TOC}
...
%<end of appendix>
\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
\end{document}
Assuming that the appendix is the very end of your document (which might not be the case, so be careful here) you could patch the end of the document like
\let\oldenddocument\enddocument
\def\enddocument{%
\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
\oldenddocument}
Then the file
\documentclass{report}
\makeatletter
\g@addto@macro\appendix{%
\addcontentsline{toc}{chapter}{9 \enspace Appendices}
\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}}
\let\ltx@enddocument\enddocument
\def\enddocument{%
\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
\ltx@enddocument}
\makeatother
\begin{document}
\tableofcontents
\listoffigures
\begin{figure}
\caption{figure}
\end{figure}
\appendix
\chapter{Appendix chapter that is not listed in the TOC}
\end{document}
will yeld the same result as above. Note that there is also patching going on with \appendix
to keep the document body clean:
\g@addto@macro\appendix{%
\addcontentsline{toc}{chapter}{9 \enspace Appendices}
\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}}
This should be done anyways. Finally if the appendix is not the concluding part of the document one might consider to wrap the appendix into an environment in order to have an end marker, hence an appropriate place to hook into (e.g. with the instruction \def\endappendix{\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}}
) and then say
\documentclass{book}
\makeatletter
\g@addto@macro\appendix{%
\addcontentsline{toc}{chapter}{9 \enspace Appendices}
\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}}
\def\endappendix{\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}}
\makeatother
\begin{document}
\tableofcontents
\listoffigures
\begin{figure}
\caption{figure}
\end{figure}
\begin{appendix}
\chapter{Appendix chapter that is not listed in the TOC}
...
\end{appendix}
\backmatter
\chapter{After the appendix}
\end{document}
It should be noted that this is a change of the standard interface!
Best Answer
The list of figures shows the figures included in a
figure
environment (more precisely: it lists the captions given within a figure environment).All you do with
\refstepcounter{figure}
is increasing the number to be used for the next call to\thefigure
; there's nothing in your code that tells Latex that there is a figure there, nor how to reference it.