summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/autonum/autonum.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-11-12 01:50:30 +0000
committerKarl Berry <karl@freefriends.org>2013-11-12 01:50:30 +0000
commit2966f8b2993275dcac7d3b9e53d8b1a7bc66b43a (patch)
tree20ab21051814f539393b7176c1a909b61e0d32e8 /Master/texmf-dist/tex/latex/autonum/autonum.sty
parent74456c15bcb8f119a6ff55119eadd11af99885f8 (diff)
autonum (12nov13)
git-svn-id: svn://tug.org/texlive/trunk@32126 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/autonum/autonum.sty')
-rw-r--r--Master/texmf-dist/tex/latex/autonum/autonum.sty20
1 files changed, 12 insertions, 8 deletions
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
+}{}%
}%
}