| 1 |
%% LaTeX2e file `etocsnippet-14.tex' |
| 2 |
%% generated by the `filecontentshere' environment |
| 3 |
%% from source `etoc' on 2026/05/05. |
| 4 |
%% |
| 5 |
< in the preamble > |
| 6 |
\newcounter{visibletoc} |
| 7 |
\renewcommand{\etocaftertitlehook} |
| 8 |
{\stepcounter{visibletoc}\etoctoccontentsline{visibletoc}{\thevisibletoc}} |
| 9 |
\etocsetlevel{visibletoc}{\etocthemaxlevel} |
| 10 |
\begin{document} |
| 11 |
< document body > |
| 12 |
\subsection{Surprising uses of etoc} |
| 13 |
\begingroup |
| 14 |
\etocinline |
| 15 |
\etocsetlevel{part}{1} |
| 16 |
% \etocsetlevel{chapter}{1} % (no chapters in scrartcl class) |
| 17 |
\etocsetlevel{visibletoc}{0} |
| 18 |
\etocsetlinestyle{visibletoc} |
| 19 |
{\etocskipfirstprefix}{, }{{\color{niceone}\etocname}}{} |
| 20 |
\etocsettocstyle{}{} % don't set any title, rules or frame or multicol! |
| 21 |
\etocsetnexttocdepth{visibletoc} % display only the `visibletoc' entries from .toc |
| 22 |
|
| 23 |
Here is the numbered and linked list of all tables of contents which are |
| 24 |
displayed within this document: \tableofcontents. |
| 25 |
\endgroup |