여러 줄로 정렬하면 불필요한 공간이 생성됩니다.

여러 줄로 정렬하면 불필요한 공간이 생성됩니다.

급송

\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}

수확량pdflatex

간단한 출력

보시다시피 "오른쪽에 있는 항목" 바로 앞에 약간의 공백이 있습니다.

이것이 그다지 나쁘지 않다고 생각할 수도 있지만 여기서는 상황이 더욱 악화됩니다.

\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}

생산하다

산출

보시다시피, 오른쪽 닫는 괄호 왼쪽에 불필요한 공백이 있습니다. 더 긴 수식과 더 많은 환경 중첩이 있으면 공백이 커집니다. 이 공간은 어디에서 오는가? 와 같이 하드코딩된 음수 거리를 입력하지 않고 이를 제거하는 방법은 무엇입니까 \mskip-5mu? Btw. \mleft(…\mright)대신 \left(…\right) 동일한 문제가 발생합니다.

답변1

MWE에서 원하는 결과는 다음과 같습니다.

여기에 이미지 설명을 입력하세요

이를 위해 다음 pmatrix대신 사용합니다 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}

또는 다음을 사용하여 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}

여기에 이미지 설명을 입력하세요

답변2

공간이 어디서 나오는지 모르겠습니다. 선간 거리와 표시 스타일을 유지하면서 이를 제거하는 방법은 다음과 같습니다.

\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}

수확량

산출

관련 정보