Generalequations at the center of the page

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

equations at the center of the page

Post by iperten »

Dear all,

I have to write 3 equations one after the other and each of them needs the number to be referred to. Instead of writing 3 times \begin{equation} ... \end{equation}, I used the eqnarray environment as follows:

Code: Select all

\begin{eqnarray}
 C_1&=&\frac{C_{m1}}{\cos\alpha_1}=W_1\frac{\cos\beta_1}{\cos\alpha_1},\\
 M_1&=&\frac{C_1}{a_1}=\frac{W_1\cos\beta_1}{a_1\cos\alpha_1}=M_{1,rel}\frac{\cos\beta_1}{\cos\alpha_1}, \label{eq:abs_mach}\\
  U_1&=&W_1\sin\beta_1+C_1\sin\alpha_1=W_1\cos\beta_1(\tan\beta_1+\tan\alpha_1),
\end{eqnarray}
Unfortunately, in this case I have some problems in centering each equation.

Basically, I want each equation to be at the center of the page. without taking care of their length (they are not of the same lenght).

Is there any way to do so in the eqnarray environment or is it better and faster to write 3 times \begin{equation} ... \end{equation}?

Thank you very much.
Cheers, Mattia.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

equations at the center of the page

Post by gmedina »

Hi Mattia,

you could use the gather environment provided by the amsmath package:

Code: Select all

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{gather}
  C_1=\frac{C_{m1}}{\cos\alpha_1}=W_1\frac{\cos\beta_1}{\cos\alpha_1},\\
  M_1=\frac{C_1}{a_1}=\frac{W_1\cos\beta_1}{a_1\cos\alpha_1}=M_{1,rel}\frac{\cos\beta_1}{\cos\alpha_1}, \label{eq:abs_mach}\\
  U_1=W_1\sin\beta_1+C_1\sin\alpha_1=W_1\cos\beta_1(\tan\beta_1+\tan\alpha_1),
\end{gather}
 
\end{document}
By the way, you should not use the eqnarray environment, reasons can be found in l2tabu and in Avoid eqnarray!
1,1,2,3,5,8,13,21,34,55,89,144,233,...
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Re: equations at the center of the page

Post by iperten »

Dear gmedina,

thank you very much! It worked!

And next time I'll try to avoid eqnarray. ;)

Hasta la vista!
M.
Post Reply