diff options
Diffstat (limited to 'macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex')
-rw-r--r-- | macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex index ef1ebcf055..48af585551 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex @@ -20,6 +20,9 @@ Particularly, they can be used for Typically, these options may generate counters and alike. It is \textbf{strongly} recommended that you use initialization options inside the preamble only. Otherwise, you may get trouble when using \LaTeX's |\include| features. +Also, it is recommended to generate new environments and commands with these +options \emph{after} |hyperref| is loaded to avoid warnings about +\emph{duplicate identifiers}. \end{marker} @@ -337,16 +340,43 @@ be redefined or a new \meta{type} can be assigned. \end{newTcbKey} -\begin{docCommand}{tcblistof}{\oarg{macro}\marg{name}\marg{title text}} +\clearpage +\begin{docCommand}[doc updated=2021-05-20]{tcblistof}{\oarg{macro}\marg{name}\oarg{short}\marg{title text}} Displays the generated list of |tcolorbox|es with the given \meta{name}. -The heading is generated by \meta{macro}\marg{title text} where \texttt{\textbackslash section} -is the default setting for \meta{macro}.\par +The heading is generated by \meta{macro}\oarg{short}\marg{title text} where \texttt{\textbackslash section} +is the default setting for \meta{macro}. +Here, as usual, \meta{title text} is the title of the section or chapter +while \meta{short} is a shorter title for headings and table of contents. +\begin{itemize} +\item If \meta{macro} ends with a |*|, \refCom{tcblistof} mimics the behavior of + |\listoffigures| from the standard \LaTeX\ classes and adds the title + to the left and right mark for headings. +\item If \meta{macro} starts with |\chapter|, a possible two column document setting + is restored to one column (as standard \LaTeX\ classes do for |\listoffigures|). +\end{itemize} + +\medskip To display the list inside a subsection, use for example: \begin{dispListing} \tcblistof[\subsection]{exam}{List of Exercises} \end{dispListing} The result of the example is found as Subsection \ref{listofexercises} on page \pageref{listofexercises}. + +\medskip +To apply the list similar to |\listoffigures| for a report or book, use for example: +\begin{dispListing} +\tcblistof[\chapter*]{exam}{List of Exercises} +\end{dispListing} + +\medskip +To set a short title for headings with the default |\section| setting, use for example: +\begin{dispListing} +\tcblistof{exam}[List of Exercises]{Elaborate List of Fine Exercises + for all Students of my Course} +\end{dispListing} + +\medskip \begin{marker} The core of the list is generated by |\@starttoc|\marg{name} which can be wrapped into an own macro. |