Estoy usando tufte-latex y me gustaría que los títulos de mis secciones usen todo el ancho de la página en el caso de que use un entorno de ancho completo para el siguiente bloque de texto. Sin embargo, cuando intento compilar este ejemplo:
\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}
Obtuve el siguiente error:
Error de LaTeX: algo anda mal, tal vez falta un \elemento
Sin embargo, si ejecuto el código de esta manera, funciona, pero me da un encabezado de sección demasiado estrecho.
\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}
Respuesta1
Creo que es una mala idea para la legibilidad y la coherencia, pero si realmente debes extender el título de la sección a toda la página, lo siguiente debería funcionar:
\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}
Tenga en cuenta también que el fullwidth
entorno no está diseñado para funcionar a través de los límites de las páginas y puede romperse en algunos casos. (El bloque de texto se desplazará horizontalmente en la página).