tufte-book и marginfix

tufte-book и marginfix

Я хочу применить это исправлениеТекст полной ширины смещает все плавающие элементы 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}

! Ошибка заголовка пакета: вход в горизонтальном режиме.

Проблема, вероятно, вtufte-common.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 

Связанный контент