Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to left-align a series of equations in R Markdown?

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:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

\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! 🙂

>Solution :

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading