blob: a69f8ef6b20085c15f5e67f877bb5a4a7658fccb (
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
|
%% LaTeX2e file `etocsnippet-06.tex'
%% generated by the `filecontentshere' environment
%% from source `etoc' on 2023/01/15.
%%
\makeatletter
\newcommand*{\MyQuasiStandardTOC}[1]{%
\begingroup
\etocsetstyle{section}
{}
{\ifnum\etocthenumber=4
\etocsetstyle{subsection}
{\par\nopagebreak\begingroup
\leftskip1.5em \rightskip\@tocrmarg
\parfillskip \@flushglue
\parindent 0pt
\normalfont\normalsize\rmfamily\itshape
\etocskipfirstprefix}
{\allowbreak\,--\,}
{\etocname\ \textup{(\etocnumber)}}
{.\par\endgroup}%
\else
\etocsetstyle{subsection}
{}%
{}%
{\l@subsection{\numberline{\etocnumber}\etocname}{\etocpage}}%
{}%
\fi
}% prefix for section sets the style dynamically for subsections!
{\l@section{\numberline{{\color{cyan}\etocthenumber}}\etocname}{\etocpage}}%
{}%
\etocstandarddisplaystyle
\etocsetnexttocdepth {2}%
\tableofcontents #1
\endgroup
}
\makeatother
|