diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-29 23:26:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-29 23:26:49 +0000 |
commit | 04a0be28296aa8b6e73b84223f3d714af8823573 (patch) | |
tree | 06168acf581f665e5d4a1a2edd8b9ddb628c7e81 /Master/texmf-dist/tex/latex/autonum | |
parent | fba99232ec114a7de58113b5cc8d8a4db127cdac (diff) |
autonum (29apr13)
git-svn-id: svn://tug.org/texlive/trunk@30163 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/autonum')
-rw-r--r-- | Master/texmf-dist/tex/latex/autonum/autonum.sty | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/autonum/autonum.sty b/Master/texmf-dist/tex/latex/autonum/autonum.sty index 49a9552d548..c08de067925 100644 --- a/Master/texmf-dist/tex/latex/autonum/autonum.sty +++ b/Master/texmf-dist/tex/latex/autonum/autonum.sty @@ -13,14 +13,15 @@ %% ---------------------------------------------------------------- %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{autonum}[2013/04/20 v0.3.3 autonum LaTeX package] +\ProvidesPackage{autonum}[2013/04/28 v0.3.4 autonum LaTeX package] \PassOptionsToPackage{hypertexnames=false}{hyperref} \RequirePackage{etoolbox} \RequirePackage{amsmath} \RequirePackage[absolute]{textpos} + \def\csxdefaux#1#2{% \protected@write\@mainaux{}{% -\csxdef{\detokenize{#1}}{#2}% +\expandafter\string\expandafter\xdef\expandafter\string\csname #1\endcsname{#2}% }% } @@ -29,6 +30,14 @@ \csxdef{#1}{#2}% } +\def\vanishprotect{% +\ifx\protect\@typeset@protect +\expandafter\@firstofone +\else +\expandafter\@gobble +\fi +} + \def\ifcsedef#1#2#3{% \edef\autonum@ifcsedefTemp{#1}% \expandafter\ifcsdef\expandafter{\autonum@ifcsedefTemp}{#2}{#3}% @@ -182,20 +191,23 @@ \autonum@generatePatchedReferenceGeneral{#1}{forcsvlist}% } +\def\skipInPDFTOC#1{% +\ifdef{\texorpdfstring}{% +\texorpdfstring{#1}{}% +}{% +#1% +}% +} + \def\autonum@generatePatchedReferenceGeneral#1#2{% \csletcs{autonum@reference#1Old}{#1}% -\ifdef{\texorpdfstring}{% \csdef{#1}##1{% -\texorpdfstring{% +\skipInPDFTOC{% +\vanishprotect{% \csuse{#2}{\protect\autonum@markLabelAsReferenced}{##1}% -}{}% -\csuse{autonum@reference#1Old}{##1}% }% -}{% -\csdef{#1}##1{% -\csuse{#2}{\protect\autonum@markLabelAsReferenced}{##1}% -\csuse{autonum@reference#1Old}{##1}% }% +\csuse{autonum@reference#1Old}{##1}% }% } |