12

I want to create a nomenclature for a very large document using the nomencl.

MWE:

\documentclass{article}

\usepackage[refpage]{nomencl}
\usepackage{hyperref}

\makenomenclature

\begin{document}

\nomenclature[N]{$N$}{some number}

\printnomenclature

\end{document}

This correctly creates the Output:

output

Is it possible to make nomencl understand that hyperref is available such that 'page 1' or just '1' is a hyperlink you can click on and are actually referred to page 1?

Meneldur
  • 953

1 Answers1

16

You have to redefine the command \pagedeclaration defined by \nomencl. Please note that the original definition of \pagedeclaration depends on your selected language.

\documentclass{article}

\usepackage[refpage]{nomencl}
\usepackage[pageanchor]{hyperref}
\def\pagedeclaration#1{, \hyperlink{page.#1}{page\nobreakspace#1}}
\makenomenclature

\begin{document}
a
\clearpage
b
\nomenclature[N]{$N$}{some number}
\clearpage
\printnomenclature

\end{document}
Marco Daniel
  • 95,681
  • That's great! @MarcoDaniel , Is there a way to right-align the page numbers and fill the space (between items and their page numbers) with dots? – Alisa Sep 10 '18 at 04:51
  • 1
    I think I figured it out! I should use: \def\pagedeclaration#1{, \dotfill\hyperlink{page.#1}{page\nobreakspace#1}} – Alisa Sep 10 '18 at 05:10