más divertido con el espacio entre mesas --- setspace

más divertido con el espacio entre mesas --- setspace

el espaciado vertical es brujería, hasta donde yo sé. He incluido todo lo que se me ocurrió que podría obligar a que los contenidos del entorno de explicación estén estrechamente espaciados verticalmente. Funciona en el texto principal. Las macros mismas dentro del entorno de explicación también están funcionando. por desgracia, la definición del entorno en sí no lo hace cuando está dentro de la tabla. ¿eh?

\documentclass{article}

\usepackage{setspace}

\newenvironment{explain}{%
  \medskip\par%
  \renewcommand{\baselinestretch}{0.1}
  \setstretch{0.1}
  \large\mbox{X}\footnotesize
  }{%
}

\setstretch{0.1}


\begin{document}

\begin{table}

\begin{explain}
  This fails. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time.
\end{explain}

\end{table}

\begin{table}

  \renewcommand{\baselinestretch}{0.1}
  \setstretch{0.1}
  \large\mbox{Y}\footnotesize
  This works.  This is the time. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time.


\end{table}



\begin{explain}
  This works.  This is the time.  This is the time. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time. This is the time.
\end{explain}

\end{document}

¿Qué hice mal (esta vez)?

Respuesta1

El interlineado de un párrafo se realiza cuando TeX divide el párrafo en líneas. Esto pasaal finaldel párrafo.

En el caso de la pregunta, explainusos ambientales \setstretch{0.1}y \footnotesize. Al final del entorno, el párrafo aún no ha terminado, pero el entorno sí. Por lo tanto, la configuración local del entorno se pierde y el párrafo que finaliza en la siguiente línea vacía utiliza la configuración que está activa.después(= antes, = afuera) el medio ambiente.

Como dijo Barbara Beeton en sucomentario, \paral final la parte ayuda (si está bien, si el entorno finaliza el párrafo).

\newenvironment{explain}{%
  \par
  \medskip
  ... \footnotesize
}{%
  \par
}

información relacionada