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} 
  • Something like: side-by-side equations, with equation numbers for each – Werner Mar 18 '14 at 21:36
  • what do you mean by begin in one direction? Also you have used align but you have specified no alignment points? – David Carlisle Mar 18 '14 at 21:37
  • I want that the first equation position changes and goes a little bit to the left side which the second align starts. – rose Mar 18 '14 at 21:42
  • 1
    Do you want \begin{align} \label{x} &x = x + y + c \\ \label{y} &a + b + c = z + c + v + b \end{align} – Torbjørn T. Mar 18 '14 at 21:48
  • @rose sorry I have no idea what you mean by that. You could edit the output of your example in a paint program to move the equations to where you want and post that, then we could show how to change Tex to make that result. – David Carlisle Mar 18 '14 at 22:02
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.