summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/etoc/etocsnippet-09.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/etoc/etocsnippet-09.tex')
-rw-r--r--Master/texmf-dist/doc/latex/etoc/etocsnippet-09.tex78
1 files changed, 46 insertions, 32 deletions
diff --git a/Master/texmf-dist/doc/latex/etoc/etocsnippet-09.tex b/Master/texmf-dist/doc/latex/etoc/etocsnippet-09.tex
index 853659bfb8a..09b96ec99b7 100644
--- a/Master/texmf-dist/doc/latex/etoc/etocsnippet-09.tex
+++ b/Master/texmf-dist/doc/latex/etoc/etocsnippet-09.tex
@@ -1,35 +1,49 @@
%% LaTeX2e file `etocsnippet-09.tex'
%% generated by the `filecontentshere' environment
-%% from source `etoc' on 2023/01/21.
+%% from source `etoc' on 2023/03/02.
%%
-\etocdefaultlines
-\begingroup
-\renewcommand{\etoccolumnsep}{2em}
-\renewcommand{\etocinnerleftsep}{1.5em}
-\renewcommand{\etocinnerrightsep}{1.5em}
-% 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 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
-\fboxrule1pt
-\renewcommand{\etocbelowtocskip}{0pt\relax}
-\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
- one page. It has the label |toc:b|.}}}
-\begin{figure}[ht!]
- \centering
-\tableofcontents \label{toc:b} \ref{toc:globalcmds}
-\end{figure}
-\endgroup
+\makeatletter
+\newcommand*\TOClocalstyle {%
+\etocsettocstyle
+ {\if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi
+ \setbox\TOCleaderbox\hbox to \TOCleaderboxwidth{\hss.\hss}%
+ \parindent\z@
+ \dimen@ 2.25em % for left indenting
+ \section *{\kern\dimen@ % use of \dimen@ works here by sheer luck
+ \contentsname
+ % un-comment this if marks are wanted:
+ %\@mkboth {\MakeUppercase \contentsname}{\MakeUppercase \contentsname}%
+ }% end of \section
+ \parskip \z@skip
+ \vspace{-1.25\baselineskip}% somewhat ad hoc
+ \leftskip 2.25em
+ \rightskip 4.5em
+ \advance\rightskip-\TOCrightmargin\relax
+ \leavevmode\leaders\hrule\@height\p@\hfill\kern\z@\par
+ \rightskip 4.5em
+ \parfillskip -\TOCrightmargin\relax }
+ {\nobreak\vskip-.5\baselineskip
+ \leavevmode\leaders\hrule\@height\p@\hfill\kern\z@\par
+ \bigskip
+ \if@restonecol \twocolumn \fi }%
+%
+\etocsetstyle{section}
+ {\advance\leftskip\TOCnumwidthC\relax}
+ {\addpenalty \@secpenalty
+ \etociffirst{}{\addvspace{\TOCmedvskip}}%
+ \leavevmode
+ {\interlinepenalty\@M
+ \bfseries\etocifnumbered
+ {\llap{\makebox[\TOCnumwidthC][l]{\etocnumber}}}
+ {\advance\leftskip-\TOCnumwidthC}%
+ \etocname\nobreak\hfil\makebox[-\parfillskip][r]{\etocpage}\par }%
+ \penalty \@highpenalty }
+ {}
+ {\advance\leftskip-\TOCnumwidthC\relax}%
+% the rest is identical with code for global tocs:
+ \TOCsetlinestyle {subsection} {\TOCnumwidthD}%
+ \TOCsetlinestyle {subsubsection}{\TOCnumwidthE}%
+ \TOCsetlinestyle {paragraph} {\TOCnumwidthF}%
+ \TOCsetlinestyle {subparagraph} {\TOCnumwidthG}%
+}% end of \TOClocalstyle
+\makeatother