summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hyperref/backref.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/backref.sty')
-rw-r--r--Master/texmf-dist/tex/latex/hyperref/backref.sty82
1 files changed, 54 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/backref.sty b/Master/texmf-dist/tex/latex/hyperref/backref.sty
index c553bfba9a3..53cee37f0a9 100644
--- a/Master/texmf-dist/tex/latex/hyperref/backref.sty
+++ b/Master/texmf-dist/tex/latex/hyperref/backref.sty
@@ -8,7 +8,7 @@
%%
%% File: backref.dtx
%% Copyright (C) 1995-2000 David Carlisle, Sebastian Rahtz, Heiko Oberdiek
-%% 2001-2010 Heiko Oberdiek
+%% 2001-2012 Heiko Oberdiek
%%
%% This file is part of the `Hyperref Bundle'.
%% -------------------------------------------
@@ -29,32 +29,42 @@
%% given in the file `manifest.txt'.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{backref}
- [2010/08/30 v1.36 Bibliographical back referencing]%
-\newif\ifBR@verbose
-\@ifundefined{ifHy@verbose}{%
- \BR@verbosefalse
-}{%
- \let\ifBR@verbose\ifHy@verbose
+ [2012/07/25 v1.38 Bibliographical back referencing]%
+\RequirePackage{kvoptions}[2011/06/30]
+\RequirePackage{kvsetkeys}[2009/07/30]
+\RequirePackage{ltxcmds}[2009/12/12]
+\SetupKeyvalOptions{%
+ family=backref,%
+ prefix=BR@,%
}
-\DeclareOption{verbose}{\BR@verbosetrue}
+\newcommand*{\backrefsetup}{\kvsetkeys{backref}}
+\DeclareBoolOption[%
+ \ltx@ifundefined{ifHy@verbose}{%
+ false%
+ }{%
+ \ifx\ifHy@verbose\iftrue true\else false\fi
+ }%
+]{verbose}
\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}{%
+\DeclareVoidOption{pageref}{%
\def\backref{\backrefpagesname\ }%
\let\backrefxxx\page@backref
}
-\DeclareOption{ref}{%
+\DeclareVoidOption{ref}{%
\def\backref{\backrefsectionsname\ }%
\let\backrefxxx\section@backref
}
-\DeclareOption{hyperref}{%
+\DeclareVoidOption{hyperref}{%
\def\backref{}\let\backrefxxx\hyper@section@backref
}
-\DeclareOption{hyperpageref}{%
+\DeclareVoidOption{hyperpageref}{%
\def\backref{}\let\backrefxxx\hyper@page@backref
}
+\DeclareBoolOption[true]{enable}
+\DeclareComplementaryOption{disable}{enable}
\def\backrefenglish{%
\def\backrefpagesname{pages}%
\def\backrefsectionsname{sections}%
@@ -118,7 +128,7 @@
\errmessage{No definitions for language `#2' found!}%
\noexpand\fi
\endgroup
- \noexpand\DeclareOption{#1}{%
+ \noexpand\DeclareVoidOption{#1}{%
\noexpand\BR@addto{\noexpand##1}{\noexpand##2}%
}%
}%
@@ -147,8 +157,18 @@
\BR@DeclareLang{brazilian}{brazil}
\BR@DeclareLang{afrikaans}{afrikaans}
\backrefenglish
-\ExecuteOptions{pageref}
-\ProcessOptions*\relax
+\backrefsetup{pageref}
+\ProcessKeyvalOptions*
+\def\BR@DisableOption#1{%
+ \DisableKeyvalOption[%
+ action=warning,%
+ package=backref,%
+ ]{backref}{#1}%
+}
+\BR@DisableOption{ref}
+\BR@DisableOption{pageref}
+\BR@DisableOption{hyperref}
+\BR@DisableOption{hyperpageref}
\newif\ifbackrefparscan
\backrefparscantrue
\newif\ifBR@BackrefAlt
@@ -390,9 +410,6 @@
}
\def\BR@citex[#1]#2{%
\BRorg@citex[{#1}]{#2}%
- \ifBR@verbose
- \PackageInfo{backref}{back cite \string`#2\string'}%
- \fi
\Hy@backout{#2}%
}
\@ifpackageloaded{chicago}{%
@@ -404,18 +421,27 @@
}{}
\def\Hy@backout#1{%
\@bsphack
- \ifx\@empty\@currentlabel
- \protected@write\@auxout{}{%
- \string\@writefile{brf}{%
- \string\backcite{#1}{{\thepage}{(document)}{Doc-Start}}%
+ \ifBR@enable
+ \ifBR@verbose
+ \PackageInfo{backref}{Back cite \string`#1\string'}%
+ \fi
+ \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}}%
+ \else
+ \protected@write\@auxout{}{%
+ \string\@writefile{brf}{%
+ \string\backcite{#1}{{\thepage}{\@currentlabel}{\@currentHref}}%
+ }%
}%
- }%
+ \fi
+ \else
+ \ifBR@verbose
+ \PackageInfo{backref}{Disabled back cite \string`#1\string'}%
+ \fi
\fi
\@esphack
}