Debian Codegraph @

texmf-dist/doc/latex/etoc/etocsnippet-03.tex

raw
1 %% LaTeX2e file `etocsnippet-03.tex'
2 %% generated by the `filecontentsdef' environment
3 %% from source `etoc' on 2026/05/05.
4 %%
5 \begin{figure}[ht!]
6 \centering
7 \begingroup
8 % this is a KOMA-script specific customization
9 \DeclareTOCStyleEntry[numwidth=2em,indent=0pt]{tocline}{section}
10 \DeclareTOCStyleEntry[numwidth=3.2em,indent=2em]{tocline}{subsection}
11 \etocstandardlines % <-- use the defaults from the document class
12 \renewcommand{\etocbkgcolorcmd}{\color{green!5}}
13 \renewcommand{\etocbelowtocskip}{0pt\relax}
14 \fboxsep1ex
15 \etocframedstyle [1]{\fbox{\makebox[.5\linewidth]{\etocfontminusone
16 I am from \hyperref[toc:part:styling]{far away}}}}
17 \etocsetnexttocdepth{subsection}
18 \tableofcontents \label{toc:d} \ref{toc:part:styling}
19 \endgroup
20 \end{figure}