summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/hyperref/backref.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref/backref.dtx')
-rw-r--r--Master/texmf-dist/source/latex/hyperref/backref.dtx66
1 files changed, 63 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/backref.dtx b/Master/texmf-dist/source/latex/hyperref/backref.dtx
index bb6cbdcd3d6..8a24e6d27dd 100644
--- a/Master/texmf-dist/source/latex/hyperref/backref.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/backref.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: backref.dtx Copyright (C) 1995-2005 David Carlisle, Sebastian Rahtz, Heiko Oberdiek
+%% File: backref.dtx Copyright (C) 1995-2009 David Carlisle, Sebastian Rahtz, Heiko Oberdiek
%
%% This file is part of the `Hyperref Bundle'.
%% -------------------------------------------
@@ -22,9 +22,9 @@
%<driver>\ProvidesFile{backref.drv}
% \fi
% \ProvidesFile{backref.dtx}
- [2006/09/05 v1.28 Bibliographical back referencing]%
+ [2009/11/14 v1.29 Bibliographical back referencing]%
%
-% \CheckSum{574}
+% \CheckSum{620}
%
% \iffalse
%<*driver>
@@ -690,6 +690,66 @@
}
% \end{macrocode}
% \end{macro}
+%
+% \subsection{Rerun warning}
+%
+% The following code computes a MD5 sum and the file size of the
+% |.brf| file at the begin and the end of the document and compares
+% them. A rerun warning is given, if they do not match.
+% This method requires pdf\TeX\ or Lua\TeX. The method fails,
+% if the MD5 sum and the file size are the same for
+% a changed |.brf| file (it's probably very seldom).
+% \begin{macrocode}
+\RequirePackage{pdftexcmds}[2009/04/10]
+\begingroup
+ \xdef\BR@CheckSumBefore{%
+ \@ifundefined{pdf@filemdfivesum}{}{%
+ \pdf@filemdfivesum{\jobname.brf}%
+ }%
+ :%
+ \@ifundefined{pdf@filesize}{}{%
+ \pdf@filesize{\jobname.brf}%
+ }%
+ }%
+\endgroup
+\AtBeginDocument{%
+ \AtEndDocument{%
+ \clearpage
+ \if@filesw
+ \immediate\write\@mainaux{%
+ \string\csname\space BR@CheckEnd\string\endcsname
+ }%
+ \fi
+ }%
+% \end{macrocode}
+% \begin{macro}{\BR@CheckEnd}
+% \begin{macrocode}
+ \def\BR@CheckEnd{%
+ \begingroup
+ \@ifundefined{tf@brf@open}{}{%
+ \immediate\closeout\tf@brf
+ }%
+ \edef\BR@CheckSumAfter{%
+ \@ifundefined{pdf@filemdfivesum}{}{%
+ \pdf@filemdfivesum{\jobname.brf}%
+ }%
+ :%
+ \@ifundefined{pdf@filesize}{}{%
+ \pdf@filesize{\jobname.brf}%
+ }%
+ }%
+ \ifx\BR@CheckSumBefore\BR@CheckSumAfter
+ \else
+ \PackageWarningNoLine{backref}{%
+ Rerun to get bibliographical references right%
+ }%
+ \fi
+ \endgroup
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}