1

Normally \tcblistof works fine, but not with the tufte-book class and I cannot figure out why. Here is a MWE.

\documentclass{tufte-book} 
% \documentclass{book} % this works
\usepackage[theorems]{tcolorbox}
\newtcbtheorem[auto counter,number within=chapter,list inside=thm]{theo}{Theorem}{}{}

\begin{document}
    \tcblistof[\chapter*]{thm}{List of Theorems}
    \chapter{Chapter No1}
    \begin{theo}{Theorem No1}{}
        lipsum
    \end{theo}
\end{document}

Using the book class works as expected. What do I have to change for tufte-book?

1

OP has already found a solution in this answer. Here I'd like to provide some general discussions.

tufte-book class contains lines

% Only show the chapter titles in the table of contents
\setcounter{tocdepth}{0}

and since tcolorbox defines \l@tcolorbox as level 1 by

\newcommand*\l@tcolorbox{\@dottedtocline{1}{1.5em}{2.3em}}

therefore \tcblistof[\chapter*]{thm}{List of Theorems} produces nothing but a list title.

Locally using \setcounter{tocdepth}{1} is a workaround, but the produced list entries may not share the same style with list of figures and tables. Currently entries in these two list are defined as

\newcommand{\@tufte@lof@line}[2]{%
  % #1 is the figure/table number and its caption text
  % #2 is the page number on which the figure/table appears
  \leftskip 0.0em
  \rightskip 0em
  \parfillskip 0em plus 1fil
  \parindent 0.0em
  \@afterindenttrue
  \interlinepenalty\@M
  \leavevmode
  \@tempdima 2.0em
  \advance\leftskip\@tempdima
  \null\nobreak\hskip -\leftskip
  {#1}\nobreak\qquad\nobreak#2%
  \par%
}

\renewcommand*\l@figure{\@tufte@lof@line}
\let\l@table\l@figure

Hence OP's answer \let\l@tcolorbox\l@figure is a good idea.

| improve this answer | |
0

It seems to work if I add

\makeatletter
\let\l@tcolorbox\l@figure
\makeatother
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.