Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I can align different lines of the same equation in Latex with this code:

\begin{equation}
\begin{align}
 \frac{\partial a}{\partial b}(x)&=\frac{\partial a}{\partial c}\times \frac{\partial c}{\partial b} = \\ 
 &= \frac{\partial a}{\partial c}(x)\times \frac{\partial c}{\partial b}
\end{align}
\end{equation} 

enter image description here

but I couldn't find any solution for aligning different numbered equations like these:

\begin{equation}
q_{new} = q \times q(\omega + \Omega) \Delta t
\end{equation}

\begin{equation}
 v_{new} = v + V 
\end{equation}

\begin{equation}
\omega_{new} = \omega + \Omega 
\end{equation}

I get this output, which is not aligned by equal sign: enter image description here

Which is the right way to proceed?

EDIT

The solution was using

\begin{align}
\end{align}

Numeration is managed at the same time as equation environment so I can mix both, I didn't know that. Simpler and cleaner.

share|improve this question
    
Thanks, it looks legit –  Jav_Rock Jun 28 '12 at 13:58
1  
Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. –  Werner Jun 28 '12 at 14:44
add comment

migrated from stackoverflow.com Jun 28 '12 at 14:23

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 7 down vote accepted

This is one of those times "Latex is smarter than you and you should accept it". Why should these be aligned anyways? They are completely unrelated by the looks of it. If you need them to fit together, put them together in one align, otherwise don't worry; it will look nice anyway. Let Latex place your separate equations, or rewrite the text so that they can all fit in one single align.

BTW: You don't need to and shouldn't wrap align inside an equation environment. If you need subalignment (for example to the right of a left brace {, you should use the aligned environment).

EDIT: it seems you don't want any text between the equations and I understood you incorrectly. this is what you want if you don't need text between the separate equations:

\begin{align}
q_\text{new} &= q \times q(\omega + \Omega) \Delta t \\
v_\text{new} &= v + V \\
\omega_\text{new} &= \omega + \Omega 
\end{align}
share|improve this answer
1  
Thanks. And how exactly would you use aligned environment. I need to keep numbered equations, so I guess I cannot remove the \begin{equation} statement... –  Jav_Rock Jun 28 '12 at 13:47
1  
@Jav_Rock yes you can remove \begin{equation}. The align environment takes care of numbering the same way equation does. –  rubenvb Jun 28 '12 at 13:49
1  
You are right. The problem is that it numbers every line but I corrected by putting \nonumber after the lines I dont want to be numbered –  Jav_Rock Jun 28 '12 at 13:54
    
@Jav_Rock: Yeah, I always use \notag. Don't know what the difference between that and nonumber might be though... –  rubenvb Jun 28 '12 at 13:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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