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?

1 Answer 1

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}
2
  • 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, 2018 at 4:51
  • 1
    I think I figured it out! I should use: \def\pagedeclaration#1{, \dotfill\hyperlink{page.#1}{page\nobreakspace#1}}
    – Alisa
    Sep 10, 2018 at 5:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .