tufte-latex의 전체 너비 섹션 제목

tufte-latex의 전체 너비 섹션 제목

저는 tufte-latex를 사용하고 있으며 다음 텍스트 블록에 대해 전체 너비 환경을 사용하는 경우 섹션 제목이 페이지의 전체 너비를 사용하도록 하고 싶습니다. 그러나 이 예제를 컴파일하려고 하면 다음과 같습니다.

\documentclass{tufte-book}
\usepackage{lipsum}

 \begin{document}

\begin{fullwidth}
\section{This is the Title of my Section, Which I Will Make Very Long to Demonstrate the Problem I Have Using Fullwidth}
\lipsum
\end{fullwidth}
\end{document}

다음 오류가 발생합니다.

LaTeX 오류: 뭔가 잘못되었습니다. 아마도 \item이 누락되었을 수 있습니다.

그러나 이와 같은 코드를 실행하면 작동하지만 섹션 헤더가 너무 좁아집니다.

\documentclass{tufte-book}
\usepackage{lipsum}

 \begin{document}

\section{This is the Title of my Section, Which I Will Make Very Long to Demonstrate the Problem I Have Using Fullwidth}
\begin{fullwidth}
\lipsum
\end{fullwidth}

\end{document}

너무 좁은 섹션 헤더

답변1

가독성과 일관성 측면에서 좋지 않은 생각이라고 생각합니다. 하지만 섹션 제목을 전체 페이지에 걸쳐 늘려야 한다면 다음이 작동할 것입니다.

\documentclass{tufte-handout}

\titleformat{\section}%
  [display]% shape
  {\relax\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\begin{fullwidth}}{}\normalfont\Large\itshape}% format applied to label+text
  {\thesection}% label
  {1em}% horizontal separation between label and title body
  {}% before the title body
  [\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\end{fullwidth}}{}]% after the title body

\usepackage{lipsum}% provides filler text

\begin{document}

\section{This is a lengthy section heading to demonstrate it sprawls across the entire page width}

\begin{fullwidth}
\lipsum
\end{fullwidth}

\end{document}

또한 환경은 fullwidth페이지 경계를 넘어 두 가지 작업을 수행하도록 설계되지 않았으며 경우에 따라 중단될 수 있습니다. (텍스트 블록은 페이지에서 수평으로 오프셋됩니다.)

관련 정보