diff options
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/etoc/etoc.dtx | 337 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/etoc/etoc.ins | 12 |
2 files changed, 209 insertions, 140 deletions
diff --git a/Master/texmf-dist/source/latex/etoc/etoc.dtx b/Master/texmf-dist/source/latex/etoc/etoc.dtx index c5f7051eac6..1ad9f8b888d 100644 --- a/Master/texmf-dist/source/latex/etoc/etoc.dtx +++ b/Master/texmf-dist/source/latex/etoc/etoc.dtx @@ -2,29 +2,29 @@ % 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: <29-09-2016 at 11:13:23 CEST>}% +\def\etocdtxtimestamp {Time-stamp: <21-09-2017 at 19:38:23 CEST>}% %</none> %<*!readme> %% %% 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 %% %</!readme> %<*insfile> -\def\etocpkgdate {2016/09/29} -\def\etocdocdate {2016/09/29} -\def\etocpkgversion {v1.08i} +\def\etocpkgdate {2017/09/21} +\def\etocdocdate {2017/09/21} +\def\etocpkgversion {v1.08j} \def\etocpkgdescription {Completely customisable TOCs (JFB)} %</insfile> %<*none> -\def\etocDEpkgdate {29.09.2016} -\def\etocDEdocdate {29.09.2016} +\def\etocDEpkgdate {21.09.2017} +\def\etocDEdocdate {21.09.2017} \def\etocDEDEdocdate {09.04.2015}% \def\etocDEDEpkgversion {v1.08d}% % Definition of \etocLicense @@ -35,10 +35,10 @@ \catcode32=13\catcode`\\=12^^Brelax^^A ^^Bfirstofone{^^Bendgroup^^Bdef^^BetocLicense^^A {% 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 <jfbu at free dot fr> -% Copyright (C) 2014-2016 Christine Roemer <Christine_Roemer at t-online dot de> +% Copyright (C) 2012-2017 Jean-Francois Burnol <jfbu at free dot fr> +% Copyright (C) 2014-2017 Christine Roemer <Christine_Roemer at t-online dot de> % and collaborators for the translation into German of the documentation % % This Work may be distributed and/or modified under the @@ -69,13 +69,13 @@ %<*readme> <!-- --> - Source: etoc.dtx (v1.08i-2016/09/29) + Source: etoc.dtx (v1.08j-2017/09/21) Author: Jean-Francois Burnol Author: Christine Roemer et al. (German tranlation) Info: Completely customisable TOCs License: LPPL 1.3c - Copyright (C) 2012-2016 Jean-Francois Burnol. - Copyright (C) 2014-2016 Christine Roemer and collaborators for + Copyright (C) 2012-2017 Jean-Francois Burnol. + Copyright (C) 2014-2017 Christine Roemer and collaborators for the translation into German of the documentation. <jfbu at free dot fr> <Christine_Roemer at t-online dot de> @@ -185,6 +185,28 @@ etoc.pdf, etoc-DE.pdf, etoc.dvi, etoc-DE.dvi. RECENT CHANGES ============== +v1.08j \[2017/09/21\] +--------------------- + +Since `1.08a-2015/03/13` `\etocname`, `\etocnumber`, `\etocpage` +contain, if hyperref is present and configured for using +hyperlinks in the TOC, the link destination in already expanded +form. This means one can use them even if the style closes a +group (for example from a `&` in a tabular), if `\etocglobaldefs` +was issued; also one can save their meaning for delayed usage +(with for example `\LetLtxMacro` as they are robust). + +But for some legacy reason `\etoclink`, contrarily to +`\etocthelink`, was handled differently. Now, `\etoclink` also +contains the link destination in already expanded form, and can +thus be used even if the line style issues a `&`, as long as +`\etocglobaldefs` is issued. + +Also, bugs dating back to the early days of the package, but +surfacing only under relatively rare conditions such as usage +of hyperref with its option "linktoc=page" got fixed. + + v1.08i \[2016/09/29\] --------------------- @@ -229,52 +251,10 @@ section with the (approximate) translation into etoc lingua of the book class toc style, for easy customizability. -v1.08g \[2015/08/29\] ---------------------- - -Downgraded to a mere info message the etoc-issued warning -(relative to `\settocdepth/\maxtocdepth`) under class `memoir`. - - -v1.08f \[2015/04/28\] ---------------------- - -Minor changes to the documentation. `\etocsetlevel` more economical. - -v1.08e \[2015/04/17\] ---------------------- - -The command `\etocchecksemptiness` tells etoc to not print, from -that point on, the headings of the local tables of contents if -they have empty contents. This is mainly for class authors who -might want to have their `\section` or `\chapter` automatically do -a `\localtableofcontents`. Could prove also useful for batch -conversions of documents. Thanks to Paul Gaborit who asked for -such a feature. - -The command `\etocnotocifnotoc` extends this behaviour to global -TOCs: indeed why should documents with no sectioning units take -this as an excuse not to use package etoc ? - -The command `\etocifwasempty{yes}{no}` can be used for -suitable extra action. - -A `\tableofcontents\ref{foo}` now expects foo to be a label to a -_local_ TOC. The use with foo a label to a _global_ TOC is not -supported anymore as it had no utility and made the code more -complex. - -The syntax `\localtableofcontents\ref{foo}` is now accepted as a -synonym to the earlier syntax `\tableofcontents\ref{foo}`. - -v1.08d \[2015/04/09\] ---------------------- - -Translation into German of the additions made to the documentation -for the 1.08x series of releases. +The latest translation into German of the additions made to the +documentation dates back to v1.08d \[2015/04/09\]. Thanks to Christine Römer! - %</readme> %<*tex>------------------------------------------------------------------------- %% run pdflatex thrice on this file etoc.tex to produce the documentation @@ -1298,7 +1278,7 @@ etoc-framed-mp-hook % 39 hard coded mais je pourrais aussi le calculer % pour version rectangulaire, par tâtonnements: level 2/.append style={level width=21cm,level height=30cm, sibling - distance=2.37cm},% was 2.57cm + distance=2.31cm},% je passe à 2.29cm par tatons après ajout section 1.09j ] \the\treetok \end{tikzpicture}}\endgroup } @@ -2197,6 +2177,7 @@ environment or group where they are used. \subsection{The \csbhyp{etocchecksemptiness} command} \label{etocchecksemptiness} +\label{etocdoesnotcheckemptiness} The user needs to issue \csb{etocchecksemptiness} to tell \etoc to check whether local tables of contents are empty and in case of emptiness to print nothing @@ -2214,9 +2195,8 @@ command; and the test for emptiness itself executes everything else found in the |.toc| file. See \autoref{sec:addingtotoc} in this context. \begin{enumerate} \item the \csb{etocifwasempty} command discussed below can be used from inside -\csb{etocaftertochook}. -\item there is no \csa{etocdoesnotcheckemptiness} but if there was one -it would do |\makeatletter\Etoc@checksemptinessfalse\makeatother|. +\csb{etocaftertochook}, and even from inside \csb{etocbeforetitlehook}. +\item there is also \csa{etocdoesnotcheckemptiness} (since |1.08i|.) \end{enumerate} The suppression of the heading (more precisely of the toc display style @@ -4348,7 +4328,6 @@ example one may wish to use the unit or page number in some kind of numeric context, or change its formatting. This is provided by \csb{etocthename}, \csb{etocthenumber}, and \csb{etocthepage}. - These commands are not protected, so in moving argument contexts (for example in a label specification) they should be preceded by |\protect|. @@ -4370,7 +4349,9 @@ its option \emph{linktoc=all}) then \etoc's \csa{etocpage} contains no link either, but |\etoclink{\etocthepage}| does. -The command \csa{etoclink} is robust. +The command \csa{etoclink} is robust. Since |etoc 1.08j| it contains the link +destination in an already expanded form, so for example can be used even after +a |&| in a tabular construction, if \csb{etocglobaldefs} was issued. \subsection{The \csbhyp{etocthelinkedname}, \csbhyp{etocthelinkednumber}, \csbhyp{etocthelinkedpage} and \csbhyp{etocthelink} commands} @@ -4380,32 +4361,22 @@ The command \csa{etoclink} is robust. \label{etocthelink} -This is for advanced uses by advanced users. -The \csa{etocthename} macro has -been mentioned before; using it in instructions such as -|\global\let\lastone\etocthename| in an \etoc line style will -define the macro |\lastone| to expand to the last name seen at the -corresponding level. - -% But no facilities was previously available to -% do the same with the link data. +These macros are fragile and contain the link destination in already expanded +form. So their meaning can be stored for delayed usage. For example this is +done here when doing the \hyperref[tocastree]{examples with trees}. -The package provides since |1.07f 2013/03/07| \csa{etocthelinkedname} to do -the similar thing, with the link data included. It was used in this -documentation when doing the \hyperref[tocastree]{examples with trees}. +Notice though that for example \csa{etocthelinkednumber} is really a link only +if |hyperref| was configured to let the numbered heading be linked (which is +the default). Similarly for the others. -Also provided with the similar goal: \csa{etocthelinkednumber}, -\csa{etocthelinkedpage} (which contains a link only if |hyperref| -added one to the page number) and \csa{etocthelink}\marg{linkname} -which allows to make a link with an arbitrary name. +\csa{etocthelink} will fetch the link destination if available from name or +page number and allows via |\etocthelink{foo}| to link an arbitrary text to +the same destination inside the produced PDF. -All these commands are fragile. - -% je supprime car suggère qu'avant pas robuste, ce qui n'est pas ce que je -% voulais dire. - -% In fact starting with |1.08a|, \csa{etocname} -% is exactly the robust variant of \csa{etocthelinkedname}. +All these commands are fragile. The \csb{etocname}, \csb{etocnumber}, +\csb{etocpage} and \csb{etoclink} are simply their robust variants. They too +contain the hyperlink destination in already expanded form since |1.08a| for +the first three, since |1.08j| for \csb{etoclink}. Obsolete example of \begingroup \etocsetstyle {section} @@ -4442,7 +4413,7 @@ Obsolete example of \begingroup \etoc |1.08a| offers a simpler way to the same result: thanks to \csb{etocglobaldefs} there is no need -anymore here for \csa{etocthelinkedname}, \csa{etocname} works. +anymore here for \csa{etocthelinkedname}, as \csa{etocname} works. \begin{verbatim} Example of \begingroup\etocglobaldefs % <-- NEW mit etoc 1.08. @@ -5351,6 +5322,19 @@ use or not colors is left to the user. %\section{... and tricks} +\section{A known issue with \csbhyp{localtableofcontents}} + +The macro \csa{localtableofcontents} will be dysfunctional after a sectioning +unit which \emph{does not make its way to the \texttt{.toc} file}: typically +after a non-numbered section for example. The non-numbered section must be +added to the \texttt{.toc} file via an \csa{addcontentsline}. Else, \etoc will +construct a local TOC according to the last sectioning unit added to the +\texttt{.toc} file. For example if this is a sub-section, then \etoc will think +it must create a local TOC corresponding to a sub-section. + +This may be qualified a bug, perhaps a future version will fix +this. If no one complains it might stay that way. + \section{Hacking framed parboxes} @@ -6014,7 +5998,7 @@ version is \texttt{\etocpkgversion}, of \texttt{\etocpkgdate}. level 1 concept/.append style={font=\Large, text width = 3cm}, % geändert 2015/11/12 20cm->21cm level 2/.append style={level width=21cm,level height=30cm, sibling - distance=2.37cm},% 2.57cm + distance=2.31cm},% ] \the\treetok \end{tikzpicture}}\endgroup } @@ -9052,7 +9036,13 @@ einem Link zu versehen (mittels seiner Option \emph{linktoc=all}), dann hat \etoc's \csa{etocpage} auch keinen Link, |\etoclink{\etocthepage}| allerdings schon. -Der Befehl \csa{etoclink} ist robust. +Der Befehl \csa{etoclink} ist robust. + +\begin{otherlanguage}{english} + Since |etoc 1.08j| it contains the link destination in an already expanded + form, so for example can be used even after a |&| in a tabular construction, + if \csb{etocglobaldefs} was issued. +\end{otherlanguage} \subsection{Die Befehle \csbhyp{etocthelinkedname}, \csbhyp{etocthelinkednumber}, \csbhyp{etocthelinkedpage} und \csbhyp{etocthelink}} @@ -9061,29 +9051,41 @@ Der Befehl \csa{etoclink} ist robust. \label{etocthelinkedpage} \label{etocthelink} -Das Folgende ist für fortgeschrittene Anwendungen von fortgeschrittenen -Benutzern. Das \csa{etocthename}-Makro wurde bereits schon einmal erwähnt; -verwendet man es in Anweisungen wie |\global\let\lastone\etocthename| in einem -\etoc line"=Stil, definiert das Macro |\lastone| so, dass es sich ausbreitet bis -zum letzten Namen auf dem korrespondieren Level. - -% Jedoch bestand bisher keine -% Möglichkeit, dass Gleiche auch für die Link"=Daten zu tun. +% Das Folgende ist für fortgeschrittene Anwendungen von fortgeschrittenen +% Benutzern. Das \csa{etocthename}-Makro wurde bereits schon einmal erwähnt; +% verwendet man es in Anweisungen wie |\global\let\lastone\etocthename| in einem +% \etoc line"=Stil, definiert das Macro |\lastone| so, dass es sich ausbreitet bis +% zum letzten Namen auf dem korrespondieren Level. -Das in diesem Paket enthaltene \csa{etocthelinkedname} stellt dies nun zur -Verfügung, inklusive der Link"=Daten. Es wurde in dieser Dokumentation benutzt -bei Erstellung der \hyperref[tocastree]{Beispiele mit Bäumen}. +% Das in diesem Paket enthaltene \csa{etocthelinkedname} stellt dies nun zur +% Verfügung, inklusive der Link"=Daten. Es wurde in dieser Dokumentation benutzt +% bei Erstellung der \hyperref[tocastree]{Beispiele mit Bäumen}. -Ebenfalls bereit gestellt mit ähnlichen Funktionen: \csa{etocthelinkednumber}, -\csa{etocthelinkedpage} (welches nur einen Link enthält, wenn |hyperref| einen -zu dieser Seitenzahl hinzugefügt hat) und \csa{etocthelink}\marg{linkname}, -welches es erlaubt einen Link mit einem beliebigen Name zu erstellen. +% Ebenfalls bereit gestellt mit ähnlichen Funktionen: \csa{etocthelinkednumber}, +% \csa{etocthelinkedpage} (welches nur einen Link enthält, wenn |hyperref| einen +% zu dieser Seitenzahl hinzugefügt hat) und \csa{etocthelink}\marg{linkname}, +% welches es erlaubt einen Link mit einem beliebigen Name zu erstellen. -All diese Befehle sind \emph{nicht} robust. +% All diese Befehle sind \emph{nicht} robust. -% In der Tat wurde mit -% |1.08a| \csa{etocname} als robuste Variante von -% \csa{etocthelinkedname} gestartet. +\begin{otherlanguage}{english} + These macros are fragile and contain the link destination in already + expanded form. So their meaning can be stored for delayed usage. For example + this is done here when doing the \hyperref[tocastree]{examples with trees}. + + Notice though that for example \csa{etocthelinkednumber} is really a link + only if |hyperref| was configured to let the numbered heading be linked + (which is the default). Similarly for the others. + + \csa{etocthelink} will fetch the link destination if available from name or + page number and allows via |\etocthelink{foo}| to link an arbitrary text to + the same destination inside the produced PDF. + + The \csb{etocname}, \csb{etocnumber}, \csb{etocpage} and \csb{etoclink} are + simply their robust variants. They too contain the hyperlink destination in + already expanded form since |1.08a| for the first three, since |1.08j| for + \csb{etoclink}. +\end{otherlanguage} Veralteter Beispiel\begingroup\ \etocsetstyle {section} @@ -10009,6 +10011,22 @@ Farben nutzen will oder nicht. %\section{\ldots\ und Tricks} +\section{A known issue with \csbhyp{localtableofcontents}} + +\begin{otherlanguage}{english} + The macro \csa{localtableofcontents} will be dysfunctional after a + sectioning unit which \emph{does not make its way to the \texttt{.toc} + file}: typically after a non-numbered section for example. The + non-numbered section must be added to the \texttt{.toc} file via an + \csa{addcontentsline}. Else, \etoc will construct a local TOC according to + the last sectioning unit added to the \texttt{.toc} file. For example if + this is a sub-section, then \etoc will think it must create a local TOC + corresponding to a sub-section. + + This may be qualified a bug, perhaps a future version will fix this. If + no one complains it might stay that way. +\end{otherlanguage} + \section{Hacken "`framed parboxes"'} @@ -10671,7 +10689,27 @@ Dokumentation erzeugt von der Quelldatei mit dem Stempel \begin{multicols}{2} \begin{jfverbatim} -v1.08i [2016/09/29]^ +v1.08j [2017/09/21]^ + + Since 1.08a-2015/03/13 \etocname, \etocnumber, \etocpage + contain, if hyperref is present and configured for using + hyperlinks in the TOC, the link destination in already expanded + form. This means one can use them even if the style closes a + group (for example from a & in a tabular), if \etocglobaldefs + was issued; also one can save their meaning for delayed usage + (with for example \LetLtxMacro as they are robust). + + But for some legacy reason \etoclink, contrarily to + \etocthelink, was handled differently. Now, \etoclink also + contains the link destination in already expanded form, and can + thus be used even if the line style issues a &, as long as + \etocglobaldefs is issued. + + Also, bugs dating back to the early days of the package, but + surfacing only under relatively rare conditions such as usage + of hyperref with its option "linktoc=page" got fixed. + +~v1.08i [2016/09/29]^ This fixes an issue dating back to 1.08e-2015/04/17: under \etocchecksemptiness regime, some circumstances (such as @@ -11456,7 +11494,7 @@ v1.08i [2016/09/29]^ % file under some special context with flag |\ifEtoc@stoptoc| artificially set % to true. If |\Etoc@localtop| had not been initialized an undefined control % sequence error would occur. Furthermore as |\ifEtoc@notactive| was also set -% to true, the case of no error lead then to unneededly expand|\Etoc@setflags| +% to true, the case of no error leads then to unneededly expand |\Etoc@setflags| % code slowing down compilation. % % Also |1.08i| splits the macro into two, with accompanying slight @@ -11598,6 +11636,8 @@ v1.08i [2016/09/29]^ \Etoc@et@hop{\Etoc@prefix\Etoc@contents}{\Etoc@savedcontentsline{#1}}% } % \end{macrocode} +% START OF MAINLY OBSOLETE COMMENTS +% % |2013/03/07|: up to |1.06| \etoc defined only \csa{etocname}, \csa{etocnumber} and % \csa{etocpage}. The |hyperref| added data is recycled in the simplest % manner, prefixing it with \csa{leavevmode}. The included @@ -11627,6 +11667,8 @@ v1.08i [2016/09/29]^ % token in the paramaters. For \csa{Etoc@again} (which appears later in the % code), a \csa{@firstofone} construct is however the simplest of all. % +% END OF MAINLY OBSOLETE COMMENTS +% % |1.08| adds |\Etoc@global| prefix (|2015/03/09|). % % |1.08a| drops the original constructions of |\etocname| etc... The obvious @@ -11637,30 +11679,39 @@ v1.08i [2016/09/29]^ % versions contained the hyperref destination only in unexpanded form, this % forced to use \csa{etocthelinkedname}, etc... in cases when the thing had to % be stored for delayed use. Now the user can do this directly with -% \csa{etocname}, \csa{etocnumber}, \csa{etocpage}. +% \csa{etocname}, \csa{etocnumber}, \csa{etocpage} (taking into account though +% that these are robust macros, thus perhaps using something like |\LetLtxMacro|.) +% +% |1.08j| turns |\etoclink| into the robust version of |\etocthelink|. Indeed +% so far only \csa{etocthelink} contained |\Hy@tocdestname| expanded. But +% \csa{etoclink} did not, and thus it could not be used after a group was +% closed for example by a |&| from the sectioning style, even if having used +% |\etocglobaldefs|. % \begin{macrocode} \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 } % \end{macrocode} % |1.08| adds the |\Etoc@global|'s. +% +% |1.08j| fixes old |\ifx #1\hyperlink@start| bug. % \begin{macrocode} \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% @@ -11680,44 +11731,53 @@ v1.08i [2016/09/29]^ % |\contentsline|. % % |1.08| adds the |\Etoc@global|'s. +% +% |1.08j| does not define \csa{etoclink<space>} anymore, only \csa{etocthelink} +% which contains the |\Hy@tocdestname| already expanded. % \begin{macrocode} \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}}% } -% +% \end{macrocode} +% |1.08j| fixes an old buggy |\ifx #1\hyper@linkstart|. This could show if +% hyperref was present with |linktoc=page| option for example, because in that +% case |#1| could be braced tokens. As this is rare condition, it had not been +% reported so far by my single user user-base. +% \begin{macrocode} \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% } % \end{macrocode} % |1.08| adds the |\Etoc@global|'s. +% +% |1.08j| corrects an old |\ifx#1\numberline| into |\ifx\numberline#1|. % \begin{macrocode} \def\Etoc@getnb@nohyp #1#2#3\etoc@ {% \def\Etoc@getname ##1\relax\relax\etoc@ {% \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 @@ -11726,6 +11786,8 @@ v1.08i [2016/09/29]^ % \end{macrocode} % |1.07n| replaces use of |\toks@| by macro |\Etoc@tmp|. |1.08| adds % the |\Etoc@global|'s. +% +% |1.08j| corrects the old |\ifx#1\numberline| into |\ifx\numberline#1|. % \begin{macrocode} \def\Etoc@getnb@hyp #1#2#3#4#5#6\etoc@ {% \def\Etoc@getname ##1\relax\relax\etoc@ {% @@ -11735,7 +11797,7 @@ v1.08i [2016/09/29]^ {\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 @@ -11752,7 +11814,6 @@ v1.08i [2016/09/29]^ \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@ } @@ -11774,25 +11835,33 @@ v1.08i [2016/09/29]^ % \end{macrocode} % |1.07n| replaces use of |\toks@| by macro |\Etoc@tmp|. |1.08| adds % the |\Etoc@global|'s. +% +% |1.08j| adds \csa{etocthelink} definition here which was missing. This bug +% showed in case hyperref was used with option |linktoc=page|, for |part| +% styles: the |\etocthelink| would not create a link if used therein. But the +% |linktoc=page| condition could easily however trigger the more serious +% |\ifx| bug in |\Etoc@getnb| also fixed at |1.08j|, and this would have +% overshadowed this one by a real compilation error rather than a missing link +% in the procuced PDF. % \begin{macrocode} \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}}% } % \end{macrocode} % |1.08a| of |2015/03/12| does the long-postponed thing to let |\etocname| @@ -11804,11 +11873,11 @@ v1.08i [2016/09/29]^ \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 @@ -13188,7 +13257,7 @@ v1.08i [2016/09/29]^ Grave accent \` Left brace \{ Vertical bar \| Right brace \} Tilde \~} -\CheckSum{3200}% 2^7 times 5^2 not bad. +\CheckSum{3210}% \csname check@checksum\endcsname \Finale diff --git a/Master/texmf-dist/source/latex/etoc/etoc.ins b/Master/texmf-dist/source/latex/etoc/etoc.ins index 21ed4cde006..6029771ba6b 100644 --- a/Master/texmf-dist/source/latex/etoc/etoc.ins +++ b/Master/texmf-dist/source/latex/etoc/etoc.ins @@ -1,16 +1,16 @@ %% %% 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 %% -\def\etocpkgdate {2016/09/29} -\def\etocdocdate {2016/09/29} -\def\etocpkgversion {v1.08i} +\def\etocpkgdate {2017/09/21} +\def\etocdocdate {2017/09/21} +\def\etocpkgversion {v1.08j} \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 |