diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/etoc/etoc.sty | 719 |
1 files changed, 719 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/etoc/etoc.sty b/Master/texmf-dist/tex/latex/etoc/etoc.sty new file mode 100644 index 00000000000..321b9036933 --- /dev/null +++ b/Master/texmf-dist/tex/latex/etoc/etoc.sty @@ -0,0 +1,719 @@ +%% +%% This is file `etoc.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% etoc.dtx (with options: `package') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from etoc.sty. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file etoc.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% +\ProvidesPackage{etoc} + [2012/11/18 v1.02 easily customizable TOCs (jfB)] +%% Copyright (C) 2012 by Jean-Francois Burnol +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{multicol} +\RequirePackage{xspace} +\DeclareOption*{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}} +\ProcessOptions\relax +\newtoks\Etoc@toctoks +\newif\ifEtoc@j % part +\newif\ifEtoc@ % chapter +\newif\ifEtoc@i % section +\newif\ifEtoc@ii % subsection +\newif\ifEtoc@iii % subsubsection +\newif\ifEtoc@iv % paragraph +\newif\ifEtoc@v % subparagraph +\newif\ifEtoc@number +\newif\ifEtoc@hyperref +\newif\ifEtoc@star +\newif\ifEtoc@standard +\newif\ifEtoc@part +\newif\ifEtoc@localtoc +\newif\ifEtoc@skipthisone +\newif\ifEtoc@stoptoc +\newif\ifEtoc@notactive +\newcounter{etoc@localtocid} +\let\Etoc@@minusone@@\m@ne +\chardef\Etoc@@zero@@\z@ +\chardef\Etoc@@one@@\@ne +\chardef\Etoc@@two@@\tw@ +\chardef\Etoc@@three@@\thr@@ +\chardef\Etoc@@four@@4\relax +\chardef\Etoc@@five@@5\relax +\chardef\Etoc@@six@@6\relax +\let\Etoc@localtop\m@ne +\def\Etoc@@minusone@{minusone} +\def\Etoc@@zero@{zero} +\def\Etoc@@one@{one} +\def\Etoc@@two@{two} +\def\Etoc@@three@{three} +\def\Etoc@@four@{four} +\def\Etoc@@five@{five} +\def\Etoc@Lazarus{% +\def\Etoc@Lazarus@elta##1\Etoc@Lazarus@eltb##2{\let##1##2}% +\Etoc@Lazaruslist} +\def\Etoc@Lazaruslist{} +\def\Etoc@newdisciple#1#2{% + \def\Etoc@Lazarus@elta{\noexpand\Etoc@Lazarus@elta\noexpand}% + \def\Etoc@Lazarus@eltb{\noexpand\Etoc@Lazarus@eltb\noexpand}% + \edef\Etoc@Lazaruslist{\Etoc@Lazaruslist + \Etoc@Lazarus@elta#1 + \Etoc@Lazarus@eltb#2}} +\def\etocsetlevel#1#2{% + \let\Etoc@next\@firstofone + \ifcase#2\or\or\or\or\or\else\ifnum#2=\m@ne\else + \PackageWarning{etoc} + {unexpected value `#2' in \string\etocsetlevel.^^J% + Should be -1, 0, 1, 2, 3, 4 or 5. Set to -1}% + \expandafter\def\csname Etoc@#1@\endcsname{minusone}% + \expandafter\let\csname Etoc@#1@@\endcsname\m@ne + \let\Etoc@next\@gobble\fi\fi + \if@noskipsec + \else + \expandafter\expandafter\expandafter + \let\expandafter\expandafter\csname Etoc@savedl@#1\endcsname + \csname l@#1\endcsname + \expandafter\let \csname l@#1\endcsname\Etoc@lxyz + \fi + \expandafter\expandafter\expandafter\Etoc@newdisciple + \expandafter\expandafter + \csname l@#1\endcsname\csname Etoc@savedl@#1\endcsname + \Etoc@next + {\ifcase#2\relax + \expandafter\let \csname Etoc@#1@@\endcsname\Etoc@@zero@@ + \expandafter\def \csname Etoc@#1@\endcsname{zero}% + \or + \expandafter\let \csname Etoc@#1@@\endcsname\Etoc@@one@@ + \expandafter\def \csname Etoc@#1@\endcsname{one}% + \or + \expandafter\let \csname Etoc@#1@@\endcsname\Etoc@@two@@ + \expandafter\def \csname Etoc@#1@\endcsname{two}% + \or + \expandafter\let \csname Etoc@#1@@\endcsname\Etoc@@three@@ + \expandafter\def \csname Etoc@#1@\endcsname{three}% + \or + \expandafter\let \csname Etoc@#1@@\endcsname\Etoc@@four@@ + \expandafter\def \csname Etoc@#1@\endcsname{four}% + \or + \expandafter\let \csname Etoc@#1@@\endcsname\Etoc@@five@@ + \expandafter\def \csname Etoc@#1@\endcsname{five}% + \else + \expandafter\let \csname Etoc@#1@@\endcsname\Etoc@@minusone@@ + \expandafter\def \csname Etoc@#1@\endcsname{minusone}% + \fi}} +\etocsetlevel{part}{-1} +\etocsetlevel{chapter}{0} +\etocsetlevel{section}{1} +\etocsetlevel{subsection}{2} +\etocsetlevel{subsubsection}{3} +\etocsetlevel{paragraph}{4} +\etocsetlevel{subparagraph}{5} +\AtBeginDocument{% +\def\Etoc@Lazarus@elta#1\Etoc@Lazarus@eltb#2{\let#2#1\let#1\Etoc@lxyz}% +\Etoc@Lazaruslist +\let\Etoc@savedcontentsline\contentsline +\let\contentsline\Etoc@etoccontentsline +\@ifpackageloaded{hyperref} +{\Etoc@hyperreftrue +\def\Etoc@et@hop#1#2#3#4#5{#1{#3}{#4}{#5}#2}} +{\Etoc@hyperreffalse +\def\Etoc@et@hop#1#2#3#4{#1{#3}{#4}#2}}} + \def\Etoc@swa#1{% + \Etoc@et@hop + {\Etoc@savedcontentsline{#1}} + {\Etoc@prefix\Etoc@contents}} + \def\Etoc@swb#1{% + \Etoc@et@hop + {\Etoc@savedcontentsline{#1}} + {\Etoc@contents}} + \let\etocskipfirstprefix\@thirdofthree +\def\etoc@startlocaltoc#1{% +\let\Etoc@next\relax + \ifEtoc@localtoc + \ifEtoc@notactive + \ifnum #1<\c@etoc@localtocid\relax + \else + \ifEtoc@j \global\let\Etoc@localtop\Etoc@@zero@@ \fi + \ifEtoc@ \global\let\Etoc@localtop\Etoc@@one@@ \fi + \ifEtoc@i \global\let\Etoc@localtop\Etoc@@two@@ \fi + \ifEtoc@ii \global\let\Etoc@localtop\Etoc@@three@@ \fi + \ifEtoc@iii \global\let\Etoc@localtop\Etoc@@four@@ \fi + \ifEtoc@iv \global\let\Etoc@localtop\Etoc@@five@@ \fi + \ifEtoc@v \global\let\Etoc@localtop\Etoc@@six@@ \fi + \def\Etoc@next{\global\Etoc@notactivefalse + \global\Etoc@vfalse + \global\Etoc@ivfalse + \global\Etoc@iiifalse + \global\Etoc@iifalse + \global\Etoc@ifalse + \global\Etoc@false + \global\Etoc@jfalse}% + \fi + \fi\fi +\Etoc@next} +\def\Etoc@setflags #1{% + \ifcase #1\relax + \global\Etoc@vfalse + \global\Etoc@ivfalse + \global\Etoc@iiifalse + \global\Etoc@iifalse + \global\Etoc@ifalse + \global\Etoc@true + \or + \global\Etoc@vfalse + \global\Etoc@ivfalse + \global\Etoc@iiifalse + \global\Etoc@iifalse + \global\Etoc@itrue + \or + \global\Etoc@vfalse + \global\Etoc@ivfalse + \global\Etoc@iiifalse + \global\Etoc@iitrue + \or + \global\Etoc@vfalse + \global\Etoc@ivfalse + \global\Etoc@iiitrue + \or + \global\Etoc@vfalse + \global\Etoc@ivtrue + \or + \global\Etoc@vtrue + \else + \global\Etoc@vfalse + \global\Etoc@ivfalse + \global\Etoc@iiifalse + \global\Etoc@iifalse + \global\Etoc@ifalse + \global\Etoc@false + \global\Etoc@jtrue + \fi} +\def\Etoc@etoccontentsline#1{% + \global\expandafter\let\expandafter\Etoc@tmp\csname Etoc@#1@@\endcsname + \global\Etoc@partfalse + \Etoc@skipthisonefalse + \ifEtoc@hyperref + \def\Etoc@next{\expandafter\@gobbletwo\@gobblefour}% + \else + \def\Etoc@next{\expandafter\@gobble\@gobblefour}% + \fi + \ifEtoc@localtoc + \let\Etoc@prenext\relax + \ifEtoc@stoptoc + \Etoc@skipthisonetrue + \fi + \ifnum\Etoc@tmp<\Etoc@localtop + \def\Etoc@prenext{\global\Etoc@stoptoctrue}% + \Etoc@skipthisonetrue + \fi + \ifEtoc@notactive + \def\Etoc@prenext{\Etoc@setflags{\Etoc@tmp}}% + \Etoc@skipthisonetrue + \fi + \Etoc@prenext + \fi + \ifnum\c@tocdepth<\Etoc@tmp\relax\else + \ifEtoc@skipthisone\else + \global\let\Etoc@next\relax + \ifcase\Etoc@tmp + \ifEtoc@v \Etoc@end@five\fi + \ifEtoc@iv \Etoc@end@four\fi + \ifEtoc@iii \Etoc@end@three\fi + \ifEtoc@ii \Etoc@end@two\fi + \ifEtoc@i \Etoc@end@one\fi + \ifEtoc@ \else \def\Etoc@next{\Etoc@begin@zero}\fi + \gdef\Etoc@contents{\Etoc@contents@zero}% + \gdef\Etoc@prefix{\Etoc@prefix@zero}% + \or + \ifEtoc@v \Etoc@end@five\fi + \ifEtoc@iv \Etoc@end@four\fi + \ifEtoc@iii \Etoc@end@three\fi + \ifEtoc@ii \Etoc@end@two\fi + \ifEtoc@i \else \def\Etoc@next{\Etoc@begin@one}\fi + \gdef\Etoc@contents{\Etoc@contents@one}% + \gdef\Etoc@prefix{\Etoc@prefix@one}% + \or + \ifEtoc@v \Etoc@end@five\fi + \ifEtoc@iv \Etoc@end@four\fi + \ifEtoc@iii \Etoc@end@three\fi + \ifEtoc@ii \else \def\Etoc@next{\Etoc@begin@two}\fi + \gdef\Etoc@contents{\Etoc@contents@two}% + \gdef\Etoc@prefix{\Etoc@prefix@two}% + \or + \ifEtoc@v \Etoc@end@five\fi + \ifEtoc@iv \Etoc@end@four\fi + \ifEtoc@iii \else \def\Etoc@next{\Etoc@begin@three}\fi + \gdef\Etoc@contents{\Etoc@contents@three}% + \gdef\Etoc@prefix{\Etoc@prefix@three}% + \or + \ifEtoc@v \Etoc@end@five\fi + \ifEtoc@iv \else \def\Etoc@next{\Etoc@begin@four}\fi + \gdef\Etoc@contents{\Etoc@contents@four}% + \gdef\Etoc@prefix{\Etoc@prefix@four}% + \or + \ifEtoc@v \else \def\Etoc@next{\Etoc@begin@five}\fi + \gdef\Etoc@contents{\Etoc@contents@five}% + \gdef\Etoc@prefix{\Etoc@prefix@five}% + \else + \ifEtoc@v \Etoc@end@five\fi + \ifEtoc@iv \Etoc@end@four\fi + \ifEtoc@iii \Etoc@end@three\fi + \ifEtoc@ii \Etoc@end@two\fi + \ifEtoc@i \Etoc@end@one\fi + \ifEtoc@ \Etoc@end@zero\fi + \ifEtoc@j \else \def\Etoc@next{\Etoc@begin@minusone}\fi + \global\Etoc@parttrue + \gdef\Etoc@contents{\Etoc@contents@minusone}% + \gdef\Etoc@prefix{\Etoc@prefix@minusone}% + \fi + \Etoc@setflags{\Etoc@tmp}% + \fi\fi + \Etoc@next + \@firstoftwo{\Etoc@swa{#1}}{\Etoc@swb{#1}}} +\def\Etoc@lxyz #1#2{\global\@namedef{etocname }{\leavevmode #1\xspace}% + \global\@namedef{etocpage }{\leavevmode #2\xspace}% + \Etoc@getnb #1\relax\relax\etoc@ + \ifEtoc@number\else\ifEtoc@part + \Etoc@getit #1\hspace\relax\etoc@\fi\fi} +\def\Etoc@getnb #1{\let\Etoc@next\Etoc@getnb@nohyp +\ifEtoc@hyperref\ifx #1\hyper@linkstart + \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 + \let\Etoc@next\Etoc@getit@hyp\fi\fi\Etoc@next #1} +\def\Etoc@getnb@nohyp #1#2#3\etoc@{% +\ifx #1\numberline +\global\@namedef{etocnumber }{\leavevmode #2\xspace}\global\Etoc@numbertrue +\else +\global\@namedef{etocnumber }{\leavevmode\xspace}\global\Etoc@numberfalse +\fi} +\def\Etoc@getnb@hyp #1#2#3#4#5#6\etoc@{% + \def\Etoc@getnbr ##1##2##3\etoc@{% + \ifx ##1\numberline + \global\@namedef{etocnumber }{\leavevmode #1{#2}{#3}{##2}#5\xspace}% + \global\Etoc@numbertrue + \else + \global\@namedef{etocnumber }{\leavevmode\xspace}% + \global\Etoc@numberfalse + \fi}% + \Etoc@getnbr #4\relax\relax\etoc@} +\def\Etoc@getit@nohyp #1\hspace#2#3\etoc@{% + \def\Etoc@getname ##1\hspace\relax\etoc@{% + \global\@namedef{etocname }{\leavevmode ##1\xspace}}% + \ifx \relax#2\else + \global\@namedef{etocnumber }{\leavevmode #1\xspace}% + \global\Etoc@numbertrue + \Etoc@getname #3\etoc@\fi} +\def\Etoc@getit@hyp #1#2#3#4#5#6\etoc@{% + \def\Etoc@getname ##1\hspace\relax\etoc@{% + \global\@namedef{etocname }{\leavevmode #1{#2}{#3}{##1}#5}\xspace}% + \def\Etoc@getnbr ##1\hspace##2##3\etoc@{% + \ifx\relax##2\else + \global\@namedef{etocnumber }{\leavevmode #1{#2}{#3}{##1}#5\xspace}% + \global\Etoc@numbertrue + \Etoc@getname ##3\etoc@\fi}% + \Etoc@getnbr #4\hspace\relax\etoc@} +\edef\etocpage{\noexpand\protect\expandafter\noexpand + \csname etocpage \endcsname} +\edef\etocname{\noexpand\protect\expandafter\noexpand + \csname etocname \endcsname} +\edef\etocnumber{\noexpand\protect\expandafter\noexpand + \csname etocnumber \endcsname} +\@namedef{etocifnumbered }{\ifEtoc@number +\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +\edef\etocifnumbered{\noexpand\protect\expandafter\noexpand + \csname etocifnumbered \endcsname} +\def\Etoc@readtoc#1{% + \ifeof #1 + \let\Etoc@nextread\@gobble + \else + \let\Etoc@nextread\Etoc@readtoc + \read #1 to \Etoc@buffer + \global\Etoc@toctoks=\expandafter\expandafter\expandafter + {\expandafter\the\expandafter\Etoc@toctoks\Etoc@buffer}% + \fi + \Etoc@nextread{#1}% +} +\def\Etoc@starttoc{% +\begingroup +\makeatletter +\chardef\ET@endline\endlinechar +\@ifpackageloaded{hyperref} + {\ifx\hyper@last\@undefined + \ltx@ifpackageloaded {parskip}{\parskip \z@ }{}% + \IfFileExists {\jobname .toc}{\Hy@WarningNoLine {old toc file + detected, not used; run LaTeX again (cheers from etoc)}}{}% + \expandafter\@gobble\fi}{}% +{\IfFileExists{\jobname .toc} + {\endlinechar=-1\relax + \newread\Etoc@tf + \openin\Etoc@tf\@filef@und + \Etoc@readtoc\Etoc@tf + \closein\Etoc@tf} + {\typeout{No file \jobname .toc.}}}% +\endlinechar\ET@endline +\if@filesw \newwrite \tf@toc \immediate +\openout \tf@toc \jobname .toc\relax \fi +\endgroup} +\AtBeginDocument{\Etoc@starttoc} +\def\Etoc@toctoc{% +\ifEtoc@standard +\Etoc@Lazarus +\etocsetstyle{@minusone}{}{}{}{}% +\etocsetstyle{@zero}{}{}{}{}% +\etocsetstyle{@one}{}{}{}{}% +\etocsetstyle{@two}{}{}{}{}% +\etocsetstyle{@three}{}{}{}{}% +\etocsetstyle{@four}{}{}{}{}% +\etocsetstyle{@five}{}{}{}{}% +\else +\let\numberline\@gobble +\fi +\the\Etoc@toctoks +\ifEtoc@notactive\else + \ifEtoc@v \Etoc@end@five\fi + \ifEtoc@iv \Etoc@end@four\fi + \ifEtoc@iii \Etoc@end@three\fi + \ifEtoc@ii \Etoc@end@two\fi + \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} +\def\tableofcontents{\@ifstar{% +\stepcounter{etoc@localtocid}% +\global\Etoc@localtoctrue +\global\let\Etoc@localtop\m@ne +\global\Etoc@stoptocfalse +\global\Etoc@notactivetrue +\addtocontents{toc}{\string\etoc@startlocaltoc +\string{\arabic{etoc@localtocid}\string}}% +\Etoc@tableofcontents +\global\Etoc@notactivefalse +\global\Etoc@stoptocfalse +\global\Etoc@localtocfalse} +{\Etoc@tableofcontents}} +\newcommand\etocsettocstyle[2]{% +\long\def\Etoc@tableofcontents +{\ifnum\c@tocdepth>-2\let\Etoc@@next\@firstofone\else +\let\Etoc@@next\@gobble\fi +\Etoc@@next{\begingroup #1\Etoc@toctoc #2\endgroup}}} +\newcommand\etocsetstyle[5]{% +\long\expandafter\def + \csname Etoc@begin@\csname Etoc@#1@\endcsname\endcsname {#2}% +\long\expandafter\def + \csname Etoc@prefix@\csname Etoc@#1@\endcsname\endcsname {#3}% +\long\expandafter\def + \csname Etoc@contents@\csname Etoc@#1@\endcsname\endcsname {#4}% +\long\expandafter\def + \csname Etoc@end@\csname Etoc@#1@\endcsname\endcsname {#5}} +\def\etocstandardlines{\Etoc@standardtrue} +\newcommand\etocfontminusone{\normalfont \large \bfseries} +\newcommand\etocfontzero{\normalfont \normalsize \bfseries} +\newcommand\etocfontone{\normalfont \normalsize \bfseries} +\newcommand\etocfonttwo{\normalfont \normalsize} +\newcommand\etocfontthree{\normalfont \footnotesize} +\newcommand\etocfontfour{\normalfont \footnotesize} +\newcommand\etocfontfive{\normalfont \footnotesize} +\newcommand\etocsepminusone{4ex \@plus .5ex \@minus .5ex} +\newcommand\etocsepzero{2.5ex \@plus .4ex \@minus .4ex} +\newcommand\etocsepone{1.5ex \@plus .3ex \@minus .3ex} +\newcommand\etocseptwo{1ex \@plus .15ex \@minus .15ex} +\newcommand\etocsepthree{.25ex \@plus .05ex \@minus .05ex} +\newcommand\etocbaselinespreadminusone{1} +\newcommand\etocbaselinespreadzero{1} +\newcommand\etocbaselinespreadone{1} +\newcommand\etocbaselinespreadtwo{1} +\newcommand\etocbaselinespreadthree{.9} +\newcommand\etocminusonelrmargins{1em} +\newcommand\etoctoclineleaders +{\hbox{\normalfont\normalsize\hbox to 2ex {\hfil.\hfil}}} +\newcommand\etocabbrevpagename{p.~} +\def\etocetoclines{\Etoc@standardfalse +\etocsetstyle{@minusone}{\addpenalty\@highpenalty}{} +{\begingroup \etocfontminusone + \addvspace{\etocsepminusone}% + \parindent \z@ + \leftskip \etocminusonelrmargins + \rightskip \etocminusonelrmargins + \parfillskip \@flushglue + \vbox{\etocifnumbered{\etocnumber.~}{}\etocname + \baselineskip\etocbaselinespreadminusone\baselineskip\par}% + \addvspace{\etocsepzero}\nobreak +\endgroup} +{\addpenalty\@secpenalty}% +\etocsetstyle{@zero} +{\addpenalty\@highpenalty}{} +{\begingroup + \etocfontzero + \addvspace{\etocsepzero}% + \parindent \z@ \parfillskip \@flushglue + \vbox{\etocifnumbered{\etocnumber\space}{}\etocname + \baselineskip\etocbaselinespreadzero\baselineskip\par}% + \addvspace{\etocsepone}\addpenalty\@itempenalty +\endgroup} +{\addpenalty\@secpenalty}% +\etocsetstyle{@one} +{\addpenalty\@medpenalty} +{} +{\begingroup\etocfontone +\addvspace{\etocsepone}% +\parindent \z@ \parfillskip \z@ +\setbox\z@\vbox{\parfillskip\@flushglue +\etocname\par\setbox\tw@\lastbox +\global\setbox\@ne\hbox{\unhbox\tw@}}% +\dimen\z@=\wd\@ne +\setbox\z@=\etoctoclineleaders +\advance\dimen\z@\wd\z@ +\etocifnumbered +{\setbox\tw@\hbox{\etocfonttwo\etocnumber, \etocabbrevpagename\etocpage}} +{\setbox\tw@\hbox{\etocfonttwo\etocabbrevpagename\etocpage}}% +\advance\dimen\z@\wd\tw@ +\ifdim\dimen\z@ < \linewidth + \vbox{\etocname\nobreak + \leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadone\baselineskip\par} + \else + \vbox{\etocname\nobreak + \ifdim\wd\@ne<\linewidth\leaders\copy\z@\hfil\break\fi + \hbox{}\leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadone\baselineskip\par} +\fi +\addvspace{\etocseptwo}\addpenalty\@itempenalty +\endgroup} +{\addpenalty\@secpenalty}% +\etocsetstyle{@two} +{\addpenalty\@medpenalty} +{} +{\begingroup\etocfonttwo +\addvspace{\etocseptwo}% +\parindent \z@ \parfillskip \z@ +\setbox\z@\vbox{\parfillskip\@flushglue +\etocname\par\setbox\tw@\lastbox +\global\setbox\@ne\hbox{\unhbox\tw@}}% +\dimen\z@=\wd\@ne +\setbox\z@=\etoctoclineleaders +\advance\dimen\z@\wd\z@ +\etocifnumbered +{\setbox\tw@\hbox{\etocnumber, \etocabbrevpagename\etocpage}} +{\setbox\tw@\hbox{\etocabbrevpagename\etocpage}}% +\advance\dimen\z@\wd\tw@ +\ifdim\dimen\z@ < \linewidth + \vbox{\etocname\nobreak + \leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadtwo\baselineskip\par} + \else + \vbox{\etocname\nobreak + \ifdim\wd\@ne<\linewidth\leaders\copy\z@\hfil\break\fi + \hbox{}\leaders\box\z@\hfil\box\tw@ + \baselineskip\etocbaselinespreadtwo\baselineskip\par} +\fi +\addvspace{\etocsepthree}\addpenalty\@itempenalty +\endgroup} +{\addpenalty\@secpenalty}% +\etocsetstyle{@three} +{\nobreak +\etocfontthree +\addvspace{\etocsepthree}% +\nointerlineskip\noindent +\etocskipfirstprefix} +{\allowbreak\,--\,} +{\etocname} +{\unskip.\hfil\begingroup +\baselineskip\etocbaselinespreadthree\baselineskip +\par\endgroup +\addpenalty{-\@highpenalty}}% +\etocsetstyle{@four}{}{}{}{}% +\etocsetstyle{@five}{}{}{}{}% +} +\newcommand\etocmarkboth[1][\contentsname]{% + \@mkboth {\MakeUppercase #1} + {\MakeUppercase #1}} +\def\etoc@article@tochead#1{\section *{#1\@mkboth + {\MakeUppercase{#1}} + {\MakeUppercase{#1}}}} +\def\etoc@article@tochead@nomarks#1{\section *{#1}} +\def\etoc@book@tochead#1{\chapter *{#1\@mkboth + {\MakeUppercase{#1}} + {\MakeUppercase{#1}}}} +\def\etoc@book@tochead@nomarks#1{\chapter *{#1}} +\let\etoc@standard@tochead\etoc@article@tochead +\let\etoc@standard@tochead@nomarks\etoc@article@tochead@nomarks +\@ifclassloaded{book}{% +\let\etoc@standard@tochead\etoc@book@tochead +\let\etoc@standard@tochead@nomarks\etoc@book@tochead@nomarks}{} +\@ifclassloaded{report}{% +\let\etoc@standard@tochead\etoc@book@tochead +\let\etoc@standard@tochead@nomarks\etoc@book@tochead@nomarks}{} +\newcommand\etocstandardheading[1]{% +\etoc@standard@tochead{#1}} +\newcommand\etocstandardheadingnomarks[1]{% +\etoc@standard@tochead@nomarks{#1}} +\newcommand\etocabovetocskip{3.5ex \@plus 1ex \@minus .2ex} +\newcommand\etocbelowtocskip{3.5ex \@plus 1ex \@minus .2ex} +\newcommand\etoccolumnsep{2em} +\newcommand\etocmulticolsep{0ex} +\newcommand\etocmulticolpretolerance{-1} +\newcommand\etocmulticoltolerance{200} +\newcommand\etocmulticolstyle[2][2]{% +\etocsettocstyle + {\addvspace{\etocabovetocskip}% + \ifnum #1>\@ne\let\Etoc@next\@firstoftwo + \else \let\Etoc@next\@secondoftwo\fi + \Etoc@next{% + \multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}[#2\addvspace{\etocsepminusone}]} + {#2\addvspace{\etocsepminusone}\pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}} + {\ifnum #1>\@ne\let\Etoc@next\@firstofone + \else \let\Etoc@next\@gobble\fi + \Etoc@next{\end{multicols}}% + \addvspace{\etocbelowtocskip}}} +\newcommand\etocinnertopsep{2ex} +\newcommand\etocinnerbottomsep{3.5ex} +\newcommand\etocinnerleftsep{2em} +\newcommand\etocinnerrightsep{2em} +\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\etoc@ruledheading[1]{% + \hbox to \linewidth{% + \hfil #1\hfil\hskip-\linewidth + {\etoctoprulecolorcmd\leaders\etoctoprule\hfil}% + \phantom{#1}% + {\etoctoprulecolorcmd\leaders\etoctoprule\hfil}}% + \nointerlineskip\vskip\etocinnertopsep} +\newcommand\etocruledstyle[2][2]{% +\etocsettocstyle + {\addvspace{\etocabovetocskip}% + \ifnum #1>\@ne\let\Etoc@next\@firstoftwo + \else \let\Etoc@next\@secondoftwo\fi + \Etoc@next + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}[\etoc@ruledheading{#2}]} + {\etoc@ruledheading{#2}\nobreak + \pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}} + {\ifnum #1>\@ne\let\Etoc@next\@firstofone + \else \let\Etoc@next\@gobble\fi + \Etoc@next{\end{multicols}}% + \addvspace{\etocbelowtocskip}}} +\newcommand\etocframedstyle[2][2]{% +\etocsettocstyle{% + \addvspace{\etocabovetocskip}% + \sbox\z@{#2}\dimen\z@\dp\z@ + \ifdim\wd\z@<\linewidth\dp\z@\z@\else\dimen\z@\z@\fi + \hbox to \linewidth{% + \hfil\copy\z@\hfil\hskip-\linewidth + {\etoctoprulecolorcmd\leaders\etoctoprule\hfil}% + \phantom{\box\z@}% + {\etoctoprulecolorcmd\leaders\etoctoprule\hfil}}% + \nointerlineskip\nobreak + \hbox to \linewidth + \bgroup + {\etocleftrulecolorcmd\etocleftrule}% + \kern\etocinnerleftsep + \vbox\bgroup + \kern\dimen\z@ + \vskip\etocinnertopsep + \hbox\bgroup + \setbox\z@\hbox{\etocleftrule\etocrightrule}% + \dimen\z@\linewidth\advance\dimen\z@-\wd\z@ + \advance\dimen\z@-\etocinnerleftsep + \advance\dimen\z@-\etocinnerrightsep + \begin{minipage}{\dimen\z@} + \ifnum #1>\@ne\let\Etoc@next\@firstoftwo + \else \let\Etoc@next\@secondoftwo\fi + \Etoc@next + {\multicolpretolerance\etocmulticolpretolerance + \multicoltolerance\etocmulticoltolerance + \setlength{\columnsep}{\etoccolumnsep}% + \setlength{\multicolsep}{\etocmulticolsep}% + \begin{multicols}{#1}} + {\pretolerance\etocmulticolpretolerance + \tolerance\etocmulticoltolerance}} + {\ifnum #1>\@ne\let\Etoc@next\@firstofone + \else \let\Etoc@next\@gobble\fi + \Etoc@next{\end{multicols}\unskip}% + \end{minipage}\egroup + \vskip\etocinnerbottomsep + \egroup\kern\etocinnerrightsep + \etocrightrulecolorcmd\etocrightrule\egroup + \nointerlineskip\nobreak + \hbox to \linewidth{\etocbottomrulecolorcmd + \leaders\etocbottomrule\hfill} + \addvspace{\etocbelowtocskip}}} +\newcommand\etoc@multicoltoc[2][2]{% +\begingroup +\ifnum\c@tocdepth>-2\relax +\etocmulticolstyle[#1]{#2}% + \ifEtoc@star + \def\Etoc@next{\tableofcontents*}% + \else\def\Etoc@next{\tableofcontents}% + \fi +\Etoc@next +\fi\endgroup} +\newcommand\etoc@ruledtoc[2][2]{% +\begingroup +\ifnum\c@tocdepth>-2\relax +\etocruledstyle[#1]{#2}% + \ifEtoc@star + \def\Etoc@next{\tableofcontents*}% + \else + \def\Etoc@next{\tableofcontents}% + \fi +\Etoc@next +\fi\endgroup} +\newcommand\etoc@framedtoc[2][2]{% +\begingroup +\ifnum\c@tocdepth>-2\relax +\etocframedstyle[#1]{#2}% + \ifEtoc@star + \def\Etoc@next{\tableofcontents*}% + \else + \def\Etoc@next{\tableofcontents}% + \fi +\Etoc@next +\fi\endgroup} +\def\etocmulticol{\@ifstar{\global\Etoc@startrue\etoc@multicoltoc} +{\global\Etoc@starfalse\etoc@multicoltoc}} +\def\etocruled{\@ifstar{\global\Etoc@startrue\etoc@ruledtoc} +{\global\Etoc@starfalse\etoc@ruledtoc}} +\def\etocframed{\@ifstar{\global\Etoc@startrue\etoc@framedtoc} +{\global\Etoc@starfalse\etoc@framedtoc}} +\etocetoclines +\etocmulticolstyle{\etocstandardheading\contentsname} +\endinput +%% +%% End of file `etoc.sty'. |