# Align Environment

#### dwsmith

##### Well-known member
So I want to use begin{align} end{align} but I want my equations to line up on the left not the right.

How can this be done?

\begin{align}
\frac{ds}{dt} = -k_1es + (k_{-1} - k_3)c_1 + k_{-3}c_2\\
\frac{dc_1}{dt} = k_1se - (k_{-1} + k_2 + k_3s)c_1 + (k_{-3} + k_4)c_2\\
\frac{dc_2}{dt} = k_3sc_1 - (k_{-3} + k_4)c_2\\
\frac{de}{dt} = -k_1se + (k_{-1} + k_2)c_1\\
\frac{dp}{dt} = k_2c_2 + k_4c_2
\end{align}

#### Ackbach

##### Indicium Physicus
Staff member
\begin{align}
\frac{ds}{dt} &= -k_1es + (k_{-1} - k_3)c_1 + k_{-3}c_2\\
\frac{dc_1}{dt} &= k_1se - (k_{-1} + k_2 + k_3s)c_1 + (k_{-3} + k_4)c_2\\
\frac{dc_2}{dt} &= k_3sc_1 - (k_{-3} + k_4)c_2\\
\frac{de}{dt} &= -k_1se + (k_{-1} + k_2)c_1\\
\frac{dp}{dt} &= k_2c_2 + k_4c_2
\end{align}

Insert ampersands. Incidentally, MathJax automatically parses this environment, so it's probably best not to put too much $\LaTeX$ into your post titles.

#### dwsmith

##### Well-known member
\begin{align}
\frac{ds}{dt} &= -k_1es + (k_{-1} - k_3)c_1 + k_{-3}c_2\\
\frac{dc_1}{dt} &= k_1se - (k_{-1} + k_2 + k_3s)c_1 + (k_{-3} + k_4)c_2\\
\frac{dc_2}{dt} &= k_3sc_1 - (k_{-3} + k_4)c_2\\
\frac{de}{dt} &= -k_1se + (k_{-1} + k_2)c_1\\
\frac{dp}{dt} &= k_2c_2 + k_4c_2
\end{align}

Insert ampersands. Incidentally, MathJax automatically parses this environment, so it's probably best not to put too much $\LaTeX$ into your post titles.
Is there anyway to make it flush? Lines 2 and 3 look ugly.

#### Ackbach

##### Indicium Physicus
Staff member
Is there anyway to make it flush? Lines 2 and 3 look ugly.
That's a matter of aesthetics. I prefer aligned equations to align on the equals sign. If you prefer to align on the left-hand sides of the derivatives, then put the ampersands on the far left like this:

\begin{align}
&\frac{ds}{dt} = -k_1es + (k_{-1} - k_3)c_1 + k_{-3}c_2\\
&\frac{dc_1}{dt} = k_1se - (k_{-1} + k_2 + k_3s)c_1 + (k_{-3} + k_4)c_2\\
&\frac{dc_2}{dt}= k_3sc_1 - (k_{-3} + k_4)c_2\\
&\frac{de}{dt} = -k_1se + (k_{-1} + k_2)c_1\\
&\frac{dp}{dt} = k_2c_2 + k_4c_2
\end{align}

I don't like that, but that's how you can do it if you do like it.

#### dwsmith

##### Well-known member
That's a matter of aesthetics. I prefer aligned equations to align on the equals sign. If you prefer to align on the left-hand sides of the derivatives, then put the ampersands on the far left like this:

\begin{align}
&\frac{ds}{dt} = -k_1es + (k_{-1} - k_3)c_1 + k_{-3}c_2\\
&\frac{dc_1}{dt} = k_1se - (k_{-1} + k_2 + k_3s)c_1 + (k_{-3} + k_4)c_2\\
&\frac{dc_2}{dt}= k_3sc_1 - (k_{-3} + k_4)c_2\\
&\frac{de}{dt} = -k_1se + (k_{-1} + k_2)c_1\\
&\frac{dp}{dt} = k_2c_2 + k_4c_2
\end{align}

I don't like that, but that's how you can do it if you do like it.
\begin{align}
&\frac{ds}{dt} & = & -k_1es + (k_{-1} - k_3)c_1 + k_{-3}c_2,\\
&\frac{dc_1}{dt} & = & k_1se - (k_{-1} + k_2 + k_3s)c_1 + (k_{-3} + k_4)c_2,\\
&\frac{dc_2}{dt} & = & k_3sc_1 - (k_{-3} + k_4)c_2,\\
&\frac{de}{dt} & = & -k_1se + (k_{-1} + k_2)c_1,\\
&\frac{dp}{dt} & = & k_2c_2 + k_4c_2
\end{align}

On my pdf document, the space between the derivatives and equal sign is about 2in but on the forum it is about a 1/2in. How can I get my pdf file to align like this?

#### Krizalid

##### Active member
Use eqnarray* environment.

#### Jester

##### Well-known member
MHB Math Helper
You can also use alignat but I don't know if this will work here.