## Local labels## Didier Rémy |

This document is also available in DVI, Postscript, and PDF. The source of this file, locallabel.tex may serve as an example.Abstract:This package provides macros to generate numeric references and refer to them by name, much as equation numbers, except that numbers and names can be reset at any time. One typical use is to refer to facts beeing establish during a proof until completion of the proof and be able to do so in the next proof without any clash of names of labels.

The package also comes with a version for HeVeA.

Let me prove it another way:Proof:Socrate is a man (1). It is well-known that all man are mortal (2). Hence, by (1) and (2), Socrate is mortal.

Did you notice that fact (1) of first proof became fact (2) in the second proof?Proof:It is well-known that all man are mortal (1). Socrate is a man (2). Hence, by (1) and (2), Socrate is mortal.

Reset numeric labels and names to refer to them

Creates a new numeric label, binds it to ⟨Name⟩, and print the label as a binding occurrence.

This primitive may take a ⟨Gname⟩ as optional argument, so that the\ref{⟨Gname⟩} can be used to refer to this label in any context. Of course ⟨Gname⟩ is subject to overriding and name clashes exactly as all global labels do.

Prints numeric use occurrence of label ⟨Name⟩.

This creates the label as\llabel, but does not print it. This can be used to skip one numeric value or to assign them in a controlled order. In this case, the next use of\llabel{⟨Name⟩} will print the name of the label as a binding occurrence.

If\llabel{⟨Name⟩} is repeated with the same name ⟨Name⟩ a warning will be issued.

Typesets ⟨Val⟩ as a binding occurrence.

Typesets ⟨Val⟩ as a use occurrence.

\begin{theorem}\label{socrate-mortal}Socrate is mortal. \end{theorem} \begin{proof} Socrate is a man~\llabel[socrate-man]{sm}. It is well-known that all man are mortal~\llabel{mm}. Hence, by~\lref {sm} and \lref {mm}, Socrate is mortal. \end{proof} Did you hear what I said? \begin{theorem} Socrate is mortal. \end{theorem} Let me prove it another way: \begin{proof} \locallabelreset It is well-known that all man are mortal~\llabel{mm}. Socrate is a man~\llabel {sm}. Hence, by~\lref {mm} and \lref {sm}, Socrate is mortal. \end{proof} Actually, in the proof of Theorem~\ref{socrate-mortal}, claim \ref{socrate-man} is arguable.

This document was translated from L^{A}T_{E}X byH^{E}V^{E}A.