alineado en líneas múltiples produce espacio superfluo

alineado en líneas múltiples produce espacio superfluo

Alimentación

\documentclass{article}
\pagestyle{empty} 
\usepackage{mathtools}
\begin{document}
\[
  \begin{multlined}[c]
    \text{Line}\ 1\\
      \begin{aligned}[c]
        &\text{Line}\ 2.1\\
        \lor\ &\text{Line}\ 2.2\\
        \lor\ &\text{Line}\ 2.3
      \end{aligned}\text{stuff to the right}
  \end{multlined}
\]
\end{document}

a pdflatexlos rendimientos

salida simple

Como puede ver, hay un espacio en blanco justo antes de "cosas a la derecha".

Podrías pensar que esto no es tan malo, pero aquí se pone peor:

\documentclass{article}
\pagestyle{empty} 
\usepackage{mathtools}
\begin{document}
\[
  \begin{multlined}[c]
    \text{Line}\ 1\\
    \land \begin{aligned}[c]
      \left(
      \begin{aligned}[c]
        &\text{Line}\ 2.1\\
        \lor\ &\text{Line}\ 2.2\\
        \lor\ &\text{Line}\ 2.3
      \end{aligned}
    \right)
    \end{aligned}
  \end{multlined}
\]
\end{document}

produce

producción

Como puede ver, hay espacios en blanco superfluos a la izquierda del par de cierre derecho. Si tenemos fórmulas más largas y más anidamiento de entornos, el espacio en blanco crece. ¿De dónde surge este espacio? ¿Cómo deshacerse de él sin introducir distancias negativas codificadas, como \mskip-5mu? Por cierto, \mleft(…\mright)en lugar de \left(…\right) provocar el mismo problema.

Respuesta1

Supongo que el resultado deseado de su MWE es:

ingrese la descripción de la imagen aquí

Para ello utilizo pmatrixen lugar de aligned:

\documentclass{article}
\pagestyle{empty}
\usepackage{mathtools}
\begin{document}
\[\setlength\arraycolsep{2pt}
  \begin{multlined}
    \text{Line}\ 1\\
    \land \begin{pmatrix}
                &\text{Line } 2.1\\
        \lor    &\text{Line } 2.2\\
        \lor    &\text{Line } 2.3
      \end{pmatrix}
  \end{multlined}
\]
\end{document}

o con el uso de array:

\documentclass{article}
\pagestyle{empty}
\usepackage{mathtools}

\begin{document}
\[\setlength\arraycolsep{3pt}
  \begin{multlined}
    \text{Line}\ 1\\
    \land \left(\begin{array}{rl}
                &\text{Line } 2.1\\
        \lor    &\text{Line } 2.2\\
        \lor    &\text{Line } 2.3\\
                \end{array}\right)
  \end{multlined}
\]
\end{document}

ingrese la descripción de la imagen aquí

Respuesta2

No sé de dónde viene el espacio. A continuación se explica cómo deshacerse de él manteniendo la distancia de línea y el estilo de visualización.

\documentclass{article}
\pagestyle{empty} 
\usepackage{mathtools}
\begin{document}
\[
  \begin{multlined}[c]
    \text{Line}\ 1\\
      \begin{alignedat}[c]{1}
        &\text{Line}\ 2.1\\
        \lor\ &\text{Line}\ 2.2\\
        \lor\ &\text{Line}\ 2.3
      \end{alignedat}\text{stuff to the right}
  \end{multlined}
\]
\end{document}

rendimientos

producción

información relacionada