In a document, I have a title with a line break (written as \\). With documentclass book it produces a table of content as expected, but with tufte-book fails. I use
LuaHBTeX, Version 1.17.0 (TeX Live 2023) (format=lualatex 2023.7.3) 11 SEP 2023 14:37
and have tried to use \protect as recommended in some similar cases.
What must be changed to make it work with tufte-book?
My MWE is:
\documentclass[]{tufte-book}
% {tufte-book} fails
% {book} works
\usepackage{makeidx}
\makeindex
\setcounter{tocdepth}{4}
\begin{document}
\tableofcontents
\chapter{ix-hl1 Chapter Title}
Introductory text for chapter.
\section{03title section title first line \\ second line of title}
section text
\printindex
\end{document}
The errors seem to be in the toc file, but none is produced:
Something's wrong--perhaps a missing \item. ...centercr second line of title}{3}{section*.3}
Missing number, treated as zero. ...centercr second line of title}{3}{section*.3}
Missing $ inserted. ...centercr second line of title}{3}{section*.3}
Undefined control sequence. ...centercr second line of title}{3}{section*.3}
LaTeX hooks Error: Illegal mode change in hook 'para/begin'. ...centercr second line of title}{3}{section*.3}
You can't use `\lastbox' in math mode. ...centercr second line of title}{3}{section*.3}
There's no line here to end. ...centercr second line of title}{3}{section*.3}
Missing $ inserted. ...centercr second line of title}{3}{section*.3}
Missing } inserted. ...centercr second line of title}{3}{section*.3}
Missing } inserted. ...centercr second line of title}{3}{section*.3}
Missing \endgroup inserted. ...centercr second line of title}{3}{section*.3}
Missing } inserted. ...centercr second line of title}{3}{section*.3}
Missing number, treated as zero. ...centercr second line of title}{3}{section*.3}
Missing $ inserted. ...centercr second line of title}{3}{section*.3}
Undefined control sequence. ...centercr second line of title}{3}{section*.3}
LaTeX hooks Error: Illegal mode change in hook 'para/begin'. ...centercr second line of title}{3}{section*.3}
Extra }, or forgotten $. ...centercr second line of title}{3}{section*.3}
Missing $ inserted. ...centercr second line of title}{3}{section*.3}
Extra }, or forgotten \endgroup. ...centercr second line of title}{3}{section*.3}
Extra }, or forgotten \endgroup. ...centercr second line of title}{3}{section*.3}
\begin{adjustwidth} on input line 2 ended by \end{list}. ...centercr second line of title}{3}{section*.3}
\begin{fullwidth} on input line 2 ended by \end{adjustwidth}. ...centercr second line of title}{3}{section*.3}
\begin{document} ended by \end{fullwidth}. ...centercr second line of title}{3}{section*.3}
Extra \endgroup. \tableofcontents
No file exampleTOC.bbl.
Overfull \hbox (0.4013pt too wide) in paragraph