Using the tufte-book layout, I wish to use the full width of the pages where the table of content is listed. There are a number of similar questions on SO (for example from which I used some of his example code, or here where Ulrike Fischer suggested part of a solution.
I found somewhere a suggestion that tcolorbox could be used and have found that it works, even in cases where the table of content is longer than a page.
I have a MWE which works nearly; can it be made to work correctly?
It does either
- insert multiple empty pages before the TOC starts (when using
\tableofcontent), or - starts without header (when using
\csname @starttoc\endcsname{toc}) (if I add a\clearpagethen I get multiple empty pages)
In either case, the text for the even pages is completely outside of the box.
\documentclass[nobib,twoside,symmetric,showframe]
{tufte-book}
\usepackage{printlen} % to print geometry
\usepackage{calc}
\setcounter{tocdepth}{4}
\usepackage[]{mdframed}
\title{TITEL book level 1 BookTitle}
\author{Author of Settings}
\usepackage[breakable,most]{tcolorbox}
\usepackage{calc}
\begin{document}
\frontmatter
\vspace{1.5cm}
{\huge\bfseries{TITEL book level 1 BookTitle} \par}
{\large \today\par}
% \clearpage
\tcbset{breakable,%
% title=Content title,%
width=\textwidth,%
grow to right by=\marginparsep+\marginparwidth}
\begin{tcolorbox}[toggle enlargement=evenpage]
% \tableofcontents
% \clearpage
\csname @starttoc\endcsname{toc}
\end{tcolorbox}
\mainmatter
\section{book title - one hash: vorwort buch v12345}
vorwort some text
\chapter{Questions of Design}
\section{(title section 1)}
\subsection{(title sub-section 1)}
\subsection{(title sub-section 2)}
\section{(title section 2)}
\subsection{(title sub-section 1)}
\subsection{(title sub-section 2)}
\chapter{Questions of Drawing}
\section{(title section 1)}
\subsection{(title sub-section 1)}
\subsection{(title sub-section 2)}
\section{(title section 2)}
\subsection{(title sub-section 1)}
\subsection{(title sub-section 2)}
\chapter{Questions of Technique}
\section{(title section 1)}
\subsection{(title sub-section 1)}
\subsection{(title sub-section 2)}
\section{(title section 2)}
\subsection{(title sub-section 1)}
\subsection{(title sub-section 2)}
\chapter{Questions of Design}
\section{(title section 1)}
\subsection{(title sub-section 1)}
\subsection{(title sub-section 2)}
\section{(title section 2)}
\subsection{(title sub-section 1)}
\subsection{(title sub-section 2)}
\end{document}
tufte-common.defwhere I fixed what I think is a problem in the lines\ifthenelse{\boolean{@tufte@symmetric}}{}{% % Forces internal LaTeXtwoside' % \geometry{asymmetric} % seems wrong \geometry{twoside} % swaps the margins } ` with this, the output looks fine. – user855443 Mar 30 '24 at 13:02