summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/etoc/etocsnippet-21-B.tex
blob: be738670f6b3f42a1dafe7e9782d4793e377ce9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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