texlive[48136] Master/texmf-dist: etoc (4jul18)

commits+karl at tug.org commits+karl at tug.org
Wed Jul 4 23:27:36 CEST 2018


Revision: 48136
          http://tug.org/svn/texlive?view=revision&revision=48136
Author:   karl
Date:     2018-07-04 23:27:36 +0200 (Wed, 04 Jul 2018)
Log Message:
-----------
etoc (4jul18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/etoc/README.md
    trunk/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf
    trunk/Master/texmf-dist/doc/latex/etoc/etoc.pdf
    trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx
    trunk/Master/texmf-dist/source/latex/etoc/etoc.ins
    trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty

Modified: trunk/Master/texmf-dist/doc/latex/etoc/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/etoc/README.md	2018-07-04 21:26:44 UTC (rev 48135)
+++ trunk/Master/texmf-dist/doc/latex/etoc/README.md	2018-07-04 21:27:36 UTC (rev 48136)
@@ -1,6 +1,6 @@
 <!-- -->
 
-    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
@@ -116,6 +116,14 @@
 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\]
 ---------------------
 

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etoc-DE.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/etoc/etoc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx	2018-07-04 21:26:44 UTC (rev 48135)
+++ trunk/Master/texmf-dist/source/latex/etoc/etoc.dtx	2018-07-04 21:27:36 UTC (rev 48136)
@@ -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 @@
 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,8 +10927,15 @@
 
 \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
    previous release.
@@ -11494,6 +11509,7 @@
 \newif\ifEtoc at notocifnotoc % 1.08e
 \def\etocnotocifnotoc {\Etoc at checksemptinesstrue\Etoc at notocifnotoctrue }
 \def\etoc@{\etoc@}
+\newif\ifEtoc at 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 @@
 % |\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 at lxyz #1#2{%
     \Etoc at global\let\etocthelink\@firstofone % fall-back, was let \@empty up to 1.08i (inc.)
@@ -12021,12 +12041,12 @@
     \futurelet\Etoc at getthepage@token
        \Etoc at getthepage #2\etoc@ % defines \etocthelinkedpage
     \futurelet\Etoc at getnb@token
-       \Etoc at getnb #1\relax\relax\etoc@  % sets number, name, and \etocthelink
+       \Etoc@@getnb #1\relax\relax\etoc@  % sets number, name, and \etocthelink
     \ifEtoc at number
     \else
      \ifnum\Etoc at level=\m at ne
        \futurelet\Etoc at getit@token
-          \Etoc at getit #1\hspace\relax\etoc@   % additional job for parts
+          \Etoc@@getit #1\hspace\relax\etoc@   % additional job for parts
      \fi
     \fi
     \Etoc at global\expandafter\let\csname etoclink \endcsname\etocthelink
@@ -12083,7 +12103,33 @@
 % 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 at bracednamefalse
+    \ifx\Etoc at getnb@token\bgroup
+        \expandafter\Etoc at getnb@checkifbraced
+    \else
+        \expandafter\Etoc at getnb
+    \fi
+}
+\def\Etoc at tworelax{\relax\relax}
+\def\Etoc at getnb@checkifbraced #1#2\etoc@ {%
+    \def\Etoc at tmp{#2}%
+    \ifx\Etoc at tmp\Etoc at tworelax
+        \expandafter\expandafter\expandafter\Etoc at getnb@nameisbraced
+        \expandafter\@firstofone
+    \else
+        \expandafter\Etoc at getnb
+    \fi {#1}#2\etoc@
+}
+\def\Etoc at getnb@nameisbraced {%
+    \Etoc at bracednametrue
+    \futurelet\Etoc at getnb@token\Etoc at getnb
+}
 \def\Etoc at getnb {%
     \ifx\Etoc at getnb@token\bgroup
        \expandafter\Etoc at getnb@nohyp at nonbr
@@ -12138,8 +12184,13 @@
     \Etoc at global\Etoc at numbertrue
     \Etoc at global\def\etocthenumber       {#2}%
     \Etoc at global\def\etocthelinkednumber {#2}%
-    \Etoc at global\def\etocthename         {#3}%
-    \Etoc at global\def\etocthelinkedname   {#3}%
+    \ifEtoc at bracedname
+        \Etoc at global\def\etocthename       {{#3}}%
+        \Etoc at global\def\etocthelinkedname {{#3}}%
+    \else
+        \Etoc at global\def\etocthename       {#3}%
+        \Etoc at global\def\etocthelinkedname {#3}%
+    \fi
 }
 \def\Etoc at getnb@nohyp at nonbr #1\etoc@ {%
     % \etocthename and \etocthelinkedname already defined in \Etoc at lxyz
@@ -12160,6 +12211,11 @@
 % 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 at bracedname| setting.
 %    \begin{macrocode}
 \def\Etoc at getnb@hyp #1#2#3#4#5#6\etoc@ {%
     \edef\Etoc at tmp {{#3}}%
@@ -12204,7 +12260,21 @@
 % |1.08| adds the |\Etoc at 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 at bracedname
+        \expandafter\expandafter\expandafter\Etoc at getit@nameisbraced
+        \expandafter\@firstofone
+    \else
+        \expandafter\Etoc at getit
+    \fi
+}
+\def\Etoc at getit@nameisbraced {\futurelet\Etoc at getit@token\Etoc at getit }
 \def\Etoc at getit {%
     \if1\ifEtoc at hyperref
         \ifx\hyper at linkstart\Etoc at getit@token1\else0\fi
@@ -12224,8 +12294,13 @@
     \fi
 }
 \def\Etoc at getit@nohyp at getname #1\hspace\relax\etoc@ {%
-    \Etoc at global\def\etocthename       {#1}%
-    \Etoc at global\def\etocthelinkedname {#1}%
+    \ifEtoc at bracedname
+        \Etoc at global\def\etocthename       {{#1}}%
+        \Etoc at global\def\etocthelinkedname {{#1}}%
+    \else
+        \Etoc at global\def\etocthename       {#1}%
+        \Etoc at global\def\etocthelinkedname {#1}%
+    \fi
 }
 %    \end{macrocode}
 % |1.07n| replaces use of |\toks@| by macro |\Etoc at tmp|. |1.08| adds
@@ -12239,7 +12314,12 @@
 % 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 at bracedname| status.
 %    \begin{macrocode}
 \def\Etoc at getit@hyp #1#2#3#4#5#6\etoc@ {%
     \edef\Etoc at tmp {{#3}}%
@@ -13753,7 +13833,7 @@
   Grave accent  \`     Left brace    \{     Vertical bar  \|
   Right brace   \}     Tilde         \~}
 
-\CheckSum{3375}%
+\CheckSum{3454}%
 
 \csname check at checksum\endcsname
 \Finale

Modified: trunk/Master/texmf-dist/source/latex/etoc/etoc.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/etoc/etoc.ins	2018-07-04 21:26:44 UTC (rev 48135)
+++ trunk/Master/texmf-dist/source/latex/etoc/etoc.ins	2018-07-04 21:27:36 UTC (rev 48136)
@@ -1,6 +1,6 @@
 %%
 %% 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>
@@ -8,9 +8,9 @@
 %%                         <Christine_Roemer at t-online dot de>
 %% and collaborators for the translation into German of the documentation
 %%
-\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)}
 %% Run etex on this file to extract from etoc.dtx:
 %%        etoc.sty, etoc.tex, etoc-DE.tex and README.md

Modified: trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty	2018-07-04 21:26:44 UTC (rev 48135)
+++ trunk/Master/texmf-dist/tex/latex/etoc/etoc.sty	2018-07-04 21:27:36 UTC (rev 48136)
@@ -23,10 +23,10 @@
 %%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{etoc}
- [2018/06/15 v1.08o Completely customisable TOCs (JFB)]
+ [2018/07/04 v1.08p Completely customisable TOCs (JFB)]
 %%
 %% 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>
@@ -72,6 +72,7 @@
 \newif\ifEtoc at notocifnotoc % 1.08e
 \def\etocnotocifnotoc {\Etoc at checksemptinesstrue\Etoc at notocifnotoctrue }
 \def\etoc@{\etoc@}
+\newif\ifEtoc at bracedname % 1.08p
 \newcounter{etoc at tocid}
 \newcounter{etoc at tocdepth}% 1.07g
 \@ifclassloaded{memoir}{\def\Etoc at minf{-\thr@@}}{\def\Etoc at minf{-\tw@}}
@@ -343,12 +344,12 @@
     \futurelet\Etoc at getthepage@token
        \Etoc at getthepage #2\etoc@ % defines \etocthelinkedpage
     \futurelet\Etoc at getnb@token
-       \Etoc at getnb #1\relax\relax\etoc@  % sets number, name, and \etocthelink
+       \Etoc@@getnb #1\relax\relax\etoc@  % sets number, name, and \etocthelink
     \ifEtoc at number
     \else
      \ifnum\Etoc at level=\m at ne
        \futurelet\Etoc at getit@token
-          \Etoc at getit #1\hspace\relax\etoc@   % additional job for parts
+          \Etoc@@getit #1\hspace\relax\etoc@   % additional job for parts
      \fi
     \fi
     \Etoc at global\expandafter\let\csname etoclink \endcsname\etocthelink
@@ -376,6 +377,28 @@
       {\expandafter\hyperlink \Etoc at tmp{#4}}%
     \Etoc at global\edef\etocthelink##1{\noexpand\hyperlink\Etoc at tmp{##1}}%
 }
+\def\Etoc@@getnb {%
+    \Etoc at bracednamefalse
+    \ifx\Etoc at getnb@token\bgroup
+        \expandafter\Etoc at getnb@checkifbraced
+    \else
+        \expandafter\Etoc at getnb
+    \fi
+}
+\def\Etoc at tworelax{\relax\relax}
+\def\Etoc at getnb@checkifbraced #1#2\etoc@ {%
+    \def\Etoc at tmp{#2}%
+    \ifx\Etoc at tmp\Etoc at tworelax
+        \expandafter\expandafter\expandafter\Etoc at getnb@nameisbraced
+        \expandafter\@firstofone
+    \else
+        \expandafter\Etoc at getnb
+    \fi {#1}#2\etoc@
+}
+\def\Etoc at getnb@nameisbraced {%
+    \Etoc at bracednametrue
+    \futurelet\Etoc at getnb@token\Etoc at getnb
+}
 \def\Etoc at getnb {%
     \ifx\Etoc at getnb@token\bgroup
        \expandafter\Etoc at getnb@nohyp at nonbr
@@ -407,8 +430,13 @@
     \Etoc at global\Etoc at numbertrue
     \Etoc at global\def\etocthenumber       {#2}%
     \Etoc at global\def\etocthelinkednumber {#2}%
-    \Etoc at global\def\etocthename         {#3}%
-    \Etoc at global\def\etocthelinkedname   {#3}%
+    \ifEtoc at bracedname
+        \Etoc at global\def\etocthename       {{#3}}%
+        \Etoc at global\def\etocthelinkedname {{#3}}%
+    \else
+        \Etoc at global\def\etocthename       {#3}%
+        \Etoc at global\def\etocthelinkedname {#3}%
+    \fi
 }
 \def\Etoc at getnb@nohyp at nonbr #1\etoc@ {%
     % \etocthename and \etocthelinkedname already defined in \Etoc at lxyz
@@ -455,6 +483,15 @@
                 \expandafter{\expandafter\hyperlink \Etoc at tmp{#3}}%
 }
 \let\Etoc at getnb@hyp at nonbr\Etoc at getnb@nohyp at nonbr
+\def\Etoc@@getit{%
+    \ifEtoc at bracedname
+        \expandafter\expandafter\expandafter\Etoc at getit@nameisbraced
+        \expandafter\@firstofone
+    \else
+        \expandafter\Etoc at getit
+    \fi
+}
+\def\Etoc at getit@nameisbraced {\futurelet\Etoc at getit@token\Etoc at getit }
 \def\Etoc at getit {%
     \if1\ifEtoc at hyperref
         \ifx\hyper at linkstart\Etoc at getit@token1\else0\fi
@@ -474,8 +511,13 @@
     \fi
 }
 \def\Etoc at getit@nohyp at getname #1\hspace\relax\etoc@ {%
-    \Etoc at global\def\etocthename       {#1}%
-    \Etoc at global\def\etocthelinkedname {#1}%
+    \ifEtoc at bracedname
+        \Etoc at global\def\etocthename       {{#1}}%
+        \Etoc at global\def\etocthelinkedname {{#1}}%
+    \else
+        \Etoc at global\def\etocthename       {#1}%
+        \Etoc at global\def\etocthelinkedname {#1}%
+    \fi
 }
 \def\Etoc at getit@hyp #1#2#3#4#5#6\etoc@ {%
     \edef\Etoc at tmp {{#3}}%



More information about the tex-live-commits mailing list