blob: ff0a8ca6e6197b724c3cf2959cf4459e17cc9620 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
%% LaTeX2e file `etocsnippet-07.tex'
%% generated by the `filecontentshere' environment
%% from source `etoc' on 2023/10/29.
%%
\makeatletter
\newcommand{\MyLocalTOC}[1][section]{%
\begingroup
\etocsetstyle{section}{}{}
{\l@section{\numberline{\etocnumber}\etocname}{\etocpage}}{}%
\etocsetstyle{subsection}{}{}
{\l@subsection{\numberline{\etocnumber}\etocname}{\etocpage}}{}%
\etocsetstyle{subsubsection}{}{}
{\l@subsubsection{\numberline{\etocnumber}\etocname}{\etocpage}}{}%
% etc... if further sectioning units are needed
% (i.e. not excluded by tocdepth and actually there in document)
% Here #1 defaults to section, meaning this is appropriate
% for local TOC in a chapter
\etocsettocstyle{\@nameuse{#1}*{Local contents}}
{}
%
\localtableofcontents
\endgroup}
\makeatother
|