MakeIndex, Nomenclature, Glossaries and Acronymsnomencl | Formatting the page reference

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
Romn
Posts: 2
Joined: Wed May 02, 2012 11:28 am

nomencl | Formatting the page reference

Post by Romn »

Hello, I am using nomencl with the refpage option, I obtain this king of result :
c Sound speed, Page 15
and I want to customize the page reference to obtain this :
c Sound speed, p.15
("page" shorted to "p." and in italic).

I have tried to redefine the \nomrefpage command by :
\renewcommand{\nomrefpage}[1]{p.\textsl{#1}}
but it doesn't change anything.

Do you have an idea to fix this ?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

nomencl | Formatting the page reference

Post by cgnieder »

First of all: \textsl makes slanted text. If you want italics you should use \textit.

The macro you need to redefine is \pagedeclaration:

Code: Select all

\documentclass{article}
\usepackage[refpage]{nomencl}
\makenomenclature
\renewcommand*\pagedeclaration[1]{~\textit{p.\,#1}}
\begin{document}

\section*{Main equations}
\begin{equation}
 a = \frac{N}{A}
\end{equation}%
\nomenclature{$a$}{The number of angels per unit area}%
\nomenclature{$N$}{The number of angels per needle point}%
\nomenclature{$A$}{The area of the needle point}%
The equation $\sigma = m a$
\nomenclature{$\sigma$}{The total mass of angels per unit area}%
\nomenclature{$m$}{The mass of one angel}%
follows easily.

\printnomenclature

\end{document}
nomencl_pagedecl.png
nomencl_pagedecl.png (25 KiB) Viewed 7134 times
Regards
site moderator & package author
Romn
Posts: 2
Joined: Wed May 02, 2012 11:28 am

Re: nomencl | Formatting the page reference

Post by Romn »

Thank you, it works perfectly !
Post Reply