diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/backref.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/hyperref/backref.sty | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/backref.sty b/Master/texmf-dist/tex/latex/hyperref/backref.sty index 7de1c59f522..8ae300d0dd3 100644 --- a/Master/texmf-dist/tex/latex/hyperref/backref.sty +++ b/Master/texmf-dist/tex/latex/hyperref/backref.sty @@ -6,9 +6,7 @@ %% %% 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 +%% File: backref.dtx Copyright (C) 1995-2005 David Carlisle, Sebastian Rahtz, Heiko Oberdiek %% This file is part of the `Hyperref Bundle'. %% ------------------------------------------- %% @@ -21,8 +19,9 @@ %% %% 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] +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{backref} + [2006/08/01 v1.26 Bibliographical back referencing] \newif\ifBR@verbose \@ifundefined{ifHy@verbose}{% \BR@verbosefalse @@ -127,15 +126,43 @@ \backrefenglish \ExecuteOptions{pageref} \ProcessOptions*\relax -\def\BR@bibitem{\@ifnextchar[\BR@@lbibitem\BR@@bibitem} +\newif\ifbackrefparscan +\backrefparscantrue +\def\BR@bibitem{% + \ifbackrefparscan + \expandafter\@ifnextchar\expandafter[\expandafter + \BR@@lbibitem\expandafter\BR@@bibitem + \else + \expandafter\@ifnextchar\expandafter[\expandafter + \BR@@@lbibitem\expandafter\BR@@@bibitem + \fi +} \def\BR@@lbibitem[#1]#2#3\par{% - \BRorg@bibitem[#1]{#2}#3% + \let\backrefprint\BR@backrefprint + \BRorg@bibitem[{#1}]{#2}#3% \BR@backref{#2}% }% \def\BR@@bibitem#1#2\par{% + \let\backrefprint\BR@backrefprint \BRorg@bibitem{#1}#2% \BR@backref{#1}% } +\def\BR@@@lbibitem[#1]#2{% + \def\backrefprint{\BR@backref{#2}}% + \BRorg@bibitem[{#1}]{#2}% +} +\def\BR@@@bibitem#1{% + \def\backrefprint{\BR@backref{#1}}% + \BRorg@bibitem{#1}% +} +\def\BR@backrefprint{% + \PackageError{backref}{% + \string\backrefprint\space is only available after \string\bibitem + \MessageBreak + with setting \string\backrefparscanfalse + }\@ehc +} +\let\backrefprint\BR@backrefprint \def\BR@backref#1{% \newblock \begingroup @@ -245,7 +272,7 @@ }% } \def\BR@citex[#1]#2{% - \BRorg@citex[#1]{#2}% + \BRorg@citex[{#1}]{#2}% \ifBR@verbose \PackageInfo{backref}{back cite \string`#2\string'}% \fi @@ -254,7 +281,7 @@ \@ifpackageloaded{chicago}{% \let\BRorg@citedatax\@citedatax \def\@citedatax[#1]#2{% - \BRorg@citedatax[#1]{#2}% + \BRorg@citedatax[{#1}]{#2}% \Hy@backout{#2}% }% }{} |