1

I would like two write two different align with two different labels, but I want both of them begin in one direction. How can I fix this code in latex?

    \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} 
rose
  • 347
  • 1
  • 3
  • 9

1 Answers1

3

The math display environments of amsmath (gather, align, ...) allow one \label per equation line, see the example below.

However, it is not clear to me, how the alignment should look exactly. Thus here a few variations:

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

Result

Heiko Oberdiek
  • 271,626