From 2966f8b2993275dcac7d3b9e53d8b1a7bc66b43a Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 12 Nov 2013 01:50:30 +0000
Subject: autonum (12nov13)

git-svn-id: svn://tug.org/texlive/trunk@32126 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/autonum/autonum.sty | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

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

diff --git a/Master/texmf-dist/tex/latex/autonum/autonum.sty b/Master/texmf-dist/tex/latex/autonum/autonum.sty
index ee745a2cf84..826fde6ab44 100644
--- a/Master/texmf-dist/tex/latex/autonum/autonum.sty
+++ b/Master/texmf-dist/tex/latex/autonum/autonum.sty
@@ -13,7 +13,7 @@
 %% ----------------------------------------------------------------
 %% 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{autonum}[2013/10/13 v0.3.6 autonum LaTeX package]
+\ProvidesPackage{autonum}[2013/11/10 v0.3.7 autonum LaTeX package]
 \PassOptionsToPackage{hypertexnames=false}{hyperref}
 \RequirePackage{etoolbox}
 \RequirePackage{amsmath}
@@ -166,7 +166,7 @@
 }
 
 \def\autonum@patchSubcommands#1{%
-\global\letcs{\label}{autonum@patched#1Label}%
+\expandafter\GlobalLetLtxMacro\expandafter\label\csname autonum@patched#1Label\endcsname
 \ifstrequal{#1}{multline}{%
 }{%
   \global\letcs{\\}{autonum@patched#1Newline}%
@@ -174,21 +174,25 @@
 }
 
 \def\autonum@restoreSubcommands{%
-\global\let\label\autonum@labelNormal%
+\GlobalLetLtxMacro{\label}{\autonum@labelNormal}%
 \global\let\\\autonum@newlineNormal%
 }
 
 \def\autonum@generatePatchedLabel#1{%
-\csdef{autonum@patched#1Label}##1{%
+\expandafter\newcommand\csname autonum@patched#1Label\endcsname[2][\@empty]{%
 \ifdef{\autonum@currentLabel}{%
 \PackageError{autonum}{Two succeeding \string\label's detected}{Did you forget a \string\\?}%
 }{%
-\def\autonum@currentLabel{##1}%
+\def\autonum@currentLabel{##2}%
 }%
-\ifcsedef{autonum@##1Referenced}{%
+\ifcsedef{autonum@##2Referenced}{%
 \let\df@label\@empty%
-\csuse{autonum@label#1}{##1}%
-}{}
+\ifx\@empty##1\relax
+\csuse{autonum@label#1}{##2}%
+\else
+\csuse{autonum@label#1}[##1]{##2}%
+\fi
+}{}%
 }%
 }
 
-- 
cgit v1.2.3

