
Al utilizar el poetry
paquete, tengo problemas para conseguir un espacio coherente alrededor de los títulos de mis secciones. Todos mis poemas comienzan con un título, dado como \section
. A veces dos poemas se sitúan en la misma página. A veces, un poema ocupa más de una página (el poem
entorno actual se pausa con \\*
, se incluye un pdf con una imagen y el poema se reinicia \*
al comienzo de la primera línea). Sin embargo, esto provoca un cambio en el espacio antes del título. Es decir, la distancia entre el "texto desbordado" y un título es menor que entre un poema que comienza y termina en la misma página y el título de la sección siguiente.
El texto sin formato no causa esto. Es decir, si una página comienza con texto normal, entonces una nueva sección, el espacio antes del título de la sección es el mismo que si la página comenzara con una nueva sección.
El espaciodespuésEl título de una sección cambia dependiendo de si el título va seguido de un poema o de un texto normal, pero al menos eso es consistente, no cambia dependiendo del desbordamiento o no. Pero algo hace que el poem
entorno ocupe un pequeño pero notable espacio antes del siguiente título si se divide en dos páginas, en comparación con cuando está contenido en una sola página.
El MWE es un poco largo porque quería mostrar todas las combinaciones diferentes. La diferencia de espacio alrededor de las secciones 2 y 3 es el principal problema: las otras secciones están ahí para contrastar. Tenga en cuenta que el poetry
paquete parece chocar con otro paquete cuando se descarga en MikTeX, por lo que es posible que no se compile si lo ejecuta localmente. Ejemplo visible al dorso aquí:https://www.overleaf.com/read/qggmxspxsxms
MWE:
\documentclass{article}
\usepackage{poetry}\poemlinenumsfalse
\setlength{\parindent}{0pt}
\begin{document}
\section{The very first, -/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\*
\newpage
\* Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\section{First, P/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\section{Following, P/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\newpage
Type-setting is a nightmare
This is plain text
\section{First, T/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\section{Following, P/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\newpage
Type-setting is a nightmare
This is plain text
\section{First, T/T}
Text Text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is plain text
\section{Following, T/T}
Text text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is plain text
\section{Following, T/T}
Text text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is plain text
\newpage
\section{Top of page, T/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\*
\newpage
\* Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\section{First, P/T}
Type-setting is a nightmare
This is plain text
\section{Following, T/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\section{Following, P/T}
Text text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is a poem
\end{document}
Respuesta1
No logré descubrir cuál era tu problema de espacio. Nunca he usado el poetry
paquete. No sé si esto será de alguna ayuda. Cambié su código para usar el verse
paquete (advertencia que lo desarrollé) en lugar del poetry
paquete y usé en verse
\poemtitle{...}
lugar de \section{...}
para los títulos de los poemas.
% poemprob.tex SE 640836
\documentclass{article}
\usepackage{verse}
%\usepackage{poetry}\poemlinenumsfalse
\setlength{\parindent}{0pt}
\begin{document}
\tableofcontents
\poemtitle{The very first, -/P}
\begin{verse}
Poem poem, please behave\\
So my peace of mind you save\\*
\newpage
\* Type-setting is a nightmare\\
This is a poem\\-
\end{verse}
\poemtitle{First, P/P}
\begin{verse}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{verse}
\poemtitle{Following, P/P}
\begin{verse}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{verse}
\newpage
Type-setting is a nightmare
This is plain text
\poemtitle{First, T/P}
\begin{verse}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{verse}
\poemtitle{Following, P/P}
\begin{verse}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{verse}
\newpage
Type-setting is a nightmare
This is plain text
\section{First, T/T}
Text Text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is plain text
\section{Following, T/T}
Text text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is plain text
\section{Following, T/T}
Text text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is plain text
\newpage
\poemtitle{Top of page, T/P}
\begin{verse}
Poem poem, please behave\\
So my peace of mind you save\\*
\newpage
\* Type-setting is a nightmare\\
This is a poem\\-
\end{verse}
\section{First, P/T}
Type-setting is a nightmare
This is plain text
\poemtitle{Following, T/P}
\begin{verse}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{verse}
\section{Following, P/T}
Text text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is a poem
\end{document}
%%%%%% ORIGINAL MWE FOLLOWS %%%%%%%%%%%%%%
\documentclass{article}
{poetry}\poemlinenumsfalse
\setlength{\parindent}{0pt}
\begin{document}
\section{The very first, -/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\*
\newpage
\* Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\section{First, P/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\section{Following, P/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\newpage
Type-setting is a nightmare
This is plain text
\section{First, T/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\section{Following, P/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\newpage
Type-setting is a nightmare
This is plain text
\section{First, T/T}
Text Text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is plain text
\section{Following, T/T}
Text text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is plain text
\section{Following, T/T}
Text text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is plain text
\newpage
\section{Top of page, T/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\*
\newpage
\* Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\section{First, P/T}
Type-setting is a nightmare
This is plain text
\section{Following, T/P}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\section{Following, P/T}
Text text, please behave
So my peace of mind you save
Type-setting is a nightmare
This is a poem
\end{document}
Respuesta2
No estoy seguro de entender el problema. En la documentación de poesía existen \poemtopskip y \poembotskip que gestionan espacios antes y después del entorno.
\documentclass{article}
%https://tex.stackexchange.com/questions/640836/poetry-package-changes-vertical-space-around-section-headings-in-strange-ways/640918#640918
\usepackage{poetry}\poemlinenumsfalse
\setlength{\parindent}{0pt}
\usepackage{paracol}
\usepackage[margin=2cm]{geometry}
\begin{document}
Default
\begin{paracol}{2}
\section{With the environment poem}
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\textbf{Some text}
\switchcolumn
\section{Without the environment poem}
Poem poem, please behave
So my peace of mind you save
Type-setting is a nightmare
This is a poem
\textbf{Some text}
\end{paracol}
\rule{\linewidth}{0.4pt}
Modified
\begin{paracol}{2}
\section{With the environment poem}
\poemtopskip=0pt%<---- modif 1em by default
\poembotskip=0pt%<---- modif 1em by default
%\setlength{\poemindent}{1in}%<---- for the indent 0pt by default
\begin{poem}
Poem poem, please behave\\
So my peace of mind you save\\
Type-setting is a nightmare\\
This is a poem\\-
\end{poem}
\textbf{Some text}
\switchcolumn
\section{Without the environment poem}
Poem poem, please behave
So my peace of mind you save
Type-setting is a nightmare
This is a poem
\textbf{Some text}
\end{paracol}
\end{document}