From 04a0be28296aa8b6e73b84223f3d714af8823573 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 29 Apr 2013 23:26:49 +0000 Subject: autonum (29apr13) git-svn-id: svn://tug.org/texlive/trunk@30163 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/autonum/autonum.sty | 32 +++++++++++++++++-------- 1 file changed, 22 insertions(+), 10 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 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}% }% } -- cgit v1.2.3