11

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?

15

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.