diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:53:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:53:41 +0000 |
commit | 55c1e6d1e50a3c2dea5f349f8066da63aa742efb (patch) | |
tree | b7589354d3c9a67022913aea5fd36576c0a92c03 | |
parent | 3f7038cf252a38bc161f7476d831377f1d3a738a (diff) |
crossreference
git-svn-id: svn://tug.org/texlive/trunk@796 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/tex/latex/crossreference/crossreference.sty | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/crossreference/crossreference.sty b/Master/texmf-dist/tex/latex/crossreference/crossreference.sty new file mode 100644 index 00000000000..09094abe9a4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/crossreference/crossreference.sty @@ -0,0 +1,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'. |