summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-10-23 22:21:41 +0000
committerKarl Berry <karl@freefriends.org>2017-10-23 22:21:41 +0000
commitcf7010cece3857384bdd19324eef056cf764385b (patch)
treeef3b59a6d9c52210fdcc8fc2455f7d74061ef19a /Master/texmf-dist/tex
parent08541f1238259e89340cc52f9838c8591dbab1f5 (diff)
etoc (23oct17)
git-svn-id: svn://tug.org/texlive/trunk@45586 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/etoc/etoc.sty94
1 files changed, 58 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/latex/etoc/etoc.sty b/Master/texmf-dist/tex/latex/etoc/etoc.sty
index 5fb278c2445..48a8a986c45 100644
--- a/Master/texmf-dist/tex/latex/etoc/etoc.sty
+++ b/Master/texmf-dist/tex/latex/etoc/etoc.sty
@@ -23,10 +23,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{etoc}
- [2017/09/28 v1.08k Completely customisable TOCs (JFB)]
+ [2017/10/23 v1.08l Completely customisable TOCs (JFB)]
%%
%% Package: etoc
-%% Version: 1.08k-2017/09/28
+%% Version: 1.08l-2017/10/23
%% License: LPPL 1.3c
%% Copyright (C) 2012-2017 Jean-Francois Burnol
%% <jfbu at free dot fr>
@@ -293,10 +293,12 @@
\def\Etoc@etoccontentsline #1{%
\global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname
\Etoc@skipthisonefalse
- \ifnum\Etoc@level=\Etoc@@six@@\Etoc@skipthisonetrue
+ \ifnum\Etoc@level=\Etoc@@six@@
+ \Etoc@skipthisonetrue
\else
\ifEtoc@localtoc
- \ifEtoc@stoptoc\Etoc@skipthisonetrue
+ \ifEtoc@stoptoc
+ \Etoc@skipthisonetrue
\else
\ifEtoc@notactive\Etoc@setflags
\Etoc@skipthisonetrue
@@ -340,10 +342,11 @@
\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
+ \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
@@ -352,9 +355,11 @@
}
\def\Etoc@getthepage #1{%
\let\Etoc@next\Etoc@getthepage@nohyp
- \ifEtoc@hyperref\ifx\hyper@linkstart#1%
+ \ifEtoc@hyperref
+ \ifx\hyper@linkstart#1%
\let\Etoc@next\Etoc@getthepage@hyp
- \fi\fi
+ \fi
+ \fi
\Etoc@next #1%
}
\def\Etoc@getthepage@nohyp #1\etoc@ {%
@@ -370,16 +375,20 @@
}
\def\Etoc@getnb #1{%
\let\Etoc@next\Etoc@getnb@nohyp
- \ifEtoc@hyperref\ifx\hyper@linkstart#1%
+ \ifEtoc@hyperref
+ \ifx\hyper@linkstart#1%
\let\Etoc@next\Etoc@getnb@hyp
- \fi\fi
+ \fi
+ \fi
\Etoc@next #1%
}
\def\Etoc@getit #1{%
\let\Etoc@next\Etoc@getit@nohyp
- \ifEtoc@hyperref\ifx\hyper@linkstart#1%
+ \ifEtoc@hyperref
+ \ifx\hyper@linkstart#1%
\let\Etoc@next\Etoc@getit@hyp
- \fi\fi
+ \fi
+ \fi
\Etoc@next #1%
}
\begingroup\@tfor\x:=NUMBZRLINZ\do{\catcode\expandafter`\x=12 }\lccode`Z `e
@@ -502,14 +511,14 @@
{\typeout{No file \jobname.toc.}}}
\def\Etoc@openouttoc{%
\ifEtoc@hyperref
- \ifx\hyper@last\@undefined
+ \ifx\hyper@last\@undefined
\IfFileExists{\jobname .toc}
{\Hy@WarningNoLine
{old toc file detected, not used; run LaTeX again (cheers from etoc)}%
\global\Etoc@toctoks={}%
}
{}%
- \fi
+ \fi
\fi
\if@filesw
\newwrite \tf@toc
@@ -541,7 +550,7 @@
}
\def\etoc@@startlocaltoc#1#2{%
\ifEtoc@localtoc
- \ifnum #1=#2\relax
+ \ifnum #1=#2\relax
\ifEtoc@jj \global\let\Etoc@localtop\Etoc@@minusone@@ \fi
\ifEtoc@j \global\let\Etoc@localtop\Etoc@@zero@@ \fi
\ifEtoc@ \global\let\Etoc@localtop\Etoc@@one@@ \fi
@@ -559,7 +568,7 @@
\global\Etoc@false
\global\Etoc@jfalse
\global\Etoc@jjfalse
- \fi
+ \fi
\fi
}
\let\etoc@startlocaltoc\@gobble
@@ -629,7 +638,7 @@
\edef\Etoc@tocid{#1}%
\ifnum\Etoc@tocid<\@ne
%\PackageWarning{etoc}{Unknown toc reference \@secondoftwo#1. Run LaTeX again}%
- \setbox0\hbox{\ref{etoc-ref \@secondoftwo#1: run LaTeX again!}}%
+ \setbox0\hbox{\ref{Unknown toc ref \@secondoftwo#1. Rerun LaTeX}}%
%\if@filesw\immediate\write\@mainaux{\noexpand\@tempswatrue}\fi
\global\Etoc@stoptoctrue % do only heading
\Etoc@tableofcontents
@@ -640,7 +649,7 @@
\ifEtoc@emptytoc
\ifEtoc@notactive
%\PackageWarning{etoc}{Unknown toc ID \number\Etoc@tocid. Run LaTeX again}%
- \setbox0\hbox{\ref{etoc-id \number\Etoc@tocid: run LaTeX again!}}%
+ \setbox0\hbox{\ref{Unknown toc ID \number\Etoc@tocid. Rerun LaTeX}}%
%\if@filesw\immediate\write\@mainaux{\noexpand\@tempswatrue}\fi
\global\Etoc@emptytocfalse % assume real one will be non-empty
\global\Etoc@stoptoctrue % and print only heading for this pass
@@ -674,9 +683,11 @@
\ifx\Etoc@nexttoken\ref\Etoc@dothis{\expandafter\Etoc@ref\@gobble}\fi
\ifEtoc@tocwithid\Etoc@dothis{\Etoc@localtableofcontents{\c@etoc@tocid}}\fi
\global\Etoc@emptytocfalse\ifEtoc@checksemptiness\Etoc@setemptytocbool\fi
- \ifEtoc@emptytoc\ifEtoc@notocifnotoc
- \expandafter\expandafter\expandafter\@gobble
- \fi\fi
+ \ifEtoc@emptytoc
+ \ifEtoc@notocifnotoc
+ \expandafter\expandafter\expandafter\@gobble
+ \fi
+ \fi
\Etoc@tableofcontents
\endgroup\ifEtoc@mustclosegroup\endgroup\fi
\Etoc@tocdepthreset % 1.07h, renamed 1.08h
@@ -718,8 +729,8 @@
\def\Etoc@tableofcontents
{%
\ifnum\c@tocdepth>\Etoc@minf
- \else\expandafter
- \Etoc@gobbletoetoc@
+ \else
+ \expandafter\Etoc@gobbletoetoc@
\fi
\Etoc@par
\etocbeforetitlehook % 1.07m
@@ -741,9 +752,12 @@
\etocaftercontentshook
#2\@nobreakfalse % 1.07d: \@nobreakfalse moved here
\Etoc@resettocdepth % 1.07g. moved here from before #2 by 1.08
- \ifx\Etoc@global\global\ifx\tof@finish\@empty\else
- \global\let\contentsline\Etoc@savedcontentsline
- \fi\fi
+ \ifx\Etoc@global\global
+ \ifx\tof@finish\@empty
+ \else
+ \global\let\contentsline\Etoc@savedcontentsline
+ \fi
+ \fi
\@gobble\etoc@
}% end of \Etoc@tableofcontents definition by \etocsettocstyle
}
@@ -973,8 +987,9 @@
\newcommand*\etocruledstyle[2][\etocdefaultnbcol]{%
\etocsettocstyle
{\addvspace{\etocabovetocskip}%
- \ifnum #1>\@ne\expandafter\@firstoftwo
- \else \expandafter\@secondoftwo
+ \ifnum #1>\@ne
+ \expandafter\@firstoftwo
+ \else \expandafter\@secondoftwo
\fi
{\multicolpretolerance\etocmulticolpretolerance
\multicoltolerance\etocmulticoltolerance
@@ -999,10 +1014,11 @@
\addvspace{\etocabovetocskip}%
\sbox\z@{#2}%
\dimen\z@\dp\z@
- \ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi
+ \ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi
\setbox\etoc@framed@titlebox=\hb@xt@\linewidth{\color@begingroup
\hss
- \ifx\etocbkgcolorcmd\Etoc@relax\else
+ \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
@@ -1012,7 +1028,7 @@
\copy\z@
\hss
\hskip-\linewidth
- \etoctoprulecolorcmd\leaders\etoctoprule\hss%
+ \etoctoprulecolorcmd\leaders\etoctoprule\hss
\hskip\wd\z@
\etoctoprulecolorcmd\leaders\etoctoprule\hss\color@endgroup}%
\setbox\z@\hbox{\etocleftrule\etocrightrule}%
@@ -1026,7 +1042,8 @@
\hbox\bgroup
\begin{minipage}{\hsize}%
\etocframedmphook
- \ifnum #1>\@ne\expandafter\@firstoftwo
+ \ifnum #1>\@ne
+ \expandafter\@firstoftwo
\else \expandafter\@secondoftwo
\fi
{\multicolpretolerance\etocmulticolpretolerance
@@ -1045,7 +1062,8 @@
\vskip\etocinnerbottomsep
\egroup
\vbox{\hsize\linewidth
- \ifx\etocbkgcolorcmd\Etoc@relax\else
+ \ifx\etocbkgcolorcmd\Etoc@relax
+ \else
\kern\ht\etoc@framed@titlebox
\kern\dp\etoc@framed@titlebox
\hb@xt@\linewidth{\color@begingroup
@@ -1167,7 +1185,11 @@
\def\Etoc@addsuitablecontentsline{\addcontentsline {toc}{#1}{#2}}%
\renewcommand*\etocaftertitlehook{%
\ifmem@em@starred@listof
- \else\phantomsection\aftergroup\Etoc@addsuitablecontentsline\fi}}
+ \else
+ \phantomsection
+ \aftergroup\Etoc@addsuitablecontentsline
+ \fi}%
+}
\def\etocmemoirstyle{%
\etocsettocstyle
{\ensureonecol \par \begingroup \@nameuse {@tocmaketitle}