| 1 |
%% LaTeX2e file `etocsnippet-24.tex' |
| 2 |
%% generated by the `filecontentsdef' environment |
| 3 |
%% from source `etoc' on 2026/05/05. |
| 4 |
%% |
| 5 |
\etocsetnexttocdepth {all} |
| 6 |
\begingroup |
| 7 |
\parindent 0pt \leftskip 0cm \rightskip .75cm \parfillskip -\rightskip |
| 8 |
\newcommand*{\EndParWithPageNumberInMargin} |
| 9 |
{\nobreak\hfill |
| 10 |
% I initially added \etocnoprotrusion after \etocpage, but |
| 11 |
% finally switched to using monospace font for page number, |
| 12 |
% and it seems to have deactivated the protrusion anyhow. |
| 13 |
\makebox[0.75cm][r]{\mdseries\normalsize\ttfamily\etocpage}% |
| 14 |
\par} |
| 15 |
\renewcommand*\etoctoclineleaders |
| 16 |
{\hbox{\normalfont\normalsize\hbox to .75ex {\hss.\hss}}} |
| 17 |
\newcommand*{\EndParWithPageNumberInMarginAndLeaders} |
| 18 |
{\nobreak\leaders\etoctoclineleaders\hfill |
| 19 |
\makebox[0.75cm][r]{\mdseries\normalsize\ttfamily\etocpage}% |
| 20 |
\par } |
| 21 |
\etocsetlinestyle {part} |
| 22 |
{} |
| 23 |
{\leavevmode\leftskip 1cm\relax} |
| 24 |
{\bfseries\large\llap{\makebox[1cm][r]{\etocnumber\ \ }}% |
| 25 |
\etocname\EndParWithPageNumberInMargin\smallskip} |
| 26 |
{} |
| 27 |
\etocsetlinestyle {section} |
| 28 |
{} |
| 29 |
{\leavevmode\leftskip 1.75cm\relax} |
| 30 |
{\bfseries\normalsize\llap{\makebox[.75cm][l]{\etocnumber}}% |
| 31 |
\etocname\EndParWithPageNumberInMarginAndLeaders} |
| 32 |
{} |
| 33 |
\etocsetlinestyle {subsection} |
| 34 |
{} |
| 35 |
{\leavevmode\leftskip 2.75cm\relax } |
| 36 |
{\mdseries\normalsize\llap{\makebox[1cm][l]{\etocnumber}}% |
| 37 |
\etocname\EndParWithPageNumberInMarginAndLeaders} |
| 38 |
{} |
| 39 |
\etocsetlinestyle {subsubsection} |
| 40 |
{} |
| 41 |
{\leavevmode\leftskip 4cm\relax } |
| 42 |
{\mdseries\normalsize\llap{\makebox[1.25cm][l]{\etocnumber}}% |
| 43 |
\etocname\EndParWithPageNumberInMarginAndLeaders} |
| 44 |
{} |
| 45 |
\etocsetlinestyle {paragraph} |
| 46 |
{} |
| 47 |
{\leavevmode\leftskip 5.5cm\relax } |
| 48 |
{\mdseries\normalsize\llap{\makebox[1.5cm][l]{\etocnumber}}% |
| 49 |
\etocname\EndParWithPageNumberInMarginAndLeaders} |
| 50 |
{} |
| 51 |
\etocsettagdepth {preamble} {part} |
| 52 |
\etocsettagdepth {overview} {part} |
| 53 |
\etocsettagdepth {styling} {part} |
| 54 |
\etocsettagdepth {control} {subsubsection} |
| 55 |
\etocsettagdepth {examples} {part} |
| 56 |
\etocsettagdepth {advanced} {part} |
| 57 |
\etocsettagdepth {etocandworld}{part} |
| 58 |
\etocsettagdepth {code} {paragraph} |
| 59 |
\renewcommand\etoctoprule {\hrule height 3pt\relax } |
| 60 |
\renewcommand\etoctoprulecolorcmd {\color{blue}} |
| 61 |
\renewcommand\etocaftercontentshook |
| 62 |
{\medskip\begingroup \color{blue}\hrule height 3pt \endgroup } |
| 63 |
\etocruledstyle [1]{\Large\bfseries |
| 64 |
\fbox{\makebox[8cm]{A TOC using depth tags}}} |
| 65 |
\sloppy |
| 66 |
\etocobeydepthtags % let's not forget to activate this (default anyhow) |
| 67 |
\tableofcontents |
| 68 |
\endgroup |