From eb20b1a58efdf85ed1ef1c7091bcb414a7a60a32 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 28 Apr 2007 00:47:40 +0000
Subject: oberdiek as always, infwarerr v1.0 new and updates

git-svn-id: svn://tug.org/texlive/trunk@4200 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/oberdiek/zref-base.sty | 48 ++++++++++++++--------
 1 file changed, 32 insertions(+), 16 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/oberdiek/zref-base.sty')

diff --git a/Master/texmf-dist/tex/latex/oberdiek/zref-base.sty b/Master/texmf-dist/tex/latex/oberdiek/zref-base.sty
index 0cd0c2ac6c2..eef1fc7003c 100644
--- a/Master/texmf-dist/tex/latex/oberdiek/zref-base.sty
+++ b/Master/texmf-dist/tex/latex/oberdiek/zref-base.sty
@@ -33,7 +33,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{zref-base}%
-  [2007/04/06 v1.7 Module base for zref (HO)]%
+  [2007/04/22 v1.8 Module base for zref (HO)]%
 \def\ZREF@name{zref}
 \def\ZREF@ErrorNoLine#1#2{%
   \begingroup
@@ -260,15 +260,15 @@
   \fi
 }
 \def\zref@refused#1{%
-  \begingroup
-    \csname @safe@activestrue\endcsname
-    \zref@ifrefundefined{#1}{%
-      \protect\G@refundefinedtrue
-      \@latex@warning{%
-        Reference `#1' on page \thepage \space undefined%
-      }%
-    }{}%
-  \endgroup
+  \zref@wrapper@babel\ZREF@refused{#1}%
+}
+\def\ZREF@refused#1{%
+  \zref@ifrefundefined{#1}{%
+    \protect\G@refundefinedtrue
+    \@latex@warning{%
+      Reference `#1' on page \thepage \space undefined%
+    }%
+  }{}%
 }
 \def\zref@extract#1#2{%
   \expandafter\expandafter\expandafter\ZREF@extract
@@ -319,13 +319,29 @@
 }
 \let\ZREF@unexpanded\@firstofone
 \long\def\zref@wrapper@babel#1#2{%
-  \begingroup
-    \csname @safe@activestrue\endcsname
-    \edef\x{#2}%
-  \expandafter\endgroup
-  \expandafter\ZREF@wrapper@babel\expandafter{\x}{#1}%
+  \ifcsname if@safe@actives\endcsname
+    \expandafter\@firstofone
+  \else
+    \expandafter\@secondoftwo
+  \fi
+  {%
+    \if@safe@actives
+      \expandafter\@secondoftwo
+    \else
+      \expandafter\@firstoftwo
+    \fi
+    {%
+      \begingroup
+        \csname @safe@activestrue\endcsname
+        \edef\x{#2}%
+      \expandafter\endgroup
+      \expandafter\ZREF@wrapper@babel\expandafter{\x}{#1}%
+    }%
+  }{%
+    #1{#2}%
+  }%
 }
-\def\ZREF@wrapper@babel#1#2{%
+\long\def\ZREF@wrapper@babel#1#2{%
   #2{#1}%
 }
 \def\zref@require@unique{%
-- 
cgit v1.2.3

