수학 기호가 포함된 방정식의 각 셀을 왼쪽 정렬하려면 어떻게 해야 합니까?

수학 기호가 포함된 방정식의 각 셀을 왼쪽 정렬하려면 어떻게 해야 합니까?

제목에서 이미 알 수 있듯이 여러 셀이 포함된 방정식이 있고 각 셀의 내용을 왼쪽 정렬하고 싶습니다. 수행원이 답변나는 사용해 보았지만 flalign이것은 전체 방정식을 왼쪽 정렬하는 것 같습니다. 다음은 작은 예입니다.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{flalign*}
  \textrm{Some stuff about } \rho & & \\
  \qquad \textrm{This is a really long equation and the following} \qquad & \textrm{should be left aligned} & \\
  \qquad \textrm{Short equation (should be left too)}              \qquad & \textrm{but quite a long one on the right though} &
\end{flalign*}

\end{document}

이 예는 다음과 같은 출력을 생성합니다. (제가 달성하려는 목표를 나타내기 위해 몇 가지 설명을 추가했습니다.)

산출

몇 가지 조사를 한 후 다음 중 하나라는 느낌을 받았습니다.이것들 접근 방식이 필요하지만 제대로 작동하도록 할 수 없습니다.

다음첫 번째 접근 방식나는 시도했다:

\documentclass{article}
\usepackage{amsmath}
\usepackage{calc}

\newcommand*{\mbc}[2]{\makebox[\widthof{$F(\alpha)$}][#1]{$#2$}}

\begin{document}

\begin{flalign*}
  \mbc{l}{\textrm{Some stuff about } \rho} & & \\
  \qquad \textrm{This is a really long equation and the following} \qquad & \textrm{should be left aligned} & \\
  \qquad \textrm{Short equation (should be left too)}              \qquad & \textrm{but quite a long one on the right though} &
\end{flalign*}

\end{document}

놀랍게도 첫 번째 줄은 이제 두 번째 셀에서 끝나는 것 같습니다(첫 번째 셀에 왼쪽 정렬되는 대신).

\mbc로 출력

그만큼두 번째 접근 방식수학 기호에서는 작동하지 않는 것 같습니다.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\pushleft}[1]{\ifmeasuring@#1\else\omit$\displaystyle#1$\hfill\fi\ignorespaces}

\begin{document}

\begin{flalign*}
  \pushleft{\textrm{Some stuff about } \rho} & & \\
  \qquad \textrm{This is a really long equation and the following} \qquad & \textrm{should be left aligned} & \\
  \qquad \textrm{Short equation (should be left too)}              \qquad & \textrm{but quite a long one on the right though} &
\end{flalign*}

\end{document}

출력을 제공합니다:

$ pdflatex test.tex
[...]
! Undefined control sequence.
\pushleft #1->\ifmeasuring 
                           @#1\else \omit $\displaystyle #1$\hfill \fi \igno...
l.20 \end{flalign*}

추가 삽입 $$도 도움이 되지 않습니다. 내가 얻을 수 있는 가장 가까운 방법은 다음을 사용하는 것이 \omit었지만 수학 모드를 선택 해제한 것 \hfill같으 \omit므로 추가 항목을 삽입해야 합니다 $$.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{flalign*}
  \omit $\textrm{Some stuff about } \rho$ \hfill & & \\
  \omit $\qquad \textrm{This is a really long equation and the following} \qquad$ \hfill & \textrm{should be left aligned} & \\
  \omit $\qquad \textrm{Short equation (should be left too)}              \qquad$ \hfill & \textrm{but quite a long one on the right though} &
\end{flalign*}

\end{document}

\omit 및 \hfill로 출력

$$그것은 작동하지만 내 IDE는 확실히 즐겁지 않은 모든 곳에서 추가 항목을 오류로 표시하고 있습니다 . 또한 이것이 항상 예상대로 작동하는 깨끗한 솔루션인지 확실하지 않습니다.

수학 기호가 포함된 방정식에서 셀 단위로 왼쪽 정렬을 수행하는 방법을 아는 사람이 있습니까? 아니면 후자 접근 방식에 대한 의견이 있으신 \omit가요 ?\hfill$$

답변1

이와 같이?

\documentclass{article}
\usepackage{mathtools}
\usepackage[showframe]{geometry}

\begin{document}

\begin{flalign*}
 & \textrm{Some stuff about } \rho & & \\
  & \qquad \textrm{This is a really long equation and the following} && \textrm{should be left aligned} \\
  & \qquad \textrm{Short equation (should be left too)} & & \textrm{but quite a long one on the right though}
\end{flalign*}

\end{document} 

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

기타 정렬에 대한 예제 코드:

\documentclass{article}
\usepackage{mathtools}
\usepackage[showframe]{geometry}

\begin{document}

\begin{flalign*}
  \shortintertext{\texttt{Columns left-aligned:} } 
  & \textrm{Some stuff about } \rho  \\
  & \qquad \textrm{This is a really long equation and the following} && \textrm{should be left aligned} \\
  & \qquad \textrm{Short equation (should be left too)} & & \textrm{but quite a long one on the right though}
\end{flalign*}

\begin{flalign*}
  \shortintertext{\texttt{Columns right-aligned:} } 
  & \rlap{Some stuff about $\rho $} \\
  & & \textrm{This is a really long equation and the following}& & \textrm{should be right aligned}& \\
  & &\textrm{Short equation (should be rightt too)} && \textrm{but quite a long one on the right though}&
\end{flalign*}

\begin{flalign*}
  \shortintertext{\texttt{Left column centred, right column left-aligned: }}
  & \textrm{Some stuff about } \rho  \\
  & \begin{gathered} \textrm{This is a really long equation and the following}\\\textrm{Short equation (should be centred)}\end{gathered}
  & \begin{aligned} & \textrm{should be left aligned} \\
  & \textrm{but quite a long one on the right though}\end{aligned}&
\end{flalign*}

\end{document} 

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

관련 정보