# Greatest hits? Can I find the most \ref'd part of my document?

I now have a 200 page document and have used \ref and \label very frequently. I was wondering if it is possible to use LaTeX to create a table at the start of the document with the "top ten" most internally referenced sections/figures/tables/pages of the document? This would be interesting for me as author but also hopefully interesting for the reader also - e.g. identifying the key parts of the document to read.

No idea if LaTeX is able to do this or not?

-

I don't think there is an already made solution with LaTeX for this. If you are using linux, usual command line utilities can be used for that. For example:

EDIT

sort the output of the pipe:

  grep -o ref\{[[:graph:]]*\} file.tex | sort |uniq -c | sort -nr


  grep -o ref\{[[:graph:]]*\} file.tex | sort |uniq -c


gives the following output in a small tex file:

      2 ref{fig:constant-equipartition}
1 ref{fig:current-match}
1 ref{fig:hoffman-currents}
1 ref{fig:hoffman-ratios}