TeX - LaTeX Asked on December 13, 2020
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
?
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
advanceleftskip@tempdima
nullnobreakhskip -leftskip
{#1}nobreakqquadnobreak#2%
par%
}
renewcommand*l@figure{@tufte@lof@line}
letl@tablel@figure
Hence OP's answer letl@tcolorboxl@figure
is a good idea.
Correct answer by muzimuzhi Z on December 13, 2020
It seems to work if I add
makeatletter
letl@tcolorboxl@figure
makeatother
Answered by Manuel Schmidt on December 13, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP