Refcheck_{2000/01/17}^{ver.1.6a} for L^{A}TEX 2ε

This short demo file describes usage of Refcheck package with L^{A}TEX 2ε. The package looks for useless labels, unlabelled equations, unused bibliography references and puts ‘keys’ of labels on margins.

To start checking one should just write

     \documentclass{article}
     \usepackage{refcheck}

at the beginning of document and compile the file twice. Then, comments on references could be found in .log file and in the margins.

Consider the set of equations

a = b  (1) eq.1
b = c  (2) ?\underline{eq.2}?
c = d,  (3) {?}

written as

     \begin{eqnarray}
     &&a=b\label{eq.1}\\
     &&b=c\label{eq.2}\\
     &&c=d,
     \end{eqnarray}

Then the .log file will contains the following messages:

 LaTeX Warning: <by RefCheck> Unused label `eq.2' on page 1
         on input line 42.
 LaTeX Warning: <by RefCheck> Unlabelled equation (3) on page 1
         on input line 44.

because the equation (1) is referenced here by (\ref{eq.1}), the label eq.2 of the second equation is not used and the last equation is numbered but it is not labelled.

The labels identifiers in the marginal notes are stated under the option showrefs (it is default) or by the command \showrefnames. This regime can be set off by the option norefs or (at any point of text) by the command

\norefnames.

These marks include some information on labels. Namely, the useless labels are underlined and bounded by ‘?’, the mark ‘{?}’ means that the equation is unlabelled. The marks are framed for labels which are used in text.

Refcheck for L^{A}TEX 2ε 2

The package is working in the same way with bibliography. Consider the short list of books:

References

book1 [1] A book.

book2 [2] Another book.

?\underline{book3}? [3] Third book.

defined as follows

     \begin{thebibliography}{9}
     \bibitem{book1}A book.
     \bibitem{book2}Another book.
     \bibitem{book3}Third book.
     \end{thebibliography}

Further, we use the labels of [1, 2] with the command \cite{book1,book2} and do not use the label ‘book3’. Then, the .log file will contain the following message

 LaTeX Warning: <by RefCheck> Unused bibitem `book3' on page 2
        on input line 89.

Commands \showcitenames and \nocitenames for bibliography are analogous to the commands \showrefnames and \norefnames. They set on and off Refcheck to write labels of bibitems to output. The same function is for the options showcites (default) and nocites.

Options msgs (default) and nomsgs state whether Refcheck writes its messages to .log file or not.

The check of unlabelled equations can be switched off by the option ignoreunlbld and on (it is set by default) by the option chkunlbld.

Refcheck generally works with AMS-L^{A}TEX (tested for AMS-L^{A}TEX 1.2, 1996/12/19), but the amsmath package must be loaded \underline{before} the Refcheck package.

Note the problem with implicitly cited labels. For example, if there is a set of equations which are labelled with a1,a2,...an and referred in

document by (\ref{a1})--(\ref{an}), then the labels a2,a3,...an-1

cannot be recognized as ‘used’.

Summary of options and commands:

Option  Command  Switch Function
showrefs^{∗}  \showrefnames  on  to put labels identifiers
norefs  \norefnames  off  in the marginal notes
showcites^{∗}  \showcitenames  on  to put bibitem identifiers
nocites  \nocitenames  off  in the marginal notes
msgs^{∗}  \setonmsgs  on  to write Refcheck’s
nomsgs  \setoffmsgs  off  messages to .log
chkunlbld^{∗} \checkunlbld  on  to check unlabelled
ignoreunlbld \ignoreunlbld  off  equations

∗ default

Versions of Refcheck, acknowledgments and bugs:

• Versions 1.0–3 worked with L^{A}TEX2.09. Many thanks to Antonio Loria for his useful comments on those versions. Version 1.2 of Refcheck can

be found in /tex-archive/obsolete/macros/latex209/contrib/ of

CTAN.

• 1.4 was the first version of Refcheck for L^{A}TEX 2ε, it had a number of bugs in its functionality for AMS-L^{A}TEX 2ε’s \eqref, \tag, split and multline. Many thanks to Cornelius C. Noack and Mikhail Zotov for finding the problem.

• In 1.5 the problems were corrected, but it was found (thanks to Mikhail Zotov) that the version marks AMS-L^{A}TEX 2ε’s equation* and gather* as unlabelled. The problem has been corrected in the version 1.6.

• 1.6a is the current version, this is the version 1.6 with minor modification of the code.

Changes:

• Version 1.5: new options msgs and nomsgs.

• Version 1.6: new options ignoreunlbld and chkunlbld (suggested by Miroslav Fikar). Another scheme of work with \bibitem and \cite to improve compability with other packages (in particular with hyperref ).