[Tex/LaTex] How to break nomencl subgroups into pages

nomenclnomenclature

I'm using nomencl to create a acronyms list and a symbols list. I'm using the code below:

\usepackage{nomencl}
  \pdfbookmark[0]{\nomname}{las}
  \makenomenclature

\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
  \item[\bfseries
  \ifstrequal{#1}{A}{Acronyms}{%
  \ifstrequal{#1}{S}{Symbols}{%
]}

And to generate the list:

\nomenclature[A]{CC}{Creative Commons}
\nomenclature[S]{N}{Newton (unit measure)}
\printnomenclature[2cm]

But they are rendered in the same page. How can I break each group in its own page?

Best Answer

Redefine your \nomgroup using \ifthenelse (inspired from the package documentation) instead of \ifstrequal, and insert a \clearpage command before the start of Symbols. You can obviously generalize this to any number of subgroups that you create using this method.

MWE:

\documentclass{article}
\usepackage{nomencl}
  \makenomenclature

 \RequirePackage{ifthen}
 \renewcommand{\nomgroup}[1]{%
     \ifthenelse{\equal{#1}{A}}{\item[\textbf{Acronyms}]}{%
         \clearpage\ifthenelse{\equal{#1}{S}}{\item[\textbf{Symbols}]}{}}}

\begin{document}
    \nomenclature[A]{CC}{Creative Commons}
    \nomenclature[S]{N}{Newton (unit measure)}
    \printnomenclature[2cm]
\end{document}

First page:

first

Second page:

enter image description here

Related Question