From d7657995bee70cf2feba1fe06e2b5c8f133a39b6 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 4 Nov 2010 22:57:53 +0000
Subject: refstyle 0.5 (4nov10)

git-svn-id: svn://tug.org/texlive/trunk@20318 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/refstyle/refstyle.sty | 75 ++++++++++++-----------
 1 file changed, 40 insertions(+), 35 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/refstyle/refstyle.sty')

diff --git a/Master/texmf-dist/tex/latex/refstyle/refstyle.sty b/Master/texmf-dist/tex/latex/refstyle/refstyle.sty
index a64ddc61ebf..b482db84d9b 100644
--- a/Master/texmf-dist/tex/latex/refstyle/refstyle.sty
+++ b/Master/texmf-dist/tex/latex/refstyle/refstyle.sty
@@ -24,8 +24,8 @@
 %% by Danie Els (dnjels@sun.ac.za).
 %% -------------------------------------------------------------------
 %% 
-\newcommand*{\RefstyleFileDate}{2010/10/21}
-\newcommand*{\RefstyleFileVersion}{v0.4}
+\newcommand*{\RefstyleFileDate}{2010/11/02}
+\newcommand*{\RefstyleFileVersion}{v0.5}
 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{refstyle}[\RefstyleFileDate\space
@@ -38,6 +38,8 @@
    \let\@tempc\relax
    \KV@do#2,\relax,}
 \@ifundefined{vref@space}{\let\vref@space\space}{}
+\providecommand*{\@safe@activestrue}{}
+\providecommand*{\@safe@activesfalse}{}
 \newcommand*{\RS@namelet}[1]{\expandafter\let\csname #1\endcsname}
 \newcommand*{\RS@nameuse}[1]{\csname #1\endcsname}
 \newcommand*{\RS@namedef}[1]{\expandafter\def\csname #1\endcsname}
@@ -110,27 +112,27 @@
     \else
         \define@key{RS@#1}{key}[]{\RS@namedef{RS@#1@key}{##1}}%
     \fi
-   \define@key{RS@#1}{s}[true]{\RS@setbool{RSplural}{##1}}%
-   \define@key{RS@#1}{name}[]{\RS@namedef{RS@#1@name}{##1}}%
-   \define@key{RS@#1}{names}[]{\RS@namedef{RS@#1@names}{##1}}%
-   \define@key{RS@#1}{Name}[]{\RS@namedef{RS@#1@Name}{##1}}%
-   \define@key{RS@#1}{Names}[]{\RS@namedef{RS@#1@Names}{##1}}%
-   \define@key{RS@#1}{rngtxt}[\space to~]{\RS@namedef{RS@#1@rngtxt}{##1}}%
-   \define@key{RS@#1}{lsttwotxt}[\space and~]{\RS@namedef{RS@#1@lsttwotxt}{##1}}%
-   \define@key{RS@#1}{lsttxt}[\space and~]{\RS@namedef{RS@#1@lsttxt}{##1}}%
-   \define@key{RS@#1}{refcmd}[\ref{####1}]{\RS@namedef{RS@#1@rcmd}####1{##1}}%
-   \define@key{RS@#1}{xr}[]{\RS@namedef{RS@#1@xr}{##1}}%
-   \define@key{RS@#1}{vref}[true]{\RS@namedef{RS@#1vref}{##1}}%
-   \RS@setkeys{RS@#1}{key,
-                   s=false,
-                   name,names,Name,Names,
-                   rngtxt,lsttwotxt,lsttxt,
-                   refcmd,
-                   xr,
-                   vref=false}%
-   \RS@setkeys{RS@#1}{#2}%
-   \RS@buildref{#1}%
-   }
+    \define@key{RS@#1}{s}[true]{\RS@setbool{RSplural}{##1}}%
+    \define@key{RS@#1}{name}[]{\RS@namedef{RS@#1@name}{##1}}%
+    \define@key{RS@#1}{names}[]{\RS@namedef{RS@#1@names}{##1}}%
+    \define@key{RS@#1}{Name}[]{\RS@namedef{RS@#1@Name}{##1}}%
+    \define@key{RS@#1}{Names}[]{\RS@namedef{RS@#1@Names}{##1}}%
+    \define@key{RS@#1}{rngtxt}[\space to~]{\RS@namedef{RS@#1@rngtxt}{##1}}%
+    \define@key{RS@#1}{lsttwotxt}[\space and~]{\RS@namedef{RS@#1@lsttwotxt}{##1}}%
+    \define@key{RS@#1}{lsttxt}[\space and~]{\RS@namedef{RS@#1@lsttxt}{##1}}%
+    \define@key{RS@#1}{refcmd}[\ref{####1}]{\RS@namedef{RS@#1@rcmd}####1{##1}}%
+    \define@key{RS@#1}{xr}[]{\RS@namedef{RS@#1@xr}{##1}}%
+    \define@key{RS@#1}{vref}[true]{\RS@namedef{RS@#1vref}{##1}}%
+    \RS@setkeys{RS@#1}{key,
+                       s=false,
+                       name,names,Name,Names,
+                       rngtxt,lsttwotxt,lsttxt,
+                       refcmd,
+                       xr,
+                       vref=false}%
+    \RS@setkeys{RS@#1}{#2}%
+    \RS@buildref{#1}%
+    }
 \newcommand*{\RS@clearref}[1]{%
    \RS@ifundefined{RS@#1@template}
       {\RS@namedef{RS@#1@template}{#1}%
@@ -166,12 +168,14 @@
       {\RS@nameuse{RS@#1}{#2}}%
       {\RS@nameuse{RS@#1}{#2}[]}}
 \def\RS@ref#1[#2]#3{%
-   \begingroup
-      \RS@setkeys{RS@#1}{#2}%
-      \edef\RS@tmpa{\zap@space#3 \@empty}%
-      \edef\RS@tmpa{\noexpand\RS@@ref{#1} \RS@tmpa,\relax\noexpand\@eolst}%
-      \RS@tmpa%
-   \endgroup}
+    \begingroup
+        \RS@setkeys{RS@#1}{#2}%
+        \@safe@activestrue%
+        \edef\RS@tmpa{\zap@space#3 \@empty}%
+        \@safe@activesfalse%
+        \edef\RS@tmpa{\noexpand\RS@@ref{#1} \RS@tmpa,\relax\noexpand\@eolst}%
+        \RS@tmpa%
+    \endgroup}
 \def\RS@@ref#1 #2,#3\@eolst{%
    \ifx\relax#3\relax
       \RS@makename{#1}%
@@ -299,12 +303,13 @@
   \fi
   \@temptokena{}\toks@\@temptokena}
 \def\DeclareLangOpt#1#2{%
-   \edef\RS@tempa{\expandafter\@gobble\string#2}%
-   \RS@ifundefined{\RS@tempa}%
-       {\PackageError{\RS@pkgname}%
-          {Unknown definitions \@backslashchar\RS@tempa\MessageBreak
-           for language option `#1'}{}}%
-       {\DeclareOption{#1}{\expandafter\RSaddto\csname extras#1\endcsname #2}}%
+    \edef\RS@tempa{\expandafter\@gobble\string#2}%
+    \RS@ifundefined{\RS@tempa}%
+        {\PackageError{\RS@pkgname}{%
+            Unknown definitions \@backslashchar\RS@tempa\MessageBreak
+            for language option `#1'}{}}%
+        {\DeclareOption{#1}{%
+            \AtBeginDocument{\expandafter\RSaddto\csname extras#1\endcsname #2}}}%
   }
 \newcommand*{\RS@cfgfile}{refstyle.cfg}
 \newcommand*{\RS@reffile}{refstyle.def}
-- 
cgit v1.2.3

