blob: 09094abe9a4ba78e41de410f2d08a088c0ab6e5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
%%
%% 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'.
|