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