summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-B.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/etoc/etocsnippet-21-B.tex')
-rw-r--r--Master/texmf-dist/doc/latex/etoc/etocsnippet-21-B.tex49
1 files changed, 49 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-B.tex b/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-B.tex
new file mode 100644
index 00000000000..be738670f6b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-B.tex
@@ -0,0 +1,49 @@
+%% LaTeX2e file `etocsnippet-21-B.tex'
+%% generated by the `filecontentshere' environment
+%% from source `etoc' on 2019/11/17.
+%%
+\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