diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/etoc')
-rw-r--r-- | Master/texmf-dist/tex/latex/etoc/etoc.sty | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/etoc/etoc.sty b/Master/texmf-dist/tex/latex/etoc/etoc.sty index 7ccfa626511..50c507489d8 100644 --- a/Master/texmf-dist/tex/latex/etoc/etoc.sty +++ b/Master/texmf-dist/tex/latex/etoc/etoc.sty @@ -23,14 +23,14 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{etoc} - [2016/09/29 v1.08i Completely customisable TOCs (JFB)] + [2017/09/21 v1.08j Completely customisable TOCs (JFB)] %% %% Package: etoc -%% Version: 1.08i-2016/09/29 +%% Version: 1.08j-2017/09/21 %% License: LPPL 1.3c -%% Copyright (C) 2012-2016 Jean-Francois Burnol +%% Copyright (C) 2012-2017 Jean-Francois Burnol %% <jfbu at free dot fr> -%% Copyright (C) 2014-2016 Christine Roemer +%% Copyright (C) 2014-2017 Christine Roemer %% <Christine_Roemer at t-online dot de> %% and collaborators for the translation into German of the documentation %% @@ -300,24 +300,24 @@ \Etoc@et@hop{\Etoc@prefix\Etoc@contents}{\Etoc@savedcontentsline{#1}}% } \def\Etoc@lxyz #1#2{% - \Etoc@global\@namedef {etoclink }{\leavevmode}% fall-back - \Etoc@global\let\etocthelink \@empty % fall-back - \Etoc@global\def\etocthename {#1}% (if link, will be removed later) - \Etoc@global\def\etocthelinkedname {#1}% will probably get redefined - \Etoc@getthepage #2\etoc@ % defines \etocthelinkedpage (and \etoclink) - \Etoc@getnb #1\relax\relax\etoc@ % gets number *and* name, and \etoclink + \Etoc@global\let\etocthelink\@firstofone % fall-back, was let \@empty up to 1.08i (inc.) + \Etoc@global\def\etocthename {#1}% (if linked, will be removed later) + \Etoc@global\def\etocthelinkedname {#1}% (probably redefined later) + \Etoc@getthepage #2\etoc@ % defines \etocthelinkedpage + \Etoc@getnb #1\relax\relax\etoc@ % sets number, name, and \etocthelink \ifEtoc@number\else \ifnum\Etoc@level=\m@ne \Etoc@getit #1\hspace\relax\etoc@ % additional job for parts \fi \fi + \Etoc@global\expandafter\let\csname etoclink \endcsname\etocthelink \Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname \Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber \Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage } \def\Etoc@getthepage #1{% \let\Etoc@next\Etoc@getthepage@nohyp - \ifEtoc@hyperref\ifx #1\hyper@linkstart + \ifEtoc@hyperref\ifx\hyper@linkstart#1% \let\Etoc@next\Etoc@getthepage@hyp \fi\fi \Etoc@next #1% @@ -327,22 +327,22 @@ \Etoc@global\def\etocthelinkedpage {#1}% } \def\Etoc@getthepage@hyp #1#2#3#4#5\etoc@ {% - \Etoc@global\@namedef{etoclink }##1{\leavevmode #1{#2}{#3}{##1}#5}% \Etoc@global\def\etocthepage {#4}% \edef\Etoc@tmp {{#3}}% \Etoc@global\expandafter\def\expandafter\etocthelinkedpage\expandafter {\expandafter\hyperlink \Etoc@tmp{#4}}% + \Etoc@global\edef\etocthelink##1{\noexpand\hyperlink\Etoc@tmp{##1}}% } \def\Etoc@getnb #1{% \let\Etoc@next\Etoc@getnb@nohyp - \ifEtoc@hyperref\ifx #1\hyper@linkstart + \ifEtoc@hyperref\ifx\hyper@linkstart#1% \let\Etoc@next\Etoc@getnb@hyp \fi\fi \Etoc@next #1% } \def\Etoc@getit #1{% \let\Etoc@next\Etoc@getit@nohyp - \ifEtoc@hyperref\ifx #1\hyper@linkstart + \ifEtoc@hyperref\ifx\hyper@linkstart#1% \let\Etoc@next\Etoc@getit@hyp \fi\fi \Etoc@next #1% @@ -352,12 +352,12 @@ \Etoc@global\def\etocthename {##1}% \Etoc@global\def\etocthelinkedname {##1}% }% - \ifx #1\numberline + \ifx\numberline#1% \Etoc@global\def\etocthenumber {#2}% \Etoc@global\def\etocthelinkednumber {#2}% \Etoc@global\Etoc@numbertrue \Etoc@getname #3\etoc@ - \else % then \etocthename and \etocthelinkedname already defined + \else % \etocthename and \etocthelinkedname already defined \Etoc@global\let\etocthenumber \@empty \Etoc@global\let\etocthelinkednumber \@empty \Etoc@global\Etoc@numberfalse @@ -371,7 +371,7 @@ {\expandafter\hyperlink \Etoc@tmp{##1}}% }% \def\Etoc@getnbr ##1##2##3\etoc@ {% - \ifx ##1\numberline + \ifx\numberline##1% \Etoc@global\def\etocthenumber {##2}% \edef\Etoc@tmp {{#3}}% \Etoc@global\expandafter\def\expandafter\etocthelinkednumber @@ -388,7 +388,6 @@ \expandafter {\expandafter\hyperlink \Etoc@tmp{#4}}% \fi }% - \Etoc@global\@namedef {etoclink }##1{\leavevmode #1{#2}{#3}{##1}#5}% \Etoc@global\edef\etocthelink ##1{\noexpand\hyperlink {#3}{##1}}% \Etoc@getnbr #4\relax\relax\etoc@ } @@ -407,21 +406,21 @@ \def\Etoc@getit@hyp #1#2#3#4#5#6\etoc@ {% \def\Etoc@getname ##1\hspace\relax\etoc@ {% \Etoc@global\def\etocthename {##1}% - \edef\Etoc@tmp {{#3}}% \Etoc@global\expandafter\def\expandafter\etocthelinkedname \expandafter{\expandafter\hyperlink \Etoc@tmp{##1}}% }% \def\Etoc@getnbr ##1\hspace##2##3\etoc@ {% \ifx\relax##2\else \Etoc@global\def\etocthenumber {##1}% - \edef\Etoc@tmp {{#3}}% \Etoc@global\expandafter\def\expandafter\etocthelinkednumber \expandafter{\expandafter\hyperlink \Etoc@tmp{##1}}% \Etoc@global\Etoc@numbertrue \Etoc@getname ##3\etoc@ \fi }% + \edef\Etoc@tmp {{#3}}% \Etoc@getnbr #4\hspace\relax\etoc@ + \Etoc@global\edef\etocthelink ##1{\noexpand\hyperlink\Etoc@tmp{##1}}% } \let\etocthename \@empty \let\etocthenumber \@empty @@ -429,11 +428,11 @@ \let\etocthelinkedname \@empty \let\etocthelinkednumber \@empty \let\etocthelinkedpage \@empty -\let\etocthelink \@empty +\let\etocthelink \@firstofone % prior to 1.08j its was \let to \@empty \DeclareRobustCommand*{\etocname} {} \DeclareRobustCommand*{\etocnumber}{} \DeclareRobustCommand*{\etocpage} {} -\DeclareRobustCommand*{\etoclink} {} +\DeclareRobustCommand*{\etoclink} {\@firstofone} \DeclareRobustCommand*{\etocifnumbered} {\ifEtoc@number\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} \expandafter\let\expandafter\etocxifnumbered\csname etocifnumbered \endcsname |