summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-11-18 21:02:44 +0000
committerKarl Berry <karl@freefriends.org>2022-11-18 21:02:44 +0000
commita1eb054178063ff37a6d5986fb5c90f129c156e8 (patch)
treecf2a0b284005cf1a0066546933ed9dee01cc2a43 /Master/texmf-dist/tex
parent5836a0aac2e9c775e9fda3dd504ac4fc955a1fe8 (diff)
etoc (18nov22)
git-svn-id: svn://tug.org/texlive/trunk@65048 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/etoc/etoc.sty93
1 files changed, 58 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/latex/etoc/etoc.sty b/Master/texmf-dist/tex/latex/etoc/etoc.sty
index 30f4245840c..c74591487a1 100644
--- a/Master/texmf-dist/tex/latex/etoc/etoc.sty
+++ b/Master/texmf-dist/tex/latex/etoc/etoc.sty
@@ -21,15 +21,14 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%%
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{etoc}
- [2022/08/30 v1.09f Completely customisable TOCs (JFB)]
-%%
%% Package: etoc
-%% Version: 1.09f
+%% Version: 1.09g (DEVELOPMENT)
%% License: LPPL 1.3c
%% Copyright (C) 2012-2022 Jean-Francois Burnol
%% <jfbu at free dot fr>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{etoc}
+[2022/11/17 v1.09g Completely customisable TOCs (JFB)]
\RequirePackage{multicol}
\DeclareOption*{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}}
\ProcessOptions\relax
@@ -153,11 +152,59 @@
\etocsetlevel{subparagraph}{5}
\AtBeginDocument{%
\@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}%
-\@ifpackageloaded{hyperref}{\Etoc@hyperreftrue
- \def\Etoc@et@hop#1#2#3#4#5{#2{#3}{#4}{#5}#1}%
- \let\Etoc@gobblefourorthree\@gobblefour}
- {\def\Etoc@et@hop#1#2#3#4{#2{#3}{#4}#1}%
- \long\def\Etoc@gobblefourorthree#1#2#3{}}%
+\@ifpackageloaded{hyperref}{%
+ \Etoc@hyperreftrue
+ \@ifpackagelater{hyperref}{2022/11/13}%
+ {%
+ \def\Etoc@getthepage {%
+ \ifx\Hy@toclinkstart\Etoc@getthepage@token
+ \expandafter\expandafter\expandafter\Etoc@getthepage@hyp
+ \else
+ \expandafter\Etoc@getthepage@nohyp
+ \fi}%
+ \def\Etoc@getnb@a {%
+ \ifx\Hy@toclinkstart\Etoc@getnb@token
+ \expandafter\expandafter\expandafter\Etoc@getnb@hyp
+ \else
+ \expandafter\Etoc@getnb@nohyp
+ \fi}%
+ \def\Etoc@getit {%
+ \ifx\Hy@toclinkstart\Etoc@getit@token
+ \expandafter\expandafter\expandafter\Etoc@getit@hyp
+ \else
+ \expandafter\Etoc@getit@nohyp
+ \fi}%
+ }%
+ {%
+ \def\Etoc@getthepage {%
+ \ifx\hyper@linkstart\Etoc@getthepage@token
+ \expandafter\Etoc@getthepage@hyp
+ \else
+ \expandafter\Etoc@getthepage@nohyp
+ \fi}%
+ \def\Etoc@getnb@a {%
+ \ifx\hyper@linkstart\Etoc@getnb@token
+ \expandafter\Etoc@getnb@hyp
+ \else
+ \expandafter\Etoc@getnb@nohyp
+ \fi}%
+ \def\Etoc@getit {%
+ \ifx\hyper@linkstart\Etoc@getit@token
+ \expandafter\Etoc@getit@hyp
+ \else
+ \expandafter\Etoc@getit@nohyp
+ \fi}%
+ }%
+ \def\Etoc@et@hop#1#2#3#4#5{#2{#3}{#4}{#5}#1}%
+ \let\Etoc@gobblefourorthree\@gobblefour
+ }%
+ {%
+ \let\Etoc@getthepage\Etoc@getthepage@nohyp
+ \let\Etoc@getnb@a\Etoc@getnb@nohyp
+ \let\Etoc@getit \Etoc@getit@nohyp
+ \def\Etoc@et@hop#1#2#3#4{#2{#3}{#4}#1}%
+ \long\def\Etoc@gobblefourorthree#1#2#3{}%
+ }%
\@ifl@t@r\fmtversion{2021/11/15}%
{%
\def\Etoc@et@hop#1#2#3#4#5{#2{#3}{#4}{#5}#1}%
@@ -357,15 +404,6 @@
\Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber
\Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage
}
-\def\Etoc@getthepage {%
- \if1\ifEtoc@hyperref
- \ifx\hyper@linkstart\Etoc@getthepage@token1\else0\fi
- \else0\fi
- \expandafter\Etoc@getthepage@hyp
- \else
- \expandafter\Etoc@getthepage@nohyp
- \fi
-}
\def\Etoc@getthepage@nohyp #1\etoc@ {%
\Etoc@global\def\etocthepage {#1}%
\Etoc@global\def\etocthelinkedpage {#1}%
@@ -402,13 +440,7 @@
\ifx\Etoc@getnb@token\bgroup
\expandafter\Etoc@getnb@nohyp@nonbr
\else
- \if1\ifEtoc@hyperref
- \ifx\hyper@linkstart\Etoc@getnb@token1\else0\fi
- \else0\fi
- \expandafter\expandafter\expandafter\Etoc@getnb@hyp
- \else
- \expandafter\expandafter\expandafter\Etoc@getnb@nohyp
- \fi
+ \expandafter\Etoc@getnb@a
\fi
}
\def\Etoc@getnb@nohyp #1{%
@@ -522,15 +554,6 @@
\fi
}
\def\Etoc@getit@nameisbraced {\futurelet\Etoc@getit@token\Etoc@getit }
-\def\Etoc@getit {%
- \if1\ifEtoc@hyperref
- \ifx\hyper@linkstart\Etoc@getit@token1\else0\fi
- \else0\fi
- \expandafter\Etoc@getit@hyp
- \else
- \expandafter\Etoc@getit@nohyp
- \fi
-}
\def\Etoc@getit@nohyp #1\hspace#2#3\etoc@ {%
\ifx\relax#2%
\else