如何生成全宽目录(tufte-book)?

如何生成全宽目录(tufte-book)?

全宽环境会导致跨页面问题。mdframed 选项也不能正常工作。

作者在此处针对普通文本建议使用 mdframed 答案,如何在两种边距大小之间切换?

\documentclass[nols,a4paper,twoside,symmetric,justified,marginals=raggedouter]{tufte-book}

\hypersetup{colorlinks} % Comment this line if you don't wish to have colored links

\usepackage{lipsum,mdframed,fontspec}
\definecolor{secnum}{RGB}{13,151,225}
\definecolor{ptcbackground}{RGB}{212,237,252}
\definecolor{ptctitle}{RGB}{0,177,235}

% TOC
  \usepackage{titletoc}
  \usepackage{etoolbox}
  \setcounter{tocdepth}{1}
  \pretocmd{\tableofcontents}{\begin{mdframed}[backgroundcolor=ptcbackground,outermargin=\dimexpr-\marginparwidth-\marginparsep\relax,innermargin=0pt,hidealllines=true]\let\cleardoublepage\relax}{}{}
  \apptocmd{\tableofcontents}{\end{mdframed}}{}{}

\begin{document}
\tableofcontents
\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)}
\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)}
\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)}
\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)}
\end{document}

答案1

该问题与包在定义的外部环境中的内部使用组合有关fullwidth。如果您将选项添加notoc到文档类中,则该示例效果很好:

\documentclass[nols,a4paper,twoside,symmetric,justified,marginals=raggedouter,notoc]{tufte-book}

在此处输入图片描述

相关内容