%%
%% This is file `crossreference.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% crossreference.dtx  (with options: `crossreference')
%% 
%% Crossreferencing for technical documents.
%% 
%% Copyright 2001  Vincent Filby (vfilby@acm.org), all rights reserved.
%% 
%% This program may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.2
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.2 or later is part of all distributions of LaTeX
%% version 1999/12/01 or later.
%% 
%% This program consists of the files; crossreference.dtx, crossreference.ins
%% and README.
%% 
\def\fileversion{1.0}
\def\filedate{2001/05/19}
\def\docdate{2001/05/19}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{crossreference}[\filedate\space\fileversion\space
Crossreferencing for technical documents (V. Filby)]
\newcounter{xref}
\newcommand\crossreferences{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\@starttoc{xref}
\if@restonecol\twocolumn\fi
}
\newcommand{\addxref}[1]{%
\protected@write{\@auxout}{}{\protect\@writefile{xref}{
\string\contentsline{figure}{\string\numberline {\thexref}{\string\ignorespaces{#1}}}{\@currentlabel}
}}
\xreflabel{#1}
\stepcounter{xref}
}
\newcommand{\xref}[1]{~[REF \pageref{#1}]}
\def\G@refundefinedtrue{%
  \gdef\@refundefined{%
    \@latex@warning@no@line{There were undefined references}}}
\let\@refundefined\relax

\def\@setref#1#2#3{%
  \ifx#1\relax
   \protect\G@refundefinedtrue
   \nfss@text{\reset@font\bfseries ??}%
   \@latex@warning{Reference `#3' on page \thepage \space
             undefined}%
  \else
   \expandafter#2#1\null
  \fi}

\def\ref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}

\def\pageref#1{\expandafter\@setref\csname r@#1\endcsname
                                   \@secondoftwo{#1}}
\def\@newl@bel#1#2#3{%
  \@ifundefined{#1@#2}%
    \relax
    {\gdef \@multiplelabels {%
       \@latex@warning@no@line{There were multiply-defined labels}}%
     \@latex@warning@no@line{Label `#2' multiply defined}}%
  \global\@namedef{#1@#2}{#3}}

\def\newlabel{\@newl@bel r}
\@onlypreamble\@newl@bel

\let \@multiplelabels \relax

\def\xreflabel#1{\@bsphack
  \protected@write\@auxout{}%
         {\string\newlabel{#1}{{#1}{\thexref}}}%
  \@esphack}

\def\refstepcounter#1{\stepcounter{#1}%
    \protected@edef\@currentlabel
       {\csname p@#1\endcsname\csname the#1\endcsname}%
}

\def\@currentlabel{}
\endinput
%%
%% End of file `crossreference.sty'.
