tufte-book 和 marginfix

tufte-book 和 marginfix

我想应用此修复全宽文本将所有边距固定的浮动文本移出页面右侧到 tufte-book 文档类,但是每当我使用时都会出现错误\chapter

\documentclass{tufte-book}

\makeatletter
\newlength{\fullwidthlength}
\AtBeginDocument{\setlength{\fullwidthlength}{\@tufte@fullwidth}}
\makeatother
\renewenvironment{fullwidth}{\noindent\begin{minipage}{\fullwidthlength}\strut}{\strut\end{minipage}}
\usepackage{marginfix}

\begin{document}
\chapter{My Chapter}
This is text before some full width text. The footnote that goes with it is way over there.\footnote{This note goes with the text before the full width text.}

\begin{fullwidth}This is some full width text. Its presence on a page using \texttt{marginfix} pushes all notes to the right off the page.\end{fullwidth}

This is some other text, after the full width text, and its note is also way over there.\footnote{This note goes with the text after the full width text.}

\end{document}

! 包 titlesec 错误:以水平模式进入。

问题可能在于tufte-通用.def因为\chapter利用了fullwidth

\titleformat{\chapter}%
  [display]% shape
  {\relax\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\begin{fullwidth}}{}}% format applied to label+text
  {\itshape\huge\thechapter}% label
  {0pt}% horizontal separation between label and title body
  {\huge\rmfamily\itshape}% before the title body
  [\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\end{fullwidth}}{}]% after the title body 

相关内容