nomencl and glossary examples with numbered sections

Source code examples for the blog entry “Hack: change starred into unstarred“:

nomencl:

\documentclass[a4paper,10pt]{article}
\usepackage{nomencl}
\makenomenclature
 
\begin{document}
\tableofcontents
\bigskip
\section{First section}
$\gamma = \int_1^\infty\left({1\over\lfloor x\rfloor}
-{1\over x}\right)\,dx$
\nomenclature{$\gamma$}{Euler–Mascheroni constant\nomrefpage}
 
\let\stdsection\section
\def\section*#1{\stdsection{#1}}
\printnomenclature
\let\section\stdsection
 
\section{Another section}
Text
\end{document}

glossary:

\documentclass[a4paper,10pt]{article}
\usepackage{glossary}
\makeglossary
 
\begin{document}
\tableofcontents
\bigskip
\section{First section}
$\gamma = \int_1^\infty\left({1\over\lfloor x\rfloor}
-{1\over x}\right)\,dx$
\glossary{name={$\gamma$},
  description={Euler–Mascheroni constant}}
 
\let\stdsection\section
\def\section*#1{\stdsection{#1}}
\printglossary
\let\section\stdsection
 
\section{Another section}
Text
\end{document}

One Comment

  1. Pingback: Hack: change starred into unstarred - TeXblog - Typography with TeX and LaTeX

Leave a Reply