summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/etoc/etocsnippet-15.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/etoc/etocsnippet-15.tex')
-rw-r--r--Master/texmf-dist/doc/latex/etoc/etocsnippet-15.tex62
1 files changed, 17 insertions, 45 deletions
diff --git a/Master/texmf-dist/doc/latex/etoc/etocsnippet-15.tex b/Master/texmf-dist/doc/latex/etoc/etocsnippet-15.tex
index 5c6619b2ebb..52aab42673c 100644
--- a/Master/texmf-dist/doc/latex/etoc/etocsnippet-15.tex
+++ b/Master/texmf-dist/doc/latex/etoc/etocsnippet-15.tex
@@ -1,48 +1,20 @@
%% LaTeX2e file `etocsnippet-15.tex'
%% generated by the `filecontentshere' environment
-%% from source `etoc' on 2023/01/21.
+%% from source `etoc' on 2023/03/02.
%%
-% \newtoks\treetok % put this (uncommented) preferably in the preamble
-% \newtoks\sectiontok
-% \newtoks\subsectiontok
-\newcommand*{\treenode}{}
-
-\newcommand*{\appendchildtree}[2]{% token list t1 becomes: t1 child {t2}
- \edef\tmp{\the#1 child {\the#2}}%
- #1\expandafter{\tmp}%
-}
-\newcommand*{\preparetreenode}{%
- \tmptok\expandafter{\etocthelinkednumber}% expanded one time (mandatory)
- \edef\treenode{node {\the\tmptok}}%
-}
-
-\etocsetstyle{section}
- {\etocskipfirstprefix}
- {\appendchildtree\treetok\sectiontok}
- {\preparetreenode \sectiontok\expandafter{\treenode}}
- {\appendchildtree\treetok\sectiontok}
-
-\etocsetstyle{subsection}
- {\etocskipfirstprefix}
- {\appendchildtree\sectiontok\subsectiontok}
- {\preparetreenode \subsectiontok\expandafter{\treenode}}
- {\appendchildtree\sectiontok\subsectiontok}
-
-\etocsettocstyle
- {\treetok{\node {\hyperref[part:overview]{Overview}}}}
- {\global\appendtotok\treetok{ ;}}
-
-\begin{figure}[thbp!]\centering
- \etocsetnexttocdepth{subsection}
- \tableofcontents \label{toc:molecule} \ref{toc:overview}
- \hypersetup{hidelinks}%
- \begin{tikzpicture}
- [grow cyclic,
- level 1/.style={level distance=4cm,sibling angle=72},
- level 2/.style={level distance=2cm,sibling angle=60},
- every node/.style={ball color=red,circle,text=SkyBlue},
- edge from parent path={[dashed,very thick,color=cyan]
- (\tikzparentnode) --(\tikzchildnode)}]
- \the\treetok
- \end{tikzpicture}
-\end{figure}
+ \etocsetnexttocdepth{2} % sections are at level 1 and will show up
+\begingroup
+ \etocsetlevel{exercise}{2} % but:
+ \etocsetlevel{chapter}{3} % no chapters
+ \etocsetlevel{subsection}{3} % no subsections
+ \etocsetlevel{part}{3} % no parts
+ \etocsetstyle{exercise}{}{} % \etocname = exercise number
+ {\noindent\etocname\strut\leaders\etoctoclineleaders\hfill\etocpage\par}
+ {\pagebreak[2]\vskip\baselineskip}
+ \etocsetstyle{section}{}{}
+ {\noindent\strut{\bfseries\large\etocnumber\hskip.5em\etocname}\par
+ \nopagebreak[3]}{}
+ \etocruledstyle[4]{\Large\bfseries List of the exercises}
+ \setlength{\columnseprule}{.4pt}
+ \tableofcontents
+\endgroup