
여러 줄로 된 방정식이 있습니다. 세 열의 방정식을 왼쪽 정렬하고 싶습니다. 라텍스에서는 어떻게 할 수 있나요?
나는 현재 사용하고 있습니다
\begin{equation}
\begin{aligned}
&Column1& &Column2& &Column3 \\
&Column1& &Column2& &Column3 \\
&Column1& &Column2& &Column3 \\
\end{equation}
\end{aligned}
그러나 위의 표현식에서는 세 번째 열이 왼쪽 정렬이 아닌 오른쪽 정렬됩니다.
예는 다음과 같습니다.
\begin{equation}\label{formula:QPQC} \begin{aligned} &\underset{x}{\textbf{Maximize} }& &x^TFx+2f^Tx & & \\ &\textbf{Subject to} & &p_i^Tx+p_{i0}\geq 0 &i=1,\ldots,I \\ & & &v_m^Tx+v_{m0}=0 &m=1,\ldots,M \\ & & & x^TQ_zx+2q_z^Tx+q_{z0}=0 &z=1,\ldots,Z , \end{aligned} \end{equation}
답변1
&
두 번째와 세 번째 열 사이에 이(가) 누락되었습니다 .
실수를 피하고 출력을 개선하기 위한 몇 가지 제안 사항은 다음과 같습니다.
&&
서로 옆에 쌍을 제공 하고 입력에서 정렬을 유지합니다."최대화" 및 "대상"에 대한 매크로 정의
\dots
대신 사용하십시오\ldots
.
\documentclass{article}
\usepackage{amsmath}
\newcommand{\Maximize}[1]{\underset{#1}{\mathbf{Maximize}}}
\newcommand{\Subjto}{\mathbf{Subject\ to}}
\begin{document}
\begin{equation}\label{formula:QPQC}
\begin{aligned}
&\Maximize{x} && x^TFx+2f^Tx & && \\
&\Subjto && p_i^Tx+p_{i0}\geq 0 && i=1,\dots,I \\
& && v_m^Tx+v_{m0}=0 && m=1,\dots,M \\
& && x^TQ_zx+2q_z^Tx+q_{z0}=0 && z=1,\dots,Z,
\end{aligned}
\end{equation}
\end{document}