# Nomenclature sorting: Sort by Number

How would I use the Nomenclature to display a list of symbols sorted by the page number rather than symbol letter.

The code below was used to generate this List of Notations. However, I am trying to figure out how to sort by page number instead.

===

\documentclass[11pt,oneside,a4paper,onecolumn]{article}
\usepackage[left=1.5in,top=1.25in,bottom=1.25in,right=1.25in,papersize={8.50in,11.00in}]{geometry} % Sets the proper margins.
\usepackage{amsmath, amssymb, amsthm,mathtools} % AMS packages
\usepackage{hyperref}
\usepackage{appendix}
\usepackage[refpage]{nomencl}
\renewcommand{\nomname}{List of Notations}
\renewcommand*{\pagedeclaration}[1]{\unskip\dotfill\hyperpage{#1}}
\makenomenclature

\usepackage{makeidx}
\makeindex

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Begin List of Notation Page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\printnomenclature[1.5cm] % This command automatically generates the list of tables based on tables in the document.
\pagebreak[4]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% End List of Notation Page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{equation*}
F=ma
\end{equation*}

$\nomenclature{$F$}{Force}$\nomenclature{$a$}{Acceleration}

\pagebreak[4]

\begin{equation*}
E=MC^2
\end{equation*}

$\nomenclature{$E$}{Energy}$\nomenclature{$M$}{Mass}
\end{document}


This has a limitation of not sorting properly past 99 pages, and you'll still be sorting each page by case-sensitive alphabet, rather than sequentially. I expect there's some way to integrate fmtcount with an arbitrary amount of zero-padding to fix the page limitation, but I've not figured that out yet.

-
One can define \three@digits: \def\three@digits#1{\ifnum#1<100 0\ifnum#1<10 0\fi\fi\number#1} –  egreg May 6 '12 at 13:36
True. I hadn't wanted to write that sort of thing in explicitly, hoping there was something more semantic in using fmtcount, but it's probably not as big a difference as I first thought. –  Mike Renfro May 6 '12 at 13:39