diff options
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}% }% } |