From 01ad29db02bf6feea44fbbe6cce1bb52c4dc4e93 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 23 Apr 2014 21:37:43 +0000 Subject: etoc (23apr14) git-svn-id: svn://tug.org/texlive/trunk@33644 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/etoc/etoc.dtx | 85 +++++++++++++++++++--------- Master/texmf-dist/source/latex/etoc/etoc.ins | 4 +- 2 files changed, 61 insertions(+), 28 deletions(-) (limited to 'Master/texmf-dist/source/latex/etoc') diff --git a/Master/texmf-dist/source/latex/etoc/etoc.dtx b/Master/texmf-dist/source/latex/etoc/etoc.dtx index e928932c634..5254557876c 100644 --- a/Master/texmf-dist/source/latex/etoc/etoc.dtx +++ b/Master/texmf-dist/source/latex/etoc/etoc.dtx @@ -1,14 +1,14 @@ % -*- coding: iso-latin-1; time-stamp-format: "%02d-%02m-%:y %02H:%02M:%02S %Z" -*- %<*none> -\def\doctimestamp {Time-stamp <07-03-2014 09:16:51 CET>} +\def\doctimestamp {Time-stamp <22-04-2014 21:52:47 CEST>} % %<*!package> -\def\jfbpkgname {etoc} \def\jfbpkgdate {2014/03/06} \def\jfbpkgversion {v1.07k} +\def\jfbpkgname {etoc} \def\jfbpkgdate {2014/04/22} \def\jfbpkgversion {v1.07l} \def\jfbpkgdescription {Completely customisable TOCs (jfB)} % %% %% Package: etoc -%% Version: 2014/03/06 v1.07k +%% Version: 2014/04/22 v1.07l %% Copyright (C) 2012-2013-2014 by Jean-Francois Burnol %% % This Work may be distributed and/or modified under the @@ -838,8 +838,7 @@ Next in ease of use, perhaps, is the method explained For this some knowledge of |\leftskip|, |\rightskip|, etc... is necessary. And a slight elaboration of this method, whose code is to be found in \autoref{ssec:tocwithdepthtags}, allows to mimick very well, if so desired, the -standard looks (but one would need to add to these line styles some suitably -chosen penalties to reduce the possibilities for bad page breaks in TOCs). +standard looks. As will be amply illustrated in this manual, \etoc is quite versatile (especially as it allows to re-define at any point in @@ -917,7 +916,9 @@ and \csa{etocpage} is called \csb{etocsetstyle}. It has five mandatory arguments. The first one is the name of the sectional unit: a priori known names are |book|, |part|, |chapter|, |section|, |subsection|, |subsubsection|, |paragraph|, and |subparagraph|, and any other name can be declared and assigned -to a (numeric) level via the \csb{etocsetlevel} command. +to a (numeric) level via the \csb{etocsetlevel} command.\footnote{under the + \texttt{memoir} class, \etoc knows \texttt{appendix} as a sectioning + name.} The four other arguments of \csb{etocsetstyle} specify: 1) \emph{what to do when this level is first encountered, down from a more general one,} then 2) \& 3) @@ -3076,14 +3077,18 @@ command with \csa{etocsetlevel}. For example: \etocsetlevel{atom}{2} \etocsetlevel{nucleus}{3} \end{verbatim} -Of course, in compatibility mode, it will be assumed here that the -macros |\l@cell|, |\l@molecule|, ..., pre-exist. If no table -of contents is typeset in compatibility mode, then all that -matters is that the line styles have been set. If for example -|section| is at level |1|, then there is no need to do a -\csa{etocsetstyle}|{molecule}| if \csa{etocsetstyle}|{section}| -has already been done (and it has been done by the package -itself in its definition of its own line styles). +In compatibility mode, it will be assumed that the macros |\l@cell|, +|\l@molecule|, ..., have been defined somewhere either by the user or a class: +doing only |\etocsetlevel| is not enough for the corresponding level to work +out-of-the-box in compatibility mode. + +However, if no table of contents is typeset in compatibility mode, then all that +matters is that the various line styles have been set. If, for example +|section| is at level |1|, then there is no need to do some +\csa{etocsetstyle}|{molecule}{..}{..}{..}{..}| after +\csa{etocsetlevel}|{molecule}{1}| if +\csa{etocsetstyle}|{section}{..}{..}{..}{..}| has already been done (and it has +been done by the package itself in its definition of its own line styles). The accepted levels run from |-2| to |6| inclusive. Anything else is mapped to |6|, which is a dummy level, never displayed. The package @@ -4638,12 +4643,12 @@ not possible. issued if otherwise. \end{framed} -Release |1.07k| has also improved the compatibility with the |memoir| -class: its |appendix| level has been made known to \etoc. It is at the -same level as |chapter|, thus the chapter -line style should possibly do a test for some boolean which may be -activated via an instruction added to the |.toc| file, if one needs to -distinguish the two kinds of divisions. +Release |1.07l| has also improved the compatibility with the |memoir| class: its +|appendix| level has been made known to \etoc. It is at the same level as +|chapter|, thus the chapter line style should possibly do a test for some user +defined boolean whose activation may be added to the |.toc| file at the suitable +location via |\addtocontents{toc}{..}|, if one needs to distinguish the two +kinds of divisions. The contents of the |.toc| file (if it already exists) are read into memory by \etoc once, at the time of \csa{usepackage\{etoc\}}. The |.toc| file remains @@ -4779,7 +4784,7 @@ with the time stamp \texttt{\dtxtimestamp}. The package version is \section{License, installation} \begin{verbatim} -% Copyright (C) 2012-2013 by Jean-Francois Burnol +% Copyright (C) 2012-2013-2014 by Jean-Francois Burnol % % This Work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -4868,6 +4873,15 @@ with the time stamp \texttt{\dtxtimestamp}. The package version is \begin{multicols}{2} \begin{jfverbatim} +v1.07l [2014/04/22] + + fixes a bug with the 1.07k compatibility layer with tocloft which had broken + the 1.07k (sic) compatibility with memoir (yes, memoir class 1.07k testing + had been done before adding the tocloft thing to the source code . . . ). + Also, etoc when detecting tocvsec2 now checks if this is under the memoir + class, as then nothing special needs to be done to rescue \tableofcontents, + contrarily to the situation with the native tocvsec2. + v1.07k [2014/03/06] compatibility with package tocloft; and improved compatibility with @@ -6390,6 +6404,10 @@ v1.02 [2012/11/18] %|1.07k (2014/03/06)| adds the compatibility with the |tocloft| package; in % compatibility mode etoc will obey the |tocloft| customisation for the division % headings as well as for the toc title. +% +%|1.07l (2014/04/02)| fixes the bug from the |tocloft| compatibility layer which +%was |memoir| incompatible: |memoir| has its version of |tocloft| which doesn't +%have the |\if@cftnctoc| boolean. % \begin{macrocode} \def\etoctocloftstyle {% \etocsettocstyle @@ -6398,7 +6416,8 @@ v1.02 [2012/11/18] \if@cfttocbibind\@cftdobibtoc\fi }% {\endgroup\@cfttocfinish }% } -\@ifpackageloaded{tocloft} +\@ifclassloaded{memoir}{} +{\@ifpackageloaded{tocloft} {\if@cftnctoc\else \renewcommand*\etocstandarddisplaystyle{\etoctocloftstyle} \AtBeginDocument{\let\tableofcontents\etoctableofcontents} @@ -6416,7 +6435,8 @@ v1.02 [2012/11/18] \@cftnctoctrue }% {}% }% - } + }% +} % \end{macrocode} % placeholder for comments % \begin{macrocode} @@ -6511,14 +6531,26 @@ v1.02 [2012/11/18] {\@namedef{Etoc@depthof@#1}{\@nameuse{Etoc@#2@@}}}% } % \end{macrocode} -% We must cancel all |tocvsec2| toc-related actions. +% We must cancel all |tocvsec2| toc-related actions. But a check must be done +% for the memoir class, as its |tocvsec2| emulation does not have the +% incompatible things etoc needs to revert. This extra check added with etoc +% |1.07l|. % \begin{macrocode} \def\Etoc@tocvsec@err #1{\PackageError {etoc} {the command \protect#1\space is incompatible with etoc} {use \protect\etocsettocdepth.toc as replacement (check the manual)}% }% \AtBeginDocument {% - \@ifpackageloaded {tocvsec2} + \@ifclassloaded{memoir} + {\PackageWarning{etoc}{You may consider using \protect\etocsettocdepth.toc + as a drop-in^^J + replacement to the memoir own \protect\settocdepth\space + if you wish to exploit etoc to its^^J + fullest. Similarly consider using + \protect\etocsettocdepth\space and + \protect\etocsetnexttocdepth^^J rather + than memoir's \protect\maxtocdepth.}} + {\@ifpackageloaded {tocvsec2} {\def\maxtocdepth #1{\Etoc@tocvsec@err \maxtocdepth }% \def\settocdepth #1{\Etoc@tocvsec@err \settocdepth }% \def\resettocdepth {\@ifstar {\Etoc@tocvsec@err \resettocdepth }% @@ -6533,6 +6565,7 @@ v1.02 [2012/11/18] \protect\tableofcontents\space reverted. Use \protect\etocsettocdepth.toc as a replacement^^J for the tocvsec2 toc-related commands}}{}% + }% }% % \end{macrocode} % |1.07g| @@ -6587,7 +6620,7 @@ v1.02 [2012/11/18] Grave accent \` Left brace \{ Vertical bar \| Right brace \} Tilde \~} -\CheckSum{2953} +\CheckSum{2968} \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 074957c4e54..2bb03fbf323 100644 --- a/Master/texmf-dist/source/latex/etoc/etoc.ins +++ b/Master/texmf-dist/source/latex/etoc/etoc.ins @@ -1,8 +1,8 @@ -\def\jfbpkgname {etoc} \def\jfbpkgdate {2014/03/06} \def\jfbpkgversion {v1.07k} +\def\jfbpkgname {etoc} \def\jfbpkgdate {2014/04/22} \def\jfbpkgversion {v1.07l} \def\jfbpkgdescription {Completely customisable TOCs (jfB)} %% %% Package: etoc -%% Version: 2014/03/06 v1.07k +%% Version: 2014/04/22 v1.07l %% Copyright (C) 2012-2013-2014 by Jean-Francois Burnol %% %% Run tex on this file to extract etoc.sty and etoc.tex from etoc.dtx -- cgit v1.2.3