兩個單獨的乳膠在一個方向上對齊

兩個單獨的乳膠在一個方向上對齊

我希望兩個人用兩個不同的標籤寫兩個不同的對齊方式,但我希望它們都從一個方向開始。如何在乳膠中修復此代碼?

    \documentclass[12pt,titlepage,a4paper]{book}
    \usepackage{amssymb,amsthm,amsmath,bm, mathtools}
    \begin{document}

    \begin{align}
    \label{x}
    x = x + y + c
    \end{align}
    \begin{align}
    \label{y}
    a + b + c = z + c + v + b
    \end{align}

    \end{document} 

答案1

amsmath( gather, align, ...)的數學顯示環境允許\label每個方程式行一個,請參考下面的範例。

但是,我不清楚對齊應該是什麼樣子。因此這裡有一些變化:

\documentclass[12pt,titlepage,a4paper]{book}
\usepackage{amssymb,amsthm,amsmath,bm, mathtools}
\begin{document}

\begin{align}
\label{x1}
x &= x + y + c\\
\label{y1}
a + b + c &= z + c + v + b
\end{align}

\begin{align}
\label{x2}
&x = x + y + c\\
\label{y2}
&a + b + c = z + c + v + b
\end{align}

\begin{alignat}{2}
\label{x3}
&x &&= x + y + c\\
\label{y3}
&a + b + c &&= z + c + v + b
\end{alignat}

\end{document}

結果

相關內容