## Hack: change starred command into unstarred

Some packages like nomencl, glossary and environments like thebibliography in standard LaTeX classes use the starred sectioning forms \chapter* and \section*. Even if they provide an option to let them added to the table of contents it may be required to use numbered sectioning. In that case you could look at the corresponding source code (article.cls, nomencl.sty, glossary.sty, …) and redefine thebibliography by \renewenvironment or redefine thenomenclature of the nomencl package etc.

Here I will show a way without redefining certain internal environments. I will use the TeX commands \def and \let to temporarily change the meaning of \section:

\let\stdsection\section \def\section*#1{\stdsection{#1}} \printnomenclature % \printglossary \let\section\stdsection

If you are interested in testing it by yourself you can find complete examples here.

This topic was discussed on mrunix.de and in the LaTeX Community Forum.

17. June 2008 by stefan