| 1 |
%% LaTeX2e file `etocsnippet-11.tex' |
| 2 |
%% generated by the `filecontentshere' environment |
| 3 |
%% from source `etoc' on 2026/05/05. |
| 4 |
%% |
| 5 |
\begin{figure}[htbp!]\centering |
| 6 |
\colorlet{subsecnum}{black} |
| 7 |
\colorlet{secbackground}{green!30} |
| 8 |
\colorlet{tocbackground}{red!20!green!20} |
| 9 |
|
| 10 |
\renewcommand{\etocbkgcolorcmd}{\color{tocbackground}} |
| 11 |
\renewcommand{\etocleftrulecolorcmd}{\color{tocbackground}} |
| 12 |
\renewcommand{\etocrightrulecolorcmd}{\color{tocbackground}} |
| 13 |
\renewcommand{\etocbottomrulecolorcmd}{\color{tocbackground}} |
| 14 |
\renewcommand{\etoctoprulecolorcmd}{\color{tocbackground}} |
| 15 |
|
| 16 |
\renewcommand{\etocleftrule}{\vrule width 3cm} |
| 17 |
\renewcommand{\etocrightrule}{\vrule width 1cm} |
| 18 |
\renewcommand{\etocbottomrule}{\hrule height 12pt} |
| 19 |
\renewcommand{\etoctoprule}{\hrule height 12pt} |
| 20 |
|
| 21 |
\renewcommand{\etocinnertopsep}{0pt} |
| 22 |
\renewcommand{\etocinnerbottomsep}{0pt} |
| 23 |
\renewcommand{\etocinnerleftsep}{0pt} |
| 24 |
\renewcommand{\etocinnerrightsep}{0pt} |
| 25 |
|
| 26 |
\newcommand\shiftedwhiterule[2]{% |
| 27 |
\hbox to \linewidth{\color{white}% |
| 28 |
\hskip#1\leaders\vrule height1pt\hfil}\nointerlineskip |
| 29 |
\vskip#2} |
| 30 |
|
| 31 |
\etocsetlinestyle{subsubsection} |
| 32 |
{\etocskipfirstprefix} |
| 33 |
{\shiftedwhiterule{\leftskip}{6pt}} |
| 34 |
{\sffamily\footnotesize |
| 35 |
\leftskip2.3cm\hangindent1cm\rightskip.5cm\relax |
| 36 |
\makebox[1cm][l]{\color{subsecnum}\etocnumber}% |
| 37 |
\color{black}\etocname |
| 38 |
\nobreak\leaders\hbox to.2cm{\hss.}\hfill |
| 39 |
\rlap{\makebox[.5cm][r]{\etocpage\hspace{.1cm}}}\par |
| 40 |
\nointerlineskip\vskip3pt} |
| 41 |
{} |
| 42 |
|
| 43 |
\etocsetlinestyle{subsection} |
| 44 |
{\etocskipfirstprefix} |
| 45 |
{\shiftedwhiterule{1.5cm}{6pt}} |
| 46 |
{\sffamily\small |
| 47 |
\leftskip1.5cm\hangindent.8cm\rightskip.5cm\relax |
| 48 |
\makebox[.75cm][l]{\color{subsecnum}\etocnumber}% |
| 49 |
\color{black}\etocname |
| 50 |
\nobreak\leaders\hbox to.2cm{\hss.}\hfill |
| 51 |
\rlap{\makebox[.5cm][r]{\etocpage\hspace{.1cm}}}\par |
| 52 |
\nointerlineskip\vskip3pt} |
| 53 |
{} |
| 54 |
|
| 55 |
\newcommand{\coloredstuff}[2]{% |
| 56 |
\leftskip0pt\rightskip0pt\parskip0pt |
| 57 |
\fboxsep0pt % \colorbox uses \fboxsep also when no frame! |
| 58 |
\noindent\colorbox{secbackground} |
| 59 |
{\parbox{\linewidth}{% |
| 60 |
\vskip5pt |
| 61 |
{\noindent\color{#1}#2\par}\nointerlineskip |
| 62 |
\vskip3pt}}% |
| 63 |
\par\nointerlineskip} |
| 64 |
|
| 65 |
\etocsetlinestyle{section} |
| 66 |
{\coloredstuff{blue}{\hfil \bfseries\large Contents of Part One\hfil}} |
| 67 |
{\vskip3pt\sffamily\small} |
| 68 |
{\coloredstuff{blue} |
| 69 |
{\leftskip1.5cm\rightskip.5cm\parfillskip-\rightskip |
| 70 |
\makebox[0pt][r]{\makebox[.5cm][l]{\etocnumber}}% |
| 71 |
\etocname\nobreak\hfill\makebox[.5cm][r]{\etocpage\hspace{.1cm}}}% |
| 72 |
\vskip6pt} |
| 73 |
{} |
| 74 |
|
| 75 |
\etocframedstyle[1]{} |
| 76 |
\tableofcontents \label{toc:floating} \ref{toc:part:styling} |
| 77 |
\vspace{-\baselineskip} |
| 78 |
\centeredline{|\tableofcontents \ref{toc:part:styling}| |
| 79 |
(\emph{cf.} \hyperref[toc:clone]{this other toc})} |
| 80 |
\end{figure} |