%% LaTeX2e file `etocsnippet-06.tex'
%% generated by the `filecontentshere' environment
%% from source `etoc' on 2023/01/21.
%%
\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
