summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hyperref/backref.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:56:56 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:56:56 +0000
commita95a5bf857bfe763e22fc8d0b9b9279f9291d7da (patch)
tree1f949a8d1202dd351313448467d5ddd6f73adcf1 /Master/texmf-dist/tex/latex/hyperref/backref.sty
parent8d9974705d5deaf4314ccf44b2b5bb349c3f768b (diff)
hyperref
git-svn-id: svn://tug.org/texlive/trunk@985 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/backref.sty')
-rw-r--r--Master/texmf-dist/tex/latex/hyperref/backref.sty280
1 files changed, 280 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/backref.sty b/Master/texmf-dist/tex/latex/hyperref/backref.sty
new file mode 100644
index 00000000000..7de1c59f522
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/hyperref/backref.sty
@@ -0,0 +1,280 @@
+%%
+%% This is file `backref.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% backref.dtx (with options: `package')
+%%
+\def\fileversion{1.23}
+\def\filedate{2003/03/20}
+%% File: backref.dtx Copyright (C) 1995-2003 David Carlisle, Sebastian Rahtz, Heiko Oberdiek
+%% This file is part of the `Hyperref Bundle'.
+%% -------------------------------------------
+%%
+%% It may be distributed 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.
+%%
+%% The list of all files belonging to the `Hyperref Bundle' is
+%% given in the file `manifest.txt'.
+\ProvidesPackage{backref}%
+ [\filedate\space v\fileversion\space Bibliographical back referencing]
+\newif\ifBR@verbose
+\@ifundefined{ifHy@verbose}{%
+ \BR@verbosefalse
+}{%
+ \let\ifBR@verbose\ifHy@verbose
+}
+\DeclareOption{verbose}{\BR@verbosetrue}
+\long\def\page@backref#1#2#3{#1}
+\long\def\section@backref#1#2#3{#2}
+\long\def\hyper@section@backref#1#2#3{\hyperlink{#3}{#2}}
+\long\def\hyper@page@backref#1#2#3{\hyperlink{page.#1}{#1}}
+\DeclareOption{pageref}{%
+ \def\backref{\backrefpagesname\ }%
+ \let\backrefxxx\page@backref
+}
+\DeclareOption{ref}{%
+ \def\backref{\backrefsectionsname\ }%
+ \let\backrefxxx\section@backref
+}
+\DeclareOption{hyperref}{%
+ \def\backref{}\let\backrefxxx\hyper@section@backref
+}
+\DeclareOption{hyperpageref}{%
+ \def\backref{}\let\backrefxxx\hyper@page@backref
+}
+\def\backrefenglish{%
+ \def\backrefpagesname{pages}%
+ \def\backrefsectionsname{sections}%
+ \def\backrefsep{, }%
+ \def\backreftwosep{ and~}%
+ \def\backreflastsep{, and~}%
+}
+\def\backrefgerman{%
+ \def\backrefpagesname{Seiten}%
+ \def\backrefsectionsname{Abschnitte}%
+ \def\backrefsep{, }%
+ \def\backreftwosep{ und~}%
+ \def\backreflastsep{ und~}%
+}
+\def\backreffrench{%
+ \def\backrefpagesname{pages}%
+ \def\backrefsectionsname{sections}%
+ \def\backrefsep{, }%
+ \def\backreftwosep{ et~}%
+ \def\backreflastsep{ et~}%
+}
+\def\backrefspanish{%
+ \def\backrefpagesname{p\'aginas}
+ \def\backrefsectionsname{secciones}
+ \def\backrefsep{, }%
+ \def\backreftwosep{ y~}%
+ \def\backreflastsep{ y~}%
+}
+\def\backrefafrikaans{%
+ \def\backrefpagesname{bladsye}%
+ \def\backrefsectionsname{afdelings}%
+ \def\backrefsep{, }%
+ \def\backreftwosep{ en~}%
+ \def\backreflastsep{ en~}%
+}%
+\def\BR@addto#1#2{%
+ #2%
+ \@temptokena{#2}%
+ \ifx#1\relax
+ \let#1\@empty
+ \fi
+ \ifx#1\undefined
+ \edef#1{\the\@temptokena}%
+ \else
+ \toks@\expandafter{#1}%
+ \edef#1{\the\toks@\the\@temptokena}%
+ \fi
+ \@temptokena{}\toks@\@temptokena
+}
+\def\BR@DeclareLang#1#2{%
+ \begingroup
+ \edef\x##1##2{%
+ \noexpand\ifx##2\relax
+ \errmessage{No definitions for language `#2' found!}%
+ \noexpand\fi
+ \endgroup
+ \noexpand\DeclareOption{#1}{%
+ \noexpand\BR@addto{\noexpand##1}{\noexpand##2}%
+ }%
+ }%
+ \expandafter\x\csname extras#1\expandafter\endcsname
+ \csname backref#2\expandafter\endcsname
+}
+\BR@DeclareLang{english}{english}
+\BR@DeclareLang{UKenglish}{english}
+\BR@DeclareLang{USenglish}{english}
+\BR@DeclareLang{british}{english}
+\BR@DeclareLang{german}{german}
+\BR@DeclareLang{ngerman}{german}
+\BR@DeclareLang{austrian}{german}
+\BR@DeclareLang{naustrian}{german}
+\BR@DeclareLang{french}{french}
+\BR@DeclareLang{frenchb}{french}
+\BR@DeclareLang{francais}{french}
+\BR@DeclareLang{spanish}{spanish}
+\BR@DeclareLang{afrikaans}{afrikaans}
+\backrefenglish
+\ExecuteOptions{pageref}
+\ProcessOptions*\relax
+\def\BR@bibitem{\@ifnextchar[\BR@@lbibitem\BR@@bibitem}
+\def\BR@@lbibitem[#1]#2#3\par{%
+ \BRorg@bibitem[#1]{#2}#3%
+ \BR@backref{#2}%
+}%
+\def\BR@@bibitem#1#2\par{%
+ \BRorg@bibitem{#1}#2%
+ \BR@backref{#1}%
+}
+\def\BR@backref#1{%
+ \newblock
+ \begingroup
+ \csname @safe@activestrue\endcsname
+ \expandafter\providecommand\csname brc@#1\endcsname{0}%
+ \expandafter\providecommand\csname brcd@#1\endcsname{0}%
+ \csname @safe@activesfalse\expandafter\endcsname
+ \expandafter\backref\csname br@#1\expandafter\endcsname
+ \expandafter\backrefalt\csname brc@#1\expandafter\endcsname
+ \csname brl@#1\expandafter\endcsname
+ \csname brcd@#1\expandafter\endcsname
+ \csname brld@#1\endcsname
+ \endgroup
+ \par
+}
+\@ifundefined{newblock}{\def\newblock{\par}}{}
+\providecommand*{\backrefalt}[4]{}
+\def\backcite#1#2{%
+ \@for\x:=#1\do{%
+ \begingroup
+ \csname @safe@activestrue\endcsname
+ \edef\x{\endgroup
+ \def\noexpand\x{\expandafter\@firstofone\x\@empty}%
+ }%
+ \x
+ \expandafter\ifx\csname br@\x\endcsname\relax
+ \expandafter\protected@xdef\csname br@\x\endcsname{%
+ \protect\backrefxxx#2%
+ }%
+ \global\expandafter\let\csname brl@\x\expandafter\endcsname
+ \csname br@\x\endcsname
+ \global\expandafter\let\csname brld@\x\expandafter\endcsname
+ \csname br@\x\endcsname
+ \expandafter\gdef\csname brc@\x\endcsname{1}%
+ \expandafter\gdef\csname brcd@\x\endcsname{1}%
+ \else
+ \begingroup
+ \@ifundefined{backrefxxxdupe}{}{\let\backrefxxx\backrefxxxdupe}%
+ \expandafter\def\expandafter\reserved@a\expandafter{%
+ \backrefxxx#2%
+ }%
+ \let\BRorg@backrefxxx\backrefxxx
+ \global\let\BR@found=N%
+ \long\def\backrefxxx##1##2##3{%
+ \expandafter\def\expandafter\reserved@b\expandafter{%
+ \BRorg@backrefxxx{##1}{##2}{##3}%
+ }%
+ \ifx\reserved@a\reserved@b
+ \global\let\BR@found=Y%
+ \fi
+ }%
+ \setbox\@tempboxa\hbox{\csname br@\x\endcsname}%
+ \endgroup
+ \let\backrefsep\relax
+ \def\backreftwosep{\backrefsep}%
+ \def\backreflastsep{\backrefsep}%
+ \if N\BR@found
+ \expandafter\protected@xdef\csname br@\x\endcsname{%
+ \csname br@\x\endcsname, %
+ \protect\backrefxxx#2%
+ }%
+ \expandafter\protected@xdef\csname brl@\x\endcsname{%
+ \csname brl@\x\endcsname
+ \ifnum\@nameuse{brc@\x}=1 %
+ \noexpand\backreftwosep
+ \else
+ \noexpand\backreflastsep
+ \fi
+ \protect\backrefxxx#2%
+ }%
+ \count@=\@nameuse{brc@\x}\relax
+ \advance\count@ by 1 %
+ \expandafter\xdef\csname brc@\x\endcsname{\the\count@}%
+ \fi
+ \expandafter\protected@xdef\csname brld@\x\endcsname{%
+ \csname brld@\x\endcsname
+ \ifnum\@nameuse{brcd@\x}=1 %
+ \noexpand\backreftwosep
+ \else
+ \noexpand\backreflastsep
+ \fi
+ \protect\backrefxxx#2%
+ }%
+ \count@=\@nameuse{brcd@\x}\relax
+ \advance\count@ by 1 %
+ \expandafter\xdef\csname brcd@\x\endcsname{\the\count@}%
+ \fi
+ }%
+}
+\def\@currentHref{}
+\AtBeginDocument{%
+ \let\BRorg@bibitem\bibitem
+ \let\bibitem\BR@bibitem
+ \let\BRorg@thebibliography\thebibliography
+ \def\thebibliography{%
+ \@starttoc{brf}{}%
+ \BRorg@thebibliography
+ }%
+ \@ifundefined{NAT@parse}{%
+ \global\let\BRorg@citex\@citex
+ \global\let\@citex\BR@citex
+ }{%
+ \@ifpackageloaded{hyperref}{}{%
+ \def\hyper@natlinkstart#1{\Hy@backout{#1}}%
+ }%
+ \PackageInfo{backref}{** backref set up for natbib **}%
+ }%
+}
+\def\BR@citex[#1]#2{%
+ \BRorg@citex[#1]{#2}%
+ \ifBR@verbose
+ \PackageInfo{backref}{back cite \string`#2\string'}%
+ \fi
+ \Hy@backout{#2}%
+}
+\@ifpackageloaded{chicago}{%
+ \let\BRorg@citedatax\@citedatax
+ \def\@citedatax[#1]#2{%
+ \BRorg@citedatax[#1]{#2}%
+ \Hy@backout{#2}%
+ }%
+}{}
+\def\Hy@backout#1{%
+ \@bsphack
+ \ifx\@empty\@currentlabel
+ \protected@write\@auxout{}{%
+ \string\@writefile{brf}{%
+ \string\backcite{#1}{{\thepage}{(document)}{Doc-Start}}%
+ }%
+ }%
+ \else
+ \protected@write\@auxout{}{%
+ \string\@writefile{brf}{%
+ \string\backcite{#1}{{\thepage}{\@currentlabel}{\@currentHref}}%
+ }%
+ }%
+ \fi
+ \@esphack
+}
+\endinput
+%%
+%% End of file `backref.sty'.