summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-11-25 01:59:01 +0000
committerKarl Berry <karl@freefriends.org>2012-11-25 01:59:01 +0000
commitfeee7474e37064940217473cadf1ec3497cfc513 (patch)
treee0c725bfae4b06ecc8b8c4800a2317fcc2edec3a
parent6270a65bba8ebd2647c1e34ce161665c1d59cbb9 (diff)
etoc (24nov12)
git-svn-id: svn://tug.org/texlive/trunk@28354 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/etoc/README4
-rw-r--r--Master/texmf-dist/doc/latex/etoc/etoc.pdfbin137251 -> 138366 bytes
-rw-r--r--Master/texmf-dist/source/latex/etoc/etoc.dtx289
-rw-r--r--Master/texmf-dist/source/latex/etoc/etoc.ins4
-rw-r--r--Master/texmf-dist/tex/latex/etoc/etoc.sty117
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds34
6 files changed, 251 insertions, 197 deletions
diff --git a/Master/texmf-dist/doc/latex/etoc/README b/Master/texmf-dist/doc/latex/etoc/README
index fee85763522..a56154e7c48 100644
--- a/Master/texmf-dist/doc/latex/etoc/README
+++ b/Master/texmf-dist/doc/latex/etoc/README
@@ -1,5 +1,5 @@
- Package `etoc' (v1.03, 2012/11/23)
+ Package `etoc' (v1.04, 2012/11/24)
Copyright (C) 2012 by Jean-Francois Burnol
The source file etoc.dtx and its derived files may be
@@ -24,7 +24,7 @@
The other generated files may be discarded.
- Abstract
+ Abstract
The etoc package gives to the user complete control on how the
entries of the table of contents should be constituted from the
diff --git a/Master/texmf-dist/doc/latex/etoc/etoc.pdf b/Master/texmf-dist/doc/latex/etoc/etoc.pdf
index 41eebbb1624..60aac325ff7 100644
--- a/Master/texmf-dist/doc/latex/etoc/etoc.pdf
+++ b/Master/texmf-dist/doc/latex/etoc/etoc.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/etoc/etoc.dtx b/Master/texmf-dist/source/latex/etoc/etoc.dtx
index c2484aa3c1c..b0a82569847 100644
--- a/Master/texmf-dist/source/latex/etoc/etoc.dtx
+++ b/Master/texmf-dist/source/latex/etoc/etoc.dtx
@@ -3,13 +3,13 @@
%% Copyright (C) 2012 by Jean-Francois Burnol
%<*ins>
\def\pkgname{etoc}
-\def\pkgdate{2012/11/23}
-\def\pkgversion{v1.03}
+\def\pkgdate{2012/11/24}
+\def\pkgversion{v1.04}
\def\pkgdescription{easily customizable TOCs (jfB)}
%</ins>
%<*none>
-\def\lasttimestamp{Time-stamp: <23-11-2012 12:02:17 CET jfb>}
-\def\docdate{2012/11/23}
+\def\lasttimestamp{Time-stamp: <24-11-2012 14:47:14 CET jfb>}
+\def\docdate{2012/11/24}
\def\striptimestamp#1 <#2 #3 #4 #5>{#2 at #3 #4}
\edef\dtxtimestamp{\expandafter\striptimestamp\lasttimestamp}
\ProvidesFile{\pkgname.dtx}
@@ -113,7 +113,8 @@ pdfkeywords={LaTeX, table of contents},%
pdfstartview=FitH,%
pdfpagemode=UseOutlines}
-% \makeatletter % for use when \usepackage{hyperref} is commented out
+% for use when \usepackage{hyperref} is commented out
+% \makeatletter
% \let\texorpdfstring\@firstoftwo
% \def\hyperref[#1]#2{{#2}}
% \def\href#1#2{{#2}}
@@ -180,7 +181,7 @@ etoc-skip-first-pre-fix etoc-ref}
a starred variant which gives local table of contents.
\end{abstract}
-\tableofcontents
+\tableofcontents \label{toc:main}
\part{Although this is a short document, we are going to use
@@ -286,7 +287,7 @@ anchor if package |hyperref| is loaded) one just uses the
\cs{label} command as usual.
For example:\\
\hbox to \linewidth{\hss
- \tocstarb\space\csbi{label}\csbi{\string{my\_nice\_toc\string}}\hss}
+ \tocstarb\space\csbi{label\string{my\_nice\_toc\string}}\hss}
Then, elsewhere in the document, doing:\\
\hbox to \linewidth{\hss \tocb\space\csbi{ref\string{my\_nice\_toc\string}}\hss}
@@ -297,32 +298,36 @@ the table of contents of Part \ref{part:custom}:
\begingroup
+
\etocstandardlines
-\renewcommand{\etoctoprule}{\hrule height 0pt}
-\etocruled[1]{\framebox[\linewidth]{\etocfontminusone I am from
- \hyperref[toc:c]{far away}}}
+\renewcommand{\etocbkgcolorcmd}{\color{green!5}}
+\fboxsep1ex
+
+\etocframed[1]{\fbox{\makebox[.5\linewidth]{\etocfontminusone I am from
+ \hyperref[toc:c]{far away}}}}
\label{toc:d}
\ref{toc:c}
+
\endgroup
We actually did something like:\\
\hbox to \linewidth{\hss
- \toc\space\cs{label}|{toc:1}|\cs{ref}|{toc:2}|\hss} Hence
+ \toc\space\cs{label}|{toc:d}|\cs{ref}|{toc:c}|\hss} Hence
\hyperref[toc:d]{\color{green!50!blue!50}the present location}
-can itself now be referred to via |\ref{toc:1}|: this gives
+can itself now be referred to via |\ref{toc:d}|: this gives
the number of this TOC (\emph{i.e}
{\color{green!50!blue!50}\ref{toc:d}}) in the sequence of
document TOCs, will be a link if package |hyperref| is used,
-and can be used elsewhere as \toc|\ref{toc:1}| (which is now
-equivalent to \toc|\ref{toc:2}|).
+and can be used elsewhere as \toc|\ref{toc:d}| (which now has
+exactly the same effect as \toc|\ref{toc:c}|).
-For info, the \hyperref[toc:c]{\color{green!50!blue!50}distant toc}
+For info, the \hyperref[toc:c]{\color{green!50!blue!50}toc with label |toc:c|}
is the one which has number {\color{green!50!blue!50}\ref{toc:c}}...
The \cs{label} command should come before the reference via
\cs{ref} to the other TOC. A \cs{label} detected by \etoc
immediately (skipping spaces) after the command \toc will be
-activated immediately after the update to the toc counter. A
+activated right after the update to the toc counter. A
\cs{label} after the \cs{ref} will not be treated by \etoc
itself and will refer to the latest reference point (possibly
to some counter updated in the title of the TOC or, although
@@ -345,16 +350,7 @@ command:
\begin{verbatim}
\tableofcontents \ref{toc:partone}
\end{verbatim}
-As explained above we could also add a label to refer to this
-table of contents. The actual design is not pre-built in
-\etoc: it combines the \etoc `framed' style (with a dummy
-empty title, the actual title having been put inside the frame
-as part of the \marg{start} code of the section `line
-style'). The frame borders have been set to have the same
-color as the one which serves as background for the entire
-thing. This design (with other colors) is used also for
-\hyperref[toc:clone]{\color{green!50!blue!50}this other toc} (the coding
-used is reproduced there).
+\clearpage
\setcounter{tocdepth}{3}
@@ -363,7 +359,7 @@ used is reproduced there).
\colorlet{secbackground}{green!30}
\colorlet{tocbackground}{red!20!green!20}
-\renewcommand{\etocframedbkgcolorcmd}{\color{tocbackground}}
+\renewcommand{\etocbkgcolorcmd}{\color{tocbackground}}
\renewcommand{\etocleftrulecolorcmd}{\color{tocbackground}}
\renewcommand{\etocrightrulecolorcmd}{\color{tocbackground}}
\renewcommand{\etocbottomrulecolorcmd}{\color{tocbackground}}
@@ -426,6 +422,13 @@ used is reproduced there).
\endgroup
+The actual design is not pre-built in \etoc: it
+combines the \etoc `framed' style (with a dummy empty title, the actual title
+having been put inside the frame as part of the \marg{start} code of the section
+`line style'). The frame borders have been set to have the same color as the one
+which serves as background for the entire thing. This design (with other colors)
+is used also for \hyperref[toc:clone]{\color{green!50!blue!50}this other toc}
+(the coding used is reproduced there).
\part{Package commands for line styles}
@@ -446,14 +449,14 @@ used is reproduced there).
\etocsetstyle{subsubsection}
{\par\nobreak\begingroup\normalfont\footnotesize\itshape\etocskipfirstprefix}
-{\allowbreak\,--\,}
+{\unskip\allowbreak\,--\,}
{\etocname}
{\unskip.\hfil\par\endgroup\pagebreak[3]}
\etocruledstyle[1]{\etocfontminusone\color{green}
\fboxrule1pt\fboxsep1ex
\framebox[\linewidth]
- {\normalcolor\hfil Contents of this second part\hfil}}
+ {\normalcolor\hss Contents of this second part\hss}}
\tableofcontents* \label{toc:a}
@@ -480,7 +483,7 @@ manner%
package, and there is no need to write
\csa{etocname\string{\string} text} rather than just
\csa{etocname text} for example. However, this forced us to
- add the mysterious \csa{unskip} before the dot in the
+ add the two mysterious \csa{unskip} in the
subsubsection style.}
\begingroup\small
@@ -500,7 +503,7 @@ manner%
\etocsetstyle{subsubsection}
{\par\nobreak\begingroup\normalfont
\footnotesize\itshape\etocskipfirstprefix}
-{\allowbreak\,--\,}
+{\unskip\allowbreak\,--\,}
{\etocname}
{\unskip.\hfil\par\endgroup\pagebreak[3]}
\end{verbatim}
@@ -658,7 +661,7 @@ The package predefines for use in its default line styles:
\newcommand\etocfontfour{\normalfont \footnotesize}
\newcommand\etocfontfive{\normalfont \footnotesize}
\end{verbatim}
-This only impact the package default line styles and does
+This only impacts the package default line styles and does
nothing under the \csa{etocstandardlines} regime.
And, let us recall, levels four (paragraph) and five
(subparagraphs) are not displayed by the package
@@ -669,11 +672,11 @@ default line styles.
\color{red!50}
\addtocontents{toc}{\string\color{red!50}}
-\subsubsection{This is a red subsubsection for illustrative purposes}
+\subsubsection{This is a (pale) red subsubsection for illustrative purposes}
Just before this subsubsection we inserted in the |.tex| file:
\begin{verbatim}
-\color{red}
+\color{red!50}
\addtocontents{toc}{\string\color{red!50}}
\end{verbatim}
This entire subsubsection and its title is printed in red, as
@@ -713,7 +716,7 @@ life in a multi-lingual document, as the |babel| package
writes to the |.toc| file the language changes occurring in
the document. There is no easy general solution\footnote{one
can insert by hand the language changes in each concerned
- sectioning command.} to this problem, which probably will
+ sectioning command.} to this, but it will probably
concern only a minority of cases. Again, the line styles
defined by \etoc do not use groups.
@@ -767,7 +770,7 @@ First let us use again our set-up from the previous part. We add to it
{\etocname}
{\end{enumerate}}
-\tableofcontents \label{toc:test}
+\tableofcontents \label{toc:test} \ref{toc:main}
Then we switch to the standard formatting of entries, as is
provided by the document class, but displayed here on two columns:
@@ -803,8 +806,8 @@ to the title and to the contents).
\begingroup
\renewcommand{\etocinnerleftsep}{2ex}
\renewcommand{\etocinnerrightsep}{2ex}
-% specify a background color for the toc contents and its title
-\renewcommand{\etocframedbkgcolorcmd}{\color{yellow!10}}
+% specify a background color for the toc contents
+\renewcommand{\etocbkgcolorcmd}{\color{yellow!10}}
% set up the top and bottom rules
\renewcommand{\etoctoprule}{\hrule height 1pt}
\renewcommand{\etoctoprulecolorcmd}{\color{red!25}}
@@ -815,15 +818,14 @@ to the title and to the contents).
\renewcommand{\etocrightrule}{\vrule width 5pt}
\renewcommand{\etocleftrulecolorcmd}{\color{red!25}}
\renewcommand{\etocrightrulecolorcmd}{\color{red!25}}
-% use \fcolorbox to set up a colored frame for the title, and cancel
-% the background color there.
+% use \fcolorbox to set up a colored frame for the title
\fboxrule1pt
\etocframedstyle{\normalsize\rmfamily\itshape
\fcolorbox{red}{white}{\parbox{.8\linewidth}{\centering
This is a table of contents \`a la \etoc, but just for
the sections and subsections in this part. As it is put
in a frame, it has to be small enough to fit on the
- current page.}}}
+ current page. It has the label |toc:b|.}}}
% set up a label for future (or earlier...) reference
\tableofcontents* \label{toc:b}
\endgroup
@@ -836,27 +838,26 @@ to the title and to the contents).
\begingroup % we use a group to limit the scope of the next commands
\renewcommand{\etocinnerleftsep}{2ex}
\renewcommand{\etocinnerrightsep}{2ex}
-% specify a background color for the toc contents and its title
-\renewcommand{\etocframedbkgcolorcmd}{\color{yellow!10}}
+% specify a background color for the toc contents
+\renewcommand{\etocbkgcolorcmd}{\color{yellow!10}}
% set up the top and bottom rules
\renewcommand{\etoctoprule}{\hrule height 1pt}
\renewcommand{\etoctoprulecolorcmd}{\color{red!25}}
\renewcommand{\etocbottomrule}{\hrule height 1pt}
\renewcommand{\etocbottomrulecolorcmd}{\color{red!25}}
-% set ut the left and right rules
+% set up the left and right rules
\renewcommand{\etocleftrule}{\vrule width 5pt}
\renewcommand{\etocrightrule}{\vrule width 5pt}
\renewcommand{\etocleftrulecolorcmd}{\color{red!25}}
\renewcommand{\etocrightrulecolorcmd}{\color{red!25}}
-% use \fcolorbox to set up a colored frame for the title, and cancel
-% the background color there.
+% use \fcolorbox to set up a colored frame for the title
\fboxrule1pt
\etocframedstyle{\normalsize\rmfamily\itshape
\fcolorbox{red}{white}{\parbox{.8\linewidth}{\centering
This is a table of contents \`a la \etoc, but just for
the sections and subsections in this part. As it is put
in a frame, it has to be small enough to fit on the
- current page.}}}
+ current page. It has the label |toc:b|.}}}
% set up a label for future (or earlier...) reference
\tableofcontents* \label{toc:b}
\endgroup
@@ -895,13 +896,14 @@ horizontal rules via:
\begin{verbatim}
\renewcommand{\etoctoprule}{\hrule height 0pt}
\end{verbatim}
-The green frame for the table of contents heading at the start of the second
-part of this document was obtained with
+The green frame for the heading of the \hyperref[toc:a]{%
+\color{green!50!blue!50}table of contents at the
+ start of the second part of this document} was obtained with:
\begin{verbatim}
\etocruledstyle[1]{\etocfontminusone\color{green}
\fboxrule1pt\fboxsep1ex
\framebox[\linewidth]
- {\normalcolor\hfil Contents of this second part\hfil}}
+ {\normalcolor\hss Contents of this second part\hss}}
\end{verbatim}
@@ -974,8 +976,10 @@ Same mechanism:\\
\centerline{\color{blue}\csa{etocframedstyle}\oarg{number\_of\_columns}\marg{title}}
and the accompanying shortcut:\\
\centerline{\csb{etocframed}\oarg{number\_of\_columns}\marg{title}}
-Here the entire table of contents is framed, hence this can only work if it fits
-on a page. Again the starred variant starts with \staritb{etocframed}.
+Here the entire table of contents is framed, hence this can
+only work if it fits on a page. Note that the title itself is
+not framed, if one wants a frame one should use the commands inside the argument to \cs{etocframedstyle} or \cs{etocframed}. The starred
+variant for the shortcut again begins with \staritb{etocframed}.
\subsection{The command \csb{etocsettocstyle}}
@@ -1113,7 +1117,7 @@ the frame.
\definecolor{secbackground}{RGB}{0,177,235}
\definecolor{tocbackground}{RGB}{212,237,252}
-\renewcommand{\etocframedbkgcolorcmd}{\color{tocbackground}}
+\renewcommand{\etocbkgcolorcmd}{\color{tocbackground}}
\renewcommand{\etocleftrulecolorcmd}{\color{tocbackground}}
\renewcommand{\etocrightrulecolorcmd}{\color{tocbackground}}
\renewcommand{\etocbottomrulecolorcmd}{\color{tocbackground}}
@@ -1183,7 +1187,7 @@ the frame.
\definecolor{secbackground}{RGB}{0,177,235}
\definecolor{tocbackground}{RGB}{212,237,252}
-\renewcommand{\etocframedbkgcolorcmd}{\color{tocbackground}}
+\renewcommand{\etocbkgcolorcmd}{\color{tocbackground}}
\renewcommand{\etocleftrulecolorcmd}{\color{tocbackground}}
\renewcommand{\etocrightrulecolorcmd}{\color{tocbackground}}
\renewcommand{\etocbottomrulecolorcmd}{\color{tocbackground}}
@@ -1343,20 +1347,24 @@ names:
\newcommand\etocmulticoltolerance{200}
\newcommand\etocinnertopsep{2ex}
-\newcommand\etocinnerbottomsep{3.5ex}
+
+\newcommand\etoctoprule{\hrule}
+\newcommand\etoctoprulecolorcmd{\relax}
+
+% for the framed style only:
\newcommand\etocinnerleftsep{2em}
\newcommand\etocinnerrightsep{2em}
+\newcommand\etocinnerbottomsep{3.5ex}
-\newcommand\etoctoprule{\hrule}
\newcommand\etocleftrule{\vrule}
\newcommand\etocrightrule{\vrule}
\newcommand\etocbottomrule{\hrule}
-\newcommand\etoctoprulecolorcmd{\relax}
-\newcommand\etocbottomrulecolorcmd{\relax}
\newcommand\etocleftrulecolorcmd{\relax}
\newcommand\etocrightrulecolorcmd{\relax}
-\newcommand\etocframedbkgcolorcmd{\relax}
+\newcommand\etocbottomrulecolorcmd{\relax}
+
+\newcommand\etocbkgcolorcmd{\relax}
\newcommand\etocframedmphook{\relax}
\end{verbatim}
@@ -1365,6 +1373,16 @@ This last command is a hook, it is positioned immediately
after the beginning of a minipage environment where the
contents of the framed TOC are typeset.
+The \cs{...colorcmd} things are initially set to be
+\cs{relax}, so there is no need to do \cs{usepackage}|{color}|
+if the document does not use colors. Note that they should
+evaluate to something like `\cs{color}|{green}|' and not just
+`|green|'. If the scope of a change to the background color
+command \cs{etocbkgcolorcmd} has not been limited to a group
+and one then wishes to let it again be \cs{relax} one must use
+a \cs{renewcommand} and not
+\cs{let}\cs{etocbkgcolorcmd}\cs{relax}.
+
Regarding the dimensions of the top rule they can be specified
in |ex|'s or |em|'s as for example:\\
\hbox to \linewidth{\hss
@@ -1399,6 +1417,7 @@ accepted here.
\ref{toc:b}
\end{verbatim}
+\clearpage
\renewcommand\etoctoprule{\hrule height 2pt depth 2pt}
\etocruled{\color{green}\fboxrule2pt\fboxsep1ex
@@ -1474,27 +1493,24 @@ expansion. The macro \csa{etocsetstyle}, as well as
\subsection{Errors and catastrophes}
-After adding TOCs here and there, with plenty of labels and
-references, perhaps the \LaTeX{} compilation will complain.
-Try running once more to see what happens, the problem could
-go away. In certain extreme cases (\emph{e.g.}, removing the
-use of package |hyperref| from the document), one must trash
-the previous |.aux| and |.toc| files. And as usual with toc
-and labels, after each change, one has to run latex a
-certain number of times to let the produced document get its
-final appearance.
+As is usual with toc and labels, after each change, one has to
+run latex a certain number of times to let the produced
+document get its final appearance (at least twice). In certain
+extreme cases (\emph{i.e.} after having removed the use of package
+|hyperref| from the document), one must trash the previous
+|.aux| and |.toc| files.
\part{The code}
-This source file |etoc.dtx| outputs \emph{directly and
- systematically} the package file |etoc.sty| when one does
-|latex etoc.dtx| or |pdflatex etoc.dtx| (an |etoc.ins| file is
-also produced, for distributions expecting it for
-installation). Two more runs are necessary to finish producing
-the documentation. The |etoc.sty| file should be moved to a
-suitable location within the \TeX{} distribution.
+This source file |etoc.dtx| produces the package file
+|etoc.sty| when one does |latex etoc.dtx| or |pdflatex etoc.dtx|
+(an |etoc.ins| file is also produced, for
+distributions expecting it for installation). Two more runs
+are necessary to finish producing the documentation. The
+|etoc.sty| file should be moved to a suitable location within
+the \TeX{} distribution.
\section{Implementation}
@@ -1929,6 +1945,13 @@ release.
% \begin{macrocode}
\AtBeginDocument{\Etoc@starttoc}
\def\Etoc@toctoc{%
+ \global\Etoc@vfalse
+ \global\Etoc@ivfalse
+ \global\Etoc@iiifalse
+ \global\Etoc@iifalse
+ \global\Etoc@ifalse
+ \global\Etoc@false
+ \global\Etoc@jfalse
\ifEtoc@standard
\Etoc@Lazarus
\etocsetstyle{@minusone}{}{}{}{}%
@@ -1950,14 +1973,7 @@ release.
\ifEtoc@i \Etoc@end@one\fi
\ifEtoc@ \Etoc@end@zero\fi
\ifEtoc@j \Etoc@end@minusone\fi
-\fi
-\global\Etoc@vfalse
-\global\Etoc@ivfalse
-\global\Etoc@iiifalse
-\global\Etoc@iifalse
-\global\Etoc@ifalse
-\global\Etoc@false
-\global\Etoc@jfalse}
+\fi}
% \end{macrocode}
% placeholder for comments
% \begin{macrocode}
@@ -1991,33 +2007,13 @@ release.
\def\Etoc@getrefno #1#2\etoc@{#1}
\def\Etoc@getref #1{\@ifundefined{r@#1}{0}{\expandafter\expandafter\expandafter
\Etoc@getrefno\csname r@#1\endcsname\relax\etoc@}}
-\def\Etoc@ref#1{\Etoc@localtoctrue
- \Etoc@localtableofcontents{\Etoc@getref{#1}}}
+\def\Etoc@ref#1{\Etoc@localtableofcontents{\Etoc@getref{#1}}}
\def\Etoc@label#1{\label{#1}\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}
{\def\1{\Etoc@again}\expandafter
\gdef\1 {\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}}
% \end{macrocode}
% placeholder for comments
% \begin{macrocode}
-\def\Etoc@t@bleofcontents{%
- \ifx\Etoc@nexttoken\label
- \def\Etoc@next{\expandafter\Etoc@label\@gobble}\else
- \ifx\Etoc@nexttoken\@sptoken
- \let\Etoc@next\Etoc@again\else
- \ifEtoc@localtoc
- \def\Etoc@next{\Etoc@localtableofcontents{\c@etoc@tocid}}%
- \else
- \ifx\Etoc@nexttoken\ref
- \def\Etoc@next{\expandafter\Etoc@ref\@gobble}%
- \else
- \def\Etoc@next{\begingroup\Etoc@tableofcontents
- \ifEtoc@mustclosegroup\expandafter\endgroup\fi
- \endgroup\Etoc@mustclosegroupfalse}%
- \fi
- \fi\fi\fi\Etoc@next}
-% \end{macrocode}
-% placeholder for comments
-% \begin{macrocode}
\long\def\Etoc@localtableofcontents#1{%
\edef\Etoc@tmp{#1}%
\ifnum\Etoc@tmp<\@ne
@@ -2032,20 +2028,41 @@ release.
\Etoc@localtoctrue
\let\Etoc@localtop\m@ne
\Etoc@stoptocfalse
- \Etoc@notactivetrue
+ \global\Etoc@notactivetrue
\Etoc@tableofcontents
\endgroup}%
- \ifEtoc@mustclosegroup\expandafter\endgroup\fi
- \Etoc@mustclosegroupfalse}
+ \ifEtoc@mustclosegroup\expandafter\endgroup\fi}
% \end{macrocode}
% placeholder for comments
% \begin{macrocode}
-\def\tableofcontents{\par\refstepcounter{etoc@tocid}%
+\def\Etoc@t@bleofcontents{%
+ \ifx\Etoc@nexttoken\label
+ \def\Etoc@next{\expandafter\Etoc@label\@gobble}\else
+ \ifx\Etoc@nexttoken\@sptoken
+ \let\Etoc@next\Etoc@again\else
+ \ifEtoc@star
+ \def\Etoc@next{\Etoc@localtableofcontents{\c@etoc@tocid}}%
+ \else
+ \ifx\Etoc@nexttoken\ref
+ \def\Etoc@next{\expandafter\Etoc@ref\@gobble}%
+ \else
+ \def\Etoc@next{\Etoc@localtocfalse
+ \global\Etoc@notactivefalse
+ \begingroup\Etoc@tableofcontents
+ \ifEtoc@mustclosegroup\expandafter\endgroup\fi
+ \endgroup}%
+ \fi
+ \fi\fi\fi\Etoc@next}
+% \end{macrocode}
+% placeholder for comments
+% \begin{macrocode}
+\def\tableofcontents{\par
+ \refstepcounter{etoc@tocid}%
\@ifstar {\addtocontents{toc}
{\string\etoc@startlocaltoc\string{\arabic{etoc@tocid}\string}}%
- \Etoc@localtoctrue
+ \Etoc@startrue
\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}
- {\Etoc@localtocfalse
+ {\Etoc@starfalse
\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}}
% \end{macrocode}
% placeholder for comments
@@ -2054,10 +2071,15 @@ release.
\long\def\Etoc@tableofcontents
{\ifnum\c@tocdepth>-2\let\Etoc@@next\@firstofone\else
\let\Etoc@@next\@gobble\fi
-\Etoc@@next{#1\Etoc@toctoc
- \Etoc@localtocfalse
- \ifEtoc@notactive \expandafter\Etoc@toctoc\fi
- #2}}}
+\Etoc@@next{#1\Etoc@toctoc\let\Etoc@n@xt\relax
+ \ifEtoc@star\else
+ \ifEtoc@localtoc
+ \ifEtoc@notactive
+ \def\Etoc@n@xt{\Etoc@localtocfalse
+ \global\Etoc@notactivefalse
+ \Etoc@toctoc}%
+ \fi\fi\fi\Etoc@n@xt
+ #2}}}
% \end{macrocode}
% placeholder for comments
% \begin{macrocode}
@@ -2331,7 +2353,8 @@ release.
% placeholder for comments
% \begin{macrocode}
\newcommand\etocframedmphook{\relax}
-\newcommand\etocframedbkgcolorcmd{\relax}
+\newcommand\etocbkgcolorcmd{\relax}
+\newcommand\Etoc@relax{\relax}
\newbox\etoc@framed@titlebox
\newbox\etoc@framed@contentsbox
\newcommand\etocframedstyle[2][2]{%
@@ -2341,10 +2364,16 @@ release.
\dimen\z@\dp\z@
\ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi
\setbox\etoc@framed@titlebox=\hbox to \linewidth{\color@begingroup
- \hss{\etocframedbkgcolorcmd
- \vrule\@width\wd\z@\@height\ht\z@\@depth\dp\z@}%
- \hskip-\wd\z@
- \copy\z@\hss
+ \hss
+ \ifx\etocbkgcolorcmd\Etoc@relax\else
+ \sbox\tw@{\color{white}%
+ \vrule\@width\wd\z@\@height\ht\z@\@depth\dimen\z@}%
+ \ifdim\wd\z@<\linewidth \dp\tw@\z@\fi
+ \box\tw@
+ \hskip-\wd\z@
+ \fi
+ \copy\z@
+ \hss
\hskip-\linewidth
\etoctoprulecolorcmd\leaders\etoctoprule\hss%
\hskip\wd\z@
@@ -2377,22 +2406,24 @@ release.
\egroup
\vskip\etocinnerbottomsep
\egroup
+ \ifx\etocbkgcolorcmd\Etoc@relax\else
\vskip\ht\etoc@framed@titlebox
\vskip\dp\etoc@framed@titlebox
\hbox to \linewidth{\color@begingroup
\etocleftrulecolorcmd\etocleftrule
- \etocframedbkgcolorcmd
+ \etocbkgcolorcmd
\leaders\vrule
\@height\ht\etoc@framed@contentsbox
\@depth\dp\etoc@framed@contentsbox
\hss
\etocrightrulecolorcmd\etocrightrule
\color@endgroup}
- \nointerlineskip
- \vskip-\dp\etoc@framed@contentsbox
- \vskip-\ht\etoc@framed@contentsbox
- \vskip-\dp\etoc@framed@titlebox
- \vskip-\ht\etoc@framed@titlebox
+ \nointerlineskip
+ \vskip-\dp\etoc@framed@contentsbox
+ \vskip-\ht\etoc@framed@contentsbox
+ \vskip-\dp\etoc@framed@titlebox
+ \vskip-\ht\etoc@framed@titlebox
+ \fi
\box\etoc@framed@titlebox\nointerlineskip
\hbox to \linewidth{\color@begingroup
{\etocleftrulecolorcmd\etocleftrule}%
@@ -2446,11 +2477,11 @@ release.
% \end{macrocode}
% placeholder for comments
% \begin{macrocode}
-\def\etocmulticol{\@ifstar{\global\Etoc@startrue\etoc@multicoltoc}
+\def\etocmulticol{\@ifstar{\Etoc@startrue\etoc@multicoltoc}
{\Etoc@starfalse\etoc@multicoltoc}}
-\def\etocruled{\@ifstar{\global\Etoc@startrue\etoc@ruledtoc}
+\def\etocruled{\@ifstar{\Etoc@startrue\etoc@ruledtoc}
{\Etoc@starfalse\etoc@ruledtoc}}
-\def\etocframed{\@ifstar{\global\Etoc@startrue\etoc@framedtoc}
+\def\etocframed{\@ifstar{\Etoc@startrue\etoc@framedtoc}
{\Etoc@starfalse\etoc@framedtoc}}
% \end{macrocode}
% placeholder for comments
@@ -2477,7 +2508,7 @@ release.
Grave accent \` Left brace \{ Vertical bar \|
Right brace \} Tilde \~}
-\CheckSum{2056}
+\CheckSum{0}
\Finale
%%
diff --git a/Master/texmf-dist/source/latex/etoc/etoc.ins b/Master/texmf-dist/source/latex/etoc/etoc.ins
index fec7217a6a3..da3006bd47c 100644
--- a/Master/texmf-dist/source/latex/etoc/etoc.ins
+++ b/Master/texmf-dist/source/latex/etoc/etoc.ins
@@ -1,8 +1,8 @@
%% Package `etoc' by Jean-Francois Burnol
%% Copyright (C) 2012 by Jean-Francois Burnol
\def\pkgname{etoc}
-\def\pkgdate{2012/11/23}
-\def\pkgversion{v1.03}
+\def\pkgdate{2012/11/24}
+\def\pkgversion{v1.04}
\def\pkgdescription{easily customizable TOCs (jfB)}
%%
%% This file `etoc.ins' is provided for compatibility with TeX distributions
diff --git a/Master/texmf-dist/tex/latex/etoc/etoc.sty b/Master/texmf-dist/tex/latex/etoc/etoc.sty
index c269282b0e8..c54f5c95a62 100644
--- a/Master/texmf-dist/tex/latex/etoc/etoc.sty
+++ b/Master/texmf-dist/tex/latex/etoc/etoc.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
\ProvidesPackage{etoc}
- [2012/11/23 v1.03 easily customizable TOCs (jfB)]
+ [2012/11/24 v1.04 easily customizable TOCs (jfB)]
%% Package `etoc' by Jean-Francois Burnol
%% Copyright (C) 2012 by Jean-Francois Burnol
\NeedsTeXFormat{LaTeX2e}
@@ -349,6 +349,13 @@
\endgroup}
\AtBeginDocument{\Etoc@starttoc}
\def\Etoc@toctoc{%
+ \global\Etoc@vfalse
+ \global\Etoc@ivfalse
+ \global\Etoc@iiifalse
+ \global\Etoc@iifalse
+ \global\Etoc@ifalse
+ \global\Etoc@false
+ \global\Etoc@jfalse
\ifEtoc@standard
\Etoc@Lazarus
\etocsetstyle{@minusone}{}{}{}{}%
@@ -370,14 +377,7 @@
\ifEtoc@i \Etoc@end@one\fi
\ifEtoc@ \Etoc@end@zero\fi
\ifEtoc@j \Etoc@end@minusone\fi
-\fi
-\global\Etoc@vfalse
-\global\Etoc@ivfalse
-\global\Etoc@iiifalse
-\global\Etoc@iifalse
-\global\Etoc@ifalse
-\global\Etoc@false
-\global\Etoc@jfalse}
+\fi}
\def\etoc@@startlocaltoc#1#2{%
\let\Etoc@next\relax
\ifEtoc@localtoc
@@ -405,27 +405,10 @@
\def\Etoc@getrefno #1#2\etoc@{#1}
\def\Etoc@getref #1{\@ifundefined{r@#1}{0}{\expandafter\expandafter\expandafter
\Etoc@getrefno\csname r@#1\endcsname\relax\etoc@}}
-\def\Etoc@ref#1{\Etoc@localtoctrue
- \Etoc@localtableofcontents{\Etoc@getref{#1}}}
+\def\Etoc@ref#1{\Etoc@localtableofcontents{\Etoc@getref{#1}}}
\def\Etoc@label#1{\label{#1}\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}
{\def\1{\Etoc@again}\expandafter
\gdef\1 {\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}}
-\def\Etoc@t@bleofcontents{%
- \ifx\Etoc@nexttoken\label
- \def\Etoc@next{\expandafter\Etoc@label\@gobble}\else
- \ifx\Etoc@nexttoken\@sptoken
- \let\Etoc@next\Etoc@again\else
- \ifEtoc@localtoc
- \def\Etoc@next{\Etoc@localtableofcontents{\c@etoc@tocid}}%
- \else
- \ifx\Etoc@nexttoken\ref
- \def\Etoc@next{\expandafter\Etoc@ref\@gobble}%
- \else
- \def\Etoc@next{\begingroup\Etoc@tableofcontents
- \ifEtoc@mustclosegroup\expandafter\endgroup\fi
- \endgroup\Etoc@mustclosegroupfalse}%
- \fi
- \fi\fi\fi\Etoc@next}
\long\def\Etoc@localtableofcontents#1{%
\edef\Etoc@tmp{#1}%
\ifnum\Etoc@tmp<\@ne
@@ -440,26 +423,49 @@
\Etoc@localtoctrue
\let\Etoc@localtop\m@ne
\Etoc@stoptocfalse
- \Etoc@notactivetrue
+ \global\Etoc@notactivetrue
\Etoc@tableofcontents
\endgroup}%
- \ifEtoc@mustclosegroup\expandafter\endgroup\fi
- \Etoc@mustclosegroupfalse}
-\def\tableofcontents{\par\refstepcounter{etoc@tocid}%
+ \ifEtoc@mustclosegroup\expandafter\endgroup\fi}
+\def\Etoc@t@bleofcontents{%
+ \ifx\Etoc@nexttoken\label
+ \def\Etoc@next{\expandafter\Etoc@label\@gobble}\else
+ \ifx\Etoc@nexttoken\@sptoken
+ \let\Etoc@next\Etoc@again\else
+ \ifEtoc@star
+ \def\Etoc@next{\Etoc@localtableofcontents{\c@etoc@tocid}}%
+ \else
+ \ifx\Etoc@nexttoken\ref
+ \def\Etoc@next{\expandafter\Etoc@ref\@gobble}%
+ \else
+ \def\Etoc@next{\Etoc@localtocfalse
+ \global\Etoc@notactivefalse
+ \begingroup\Etoc@tableofcontents
+ \ifEtoc@mustclosegroup\expandafter\endgroup\fi
+ \endgroup}%
+ \fi
+ \fi\fi\fi\Etoc@next}
+\def\tableofcontents{\par
+ \refstepcounter{etoc@tocid}%
\@ifstar {\addtocontents{toc}
{\string\etoc@startlocaltoc\string{\arabic{etoc@tocid}\string}}%
- \Etoc@localtoctrue
+ \Etoc@startrue
\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}
- {\Etoc@localtocfalse
+ {\Etoc@starfalse
\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}}
\newcommand\etocsettocstyle[2]{%
\long\def\Etoc@tableofcontents
{\ifnum\c@tocdepth>-2\let\Etoc@@next\@firstofone\else
\let\Etoc@@next\@gobble\fi
-\Etoc@@next{#1\Etoc@toctoc
- \Etoc@localtocfalse
- \ifEtoc@notactive \expandafter\Etoc@toctoc\fi
- #2}}}
+\Etoc@@next{#1\Etoc@toctoc\let\Etoc@n@xt\relax
+ \ifEtoc@star\else
+ \ifEtoc@localtoc
+ \ifEtoc@notactive
+ \def\Etoc@n@xt{\Etoc@localtocfalse
+ \global\Etoc@notactivefalse
+ \Etoc@toctoc}%
+ \fi\fi\fi\Etoc@n@xt
+ #2}}}
\newcommand\etocsetstyle[5]{%
\long\expandafter\def
\csname Etoc@begin@\csname Etoc@#1@\endcsname\endcsname {#2}%
@@ -672,7 +678,8 @@
\Etoc@next{\end{multicols}}%
\addvspace{\etocbelowtocskip}}}
\newcommand\etocframedmphook{\relax}
-\newcommand\etocframedbkgcolorcmd{\relax}
+\newcommand\etocbkgcolorcmd{\relax}
+\newcommand\Etoc@relax{\relax}
\newbox\etoc@framed@titlebox
\newbox\etoc@framed@contentsbox
\newcommand\etocframedstyle[2][2]{%
@@ -682,10 +689,16 @@
\dimen\z@\dp\z@
\ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi
\setbox\etoc@framed@titlebox=\hbox to \linewidth{\color@begingroup
- \hss{\etocframedbkgcolorcmd
- \vrule\@width\wd\z@\@height\ht\z@\@depth\dp\z@}%
- \hskip-\wd\z@
- \copy\z@\hss
+ \hss
+ \ifx\etocbkgcolorcmd\Etoc@relax\else
+ \sbox\tw@{\color{white}%
+ \vrule\@width\wd\z@\@height\ht\z@\@depth\dimen\z@}%
+ \ifdim\wd\z@<\linewidth \dp\tw@\z@\fi
+ \box\tw@
+ \hskip-\wd\z@
+ \fi
+ \copy\z@
+ \hss
\hskip-\linewidth
\etoctoprulecolorcmd\leaders\etoctoprule\hss%
\hskip\wd\z@
@@ -718,22 +731,24 @@
\egroup
\vskip\etocinnerbottomsep
\egroup
+ \ifx\etocbkgcolorcmd\Etoc@relax\else
\vskip\ht\etoc@framed@titlebox
\vskip\dp\etoc@framed@titlebox
\hbox to \linewidth{\color@begingroup
\etocleftrulecolorcmd\etocleftrule
- \etocframedbkgcolorcmd
+ \etocbkgcolorcmd
\leaders\vrule
\@height\ht\etoc@framed@contentsbox
\@depth\dp\etoc@framed@contentsbox
\hss
\etocrightrulecolorcmd\etocrightrule
\color@endgroup}
- \nointerlineskip
- \vskip-\dp\etoc@framed@contentsbox
- \vskip-\ht\etoc@framed@contentsbox
- \vskip-\dp\etoc@framed@titlebox
- \vskip-\ht\etoc@framed@titlebox
+ \nointerlineskip
+ \vskip-\dp\etoc@framed@contentsbox
+ \vskip-\ht\etoc@framed@contentsbox
+ \vskip-\dp\etoc@framed@titlebox
+ \vskip-\ht\etoc@framed@titlebox
+ \fi
\box\etoc@framed@titlebox\nointerlineskip
\hbox to \linewidth{\color@begingroup
{\etocleftrulecolorcmd\etocleftrule}%
@@ -775,11 +790,11 @@
\fi
\Etoc@mustclosegrouptrue
\Etoc@next}
-\def\etocmulticol{\@ifstar{\global\Etoc@startrue\etoc@multicoltoc}
+\def\etocmulticol{\@ifstar{\Etoc@startrue\etoc@multicoltoc}
{\Etoc@starfalse\etoc@multicoltoc}}
-\def\etocruled{\@ifstar{\global\Etoc@startrue\etoc@ruledtoc}
+\def\etocruled{\@ifstar{\Etoc@startrue\etoc@ruledtoc}
{\Etoc@starfalse\etoc@ruledtoc}}
-\def\etocframed{\@ifstar{\global\Etoc@startrue\etoc@framedtoc}
+\def\etocframed{\@ifstar{\Etoc@startrue\etoc@framedtoc}
{\Etoc@starfalse\etoc@framedtoc}}
\etocetoclines
\etocmulticolstyle{\etocstandardheading\contentsname}
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index f47f021017d..217326082c8 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -274,7 +274,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`);
'cpssp', "die 'skipping, requires python'",
'croatian', "die 'skipping, nonfree (nomodify) license'",
'crosstex', "die 'sorry, investigate self-locating?'",
- 'csplain', "die 'skipping, too hard to automate'",
+ 'csplain', "die 'skipping, not ready, sorry'",
'csv2latex', "die 'skipping, mac only?, ruby + applescript'",
'csvtools', "&MAKEflatten",
'csvtolatex', "die 'skipping, w32 only, visual basic'",
@@ -1261,6 +1261,7 @@ $standardtex='\.(.bx|cfg|sty|clo|ldf|cls|def|fd|cmap|4ht)$';
'colortab', 'colortab\.tex|' . $standardtex,
'components-of-TeX', 'NULL',
'contour', '\.cfg|\.sty|\.cnt',
+ 'csplain', '\.tex',
'ctib', '\.sty|\.clo|\.ldf|\.cls|\.def|\.fd$|ctib\.tex',
'custbib', '\.mbs|\.tex',
'custom-bib', '\.mbs|\.tex',
@@ -3296,6 +3297,18 @@ sub MAKEflatten {
&setup;
&xchdir ("$DEST/doc/$whichdocformat/$package");
+ &flatten_dirtree ($package);
+
+ # do the usual.
+ &buildfilelist;
+ &donormal ("nosetup");
+}
+
+# Flatten the directory tree (for PACKAGE) under the cwd.
+#
+sub flatten_dirtree {
+ my ($package) = @_;
+
print "\t SPECIAL flatten $package\n";
# cm-super et al. need to intervene at this point.
@@ -3320,24 +3333,19 @@ sub MAKEflatten {
# remove newly empty directories.
&SYSTEM ("find -depth -type d -print | xargs rmdir 2>/dev/null");
-
- # do the usual.
- &buildfilelist;
- &donormal ("nosetup");
}
sub MAKEunzipandflatten {
&setup;
chdir("$DEST/doc/$whichdocformat/$package");
- &SYSTEM("unzip -q -o -a $package.zip; rm $package.zip");
- &SYSTEM("$MV */*/*/*/* .; rmdir */*/*/*");
- &SYSTEM("$MV */*/*/* .; rmdir */*/*");
- &SYSTEM("$MV */*/*/* .; rmdir */*/*");
- &SYSTEM("$MV */*/* .; rmdir */*");
- &SYSTEM("$MV */*/* .; rmdir */*");
- &SYSTEM("$MV */* .; rmdir *");
+ my $archive = -r "$package.zip" ? "$package.zip" : "$package.tar.gz";
+ my $unarchiver = &unarchiver ($archive);
+ &SYSTEM ("$unarchiver $archive; $RM $archive");
+
+ &flatten_dirtree ($package);
+
&buildfilelist;
- &donormal;
+ &donormal ("nosetup");
}
sub MAKEnosymlinks {