diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/etoc/etocsnippet-28.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/etoc/etocsnippet-28.tex | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/etoc/etocsnippet-28.tex b/Master/texmf-dist/doc/latex/etoc/etocsnippet-28.tex new file mode 100644 index 00000000000..6b4ee58302d --- /dev/null +++ b/Master/texmf-dist/doc/latex/etoc/etocsnippet-28.tex @@ -0,0 +1,48 @@ +%% LaTeX2e file `etocsnippet-28.tex' +%% generated by the `filecontentshere' environment +%% from source `etoc' on 2019/11/17. +%% +% \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} |