Home > Software design >  How to left-align a series of equations in R Markdown?
How to left-align a series of equations in R Markdown?

Time:11-19

I know this question's been answered, but none of those solutions have worked for me, so I'm asking!

I want a block of labelled equations to appear in the middle of the page, but to line up with each other on their left sides.

So far, I have:

\begin{align}
    \text{(1) Larvae (l): }\ N_{l(t 1)} = P_l N_{l(t 1)}   F_a N_{a(t)}\\
    \text{(2) Pupae (p): }\ N_{p(t 1)} = G_l N_{l(t)}   P_p N_{p(t)}\\
    \text{(3) Adults (a): }\ N_{a(t 1)} = G_p N_{p(t)}   P_a N_{a(t)}\\
\end{align}

Which gives me: enter image description here

This is in the centre of the page, like I want it to be, but the equations line up with each other on their right sides...

Does anyone know how I can fix this?

Thanks so much in advance! :)

CodePudding user response:

You can align the equals signs as well if that's what you're looking to do like this:

\begin{align}
&\text{(1) Larvae (l): }&\ N_{l(t 1)} &=& P_l N_{l(t 1)}   F_a N_{a(t)}\\
&\text{(2) Pupae (p): }&\ N_{p(t 1)} &=& G_l N_{l(t)}   P_p N_{p(t)}\\
&\text{(3) Adults (a): }&\ N_{a(t 1)} &=& G_p N_{p(t)}   P_a N_{a(t)}\\
\end{align}

which will align your first part of the equation as well as the equals signs.

enter image description here

  • Related