# Detect unreferenced appendix sections?

Is there some package that helps with sorting out appendix sections, that have never been rerefenced?

## Why refcheck doesn't apply

I am aware of the refcheck package, see Get list of unused labels. It can be used for my purpose, but only as a workaround:

1. Some packages create internal labels, so the unused-label warnings will be spammed with stuff like

Package refcheck Warning: Unused label SC@1' on input line 24.


Any warning, that isn't justified, is a bad thing as it may cause useful warnings to be missed by the user, especially as large documents can have dozens of such unhelpful warnings.

2. It is hard to ensure, that there is at least one label in each appendix section, without getting spurious warnings. The only way to do it easily by hand is to assign each appendix section a label for referencing the section as a whole, which will cause a warning, if the only equations inside the section, but never the section itself, is referenced (See Example1 below).

## Example1

\documentclass{article}
\usepackage{refcheck}
\begin{document}
\section{Main Text}
We reference only the equation, eq.~(\ref{eq:foobar}).

\section{Extra stuff}
\label{apx:extra-stuff}
$$foo = bar \label{eq:foobar}$$
\end{document}


• Which packages create internal labels? Maybe it's possible to adjust them. – pst Dec 14 '18 at 14:29
• Examples that I know include sidecap and apxproof`. They probably should be using \hypertarget, \hyperref instead? – kdb Dec 14 '18 at 18:04