diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/etoc/etoc.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/etoc/etoc.dtx | 116 |
1 files changed, 98 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/latex/etoc/etoc.dtx b/Master/texmf-dist/source/latex/etoc/etoc.dtx index d35b93c40e7..b983b532db9 100644 --- a/Master/texmf-dist/source/latex/etoc/etoc.dtx +++ b/Master/texmf-dist/source/latex/etoc/etoc.dtx @@ -2,12 +2,12 @@ % N.B.: this dtx file is NOT for use with \DocInput. The latex source of the % user manual is not prefixed with percent signs. %<*none> -\def\etocdtxtimestamp {Time-stamp: <17-06-2018 at 22:53:11 CEST>}% +\def\etocdtxtimestamp {Time-stamp: <04-07-2018 at 15:13:02 CEST>}% %</none> %<*!readme> %% %% Package: etoc -%% Version: 1.08o-2018/06/15 +%% Version: 1.08p-2018/07/04 %% License: LPPL 1.3c %% Copyright (C) 2012-2018 Jean-Francois Burnol %% <jfbu at free dot fr> @@ -17,14 +17,14 @@ %% %</!readme> %<*insfile> -\def\etocpkgdate {2018/06/15} -\def\etocdocdate {2018/06/15} -\def\etocpkgversion {v1.08o} +\def\etocpkgdate {2018/07/04} +\def\etocdocdate {2018/07/04} +\def\etocpkgversion {v1.08p} \def\etocpkgdescription {Completely customisable TOCs (JFB)} %</insfile> %<*none> -\def\etocDEpkgdate {15.06.2018}% METTRE À JOUR À CHAQUE BUMP! -\def\etocDEdocdate {15.06.2018} +\def\etocDEpkgdate {04.07.2018}% METTRE À JOUR À CHAQUE BUMP! +\def\etocDEdocdate {04.07.2018} \def\etocDEDEdocdate {09.04.2015}% \def\etocDEDEpkgversion {v1.08d}% % Definition of \etocLicense @@ -35,7 +35,7 @@ \catcode32=13\catcode`\\=12^^Brelax^^A ^^Bfirstofone{^^Bendgroup^^Bdef^^BetocLicense^^A {% Package: etoc -% Version: 1.08o-2018/06/15 +% Version: 1.08p-2018/07/04 % License: LPPL 1.3c % Copyright (C) 2012-2018 Jean-Francois Burnol <jfbu at free dot fr> % Copyright (C) 2014-2018 Christine Roemer <Christine_Roemer at t-online dot de> @@ -69,7 +69,7 @@ %<*readme> <!-- --> - Source: etoc.dtx (v1.08o-2018/06/15) + Source: etoc.dtx (v1.08p-2018/07/04) Author: Jean-Francois Burnol Author: Christine Roemer et al. (German tranlation) Info: Completely customisable TOCs @@ -185,6 +185,14 @@ etoc.pdf, etoc-DE.pdf, etoc.dvi, etoc-DE.dvi. RECENT CHANGES ============== +v1.08p \[2018/04/07\] +--------------------- + +Fixed bug surfacing in case of `linktoc=page` option of hyperref. +Thanks to Denis Bitouzé for report (cf. +https://github.com/ho-tex/hyperref/issues/65, +https://github.com/dbitouze/yathesis/issues/61). + v1.08o \[2018/06/15\] --------------------- @@ -10919,7 +10927,14 @@ Dokumentation erzeugt von der Quelldatei mit dem Stempel \begin{multicols}{2} \begin{jfverbatim} -v1.08o [2018/06/15]^ +v1.08p [2018/07/04]^ + + Fixed bug surfacing in case of linktoc=page option of hyperref. + Thanks to Denis Bitouzé for report (cf. + https://github.com/ho-tex/hyperref/issues/65, + https://github.com/dbitouze/yathesis/issues/61). + +~v1.08o [2018/06/15]^ Fixed bug showing up if an unnumbered TOC entry starts with a brace, and document uses hyperref. Caused by a typo in a macro name at @@ -11494,6 +11509,7 @@ v1.08o [2018/06/15]^ \newif\ifEtoc@notocifnotoc % 1.08e \def\etocnotocifnotoc {\Etoc@checksemptinesstrue\Etoc@notocifnotoctrue } \def\etoc@{\etoc@} +\newif\ifEtoc@bracedname % 1.08p % \end{macrocode} % |1.07g| uses a second counter; this could be avoided, but ok, let's not be % that strict. @@ -12013,6 +12029,10 @@ v1.08o [2018/06/15]^ % |\etocglobaldefs|. % % |1.08n| adds |\futurelet|-based methods to avoid unbracing things. +% +% |1.08p| uses |\Etoc@@getnb| (and |\Etoc@@getit|) to intercept cases +% when |\numberline| is hidden behind braces +% (\url{https://github.com/ho-tex/hyperref/issues/65}). % \begin{macrocode} \def\Etoc@lxyz #1#2{% \Etoc@global\let\etocthelink\@firstofone % fall-back, was let \@empty up to 1.08i (inc.) @@ -12021,12 +12041,12 @@ v1.08o [2018/06/15]^ \futurelet\Etoc@getthepage@token \Etoc@getthepage #2\etoc@ % defines \etocthelinkedpage \futurelet\Etoc@getnb@token - \Etoc@getnb #1\relax\relax\etoc@ % sets number, name, and \etocthelink + \Etoc@@getnb #1\relax\relax\etoc@ % sets number, name, and \etocthelink \ifEtoc@number \else \ifnum\Etoc@level=\m@ne \futurelet\Etoc@getit@token - \Etoc@getit #1\hspace\relax\etoc@ % additional job for parts + \Etoc@@getit #1\hspace\relax\etoc@ % additional job for parts \fi \fi \Etoc@global\expandafter\let\csname etoclink \endcsname\etocthelink @@ -12083,7 +12103,33 @@ v1.08o [2018/06/15]^ % no bug was reported. % % Anyway I refactored the whole thing at |1.08n|. +% +% |1.08p| adds workaround for an extra brace pair inserted by hyperref +% in case of |linktoc=page| option +% \centeredline{\url{https://github.com/ho-tex/hyperref/issues/65}} % \begin{macrocode} +\def\Etoc@@getnb {% + \Etoc@bracednamefalse + \ifx\Etoc@getnb@token\bgroup + \expandafter\Etoc@getnb@checkifbraced + \else + \expandafter\Etoc@getnb + \fi +} +\def\Etoc@tworelax{\relax\relax} +\def\Etoc@getnb@checkifbraced #1#2\etoc@ {% + \def\Etoc@tmp{#2}% + \ifx\Etoc@tmp\Etoc@tworelax + \expandafter\expandafter\expandafter\Etoc@getnb@nameisbraced + \expandafter\@firstofone + \else + \expandafter\Etoc@getnb + \fi {#1}#2\etoc@ +} +\def\Etoc@getnb@nameisbraced {% + \Etoc@bracednametrue + \futurelet\Etoc@getnb@token\Etoc@getnb +} \def\Etoc@getnb {% \ifx\Etoc@getnb@token\bgroup \expandafter\Etoc@getnb@nohyp@nonbr @@ -12138,8 +12184,13 @@ v1.08o [2018/06/15]^ \Etoc@global\Etoc@numbertrue \Etoc@global\def\etocthenumber {#2}% \Etoc@global\def\etocthelinkednumber {#2}% - \Etoc@global\def\etocthename {#3}% - \Etoc@global\def\etocthelinkedname {#3}% + \ifEtoc@bracedname + \Etoc@global\def\etocthename {{#3}}% + \Etoc@global\def\etocthelinkedname {{#3}}% + \else + \Etoc@global\def\etocthename {#3}% + \Etoc@global\def\etocthelinkedname {#3}% + \fi } \def\Etoc@getnb@nohyp@nonbr #1\etoc@ {% % \etocthename and \etocthelinkedname already defined in \Etoc@lxyz @@ -12160,6 +12211,11 @@ v1.08o [2018/06/15]^ % bad macro naming scheme caused a typo in a macro name, and it was % left undefined. % Fixed at |1.08o|. +% +% At |1.08p| which fixed an hyperref problem in case of |linktoc=page| +% we are lazy because the problem with extra braces should not happen +% in this branch (hyperref does not brace the hyperlink). So we ignore +% the |\ifEtoc@bracedname| setting. % \begin{macrocode} \def\Etoc@getnb@hyp #1#2#3#4#5#6\etoc@ {% \edef\Etoc@tmp {{#3}}% @@ -12204,7 +12260,21 @@ v1.08o [2018/06/15]^ % |1.08| adds the |\Etoc@global|'s. % % |1.08n| refactors this but it is still not extremely robust. +% +% |1.08p| completes the fix of |linktoc=page| problematic hyperref. If +% the name was found to be braced, keep the brace pair on extracted +% name. But not for extracted number... don't ask why, I did not want +% spending ages on working around hyperref's bug. % \begin{macrocode} +\def\Etoc@@getit{% + \ifEtoc@bracedname + \expandafter\expandafter\expandafter\Etoc@getit@nameisbraced + \expandafter\@firstofone + \else + \expandafter\Etoc@getit + \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 @@ -12224,8 +12294,13 @@ v1.08o [2018/06/15]^ \fi } \def\Etoc@getit@nohyp@getname #1\hspace\relax\etoc@ {% - \Etoc@global\def\etocthename {#1}% - \Etoc@global\def\etocthelinkedname {#1}% + \ifEtoc@bracedname + \Etoc@global\def\etocthename {{#1}}% + \Etoc@global\def\etocthelinkedname {{#1}}% + \else + \Etoc@global\def\etocthename {#1}% + \Etoc@global\def\etocthelinkedname {#1}% + \fi } % \end{macrocode} % |1.07n| replaces use of |\toks@| by macro |\Etoc@tmp|. |1.08| adds @@ -12239,7 +12314,12 @@ v1.08o [2018/06/15]^ % overshadowed this one by a real compilation error rather than a missing link % in the procuced PDF. % -% |1.08n| refactors the whole thing. |1.08o| chooses better names for macros. +% |1.08n| refactors the whole thing. |1.08o| chooses better names for +% macros. +% +% For |1.08p| fix of hyperref's extra brace (see |\Etoc@@getnb|, +% |\Etoc@@getit|), this branch should not suffer the issue, hence I +% don't bother checking |\ifEtoc@bracedname| status. % \begin{macrocode} \def\Etoc@getit@hyp #1#2#3#4#5#6\etoc@ {% \edef\Etoc@tmp {{#3}}% @@ -13753,7 +13833,7 @@ v1.08o [2018/06/15]^ Grave accent \` Left brace \{ Vertical bar \| Right brace \} Tilde \~} -\CheckSum{3375}% +\CheckSum{3454}% \csname check@checksum\endcsname \Finale |