Math & ScienceAligned Equations flushed left

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
hkyz
Posts: 9
Joined: Wed Apr 25, 2012 9:37 am

Aligned Equations flushed left

Post by hkyz »

I want to write a multi-lined equation where the lines are aligned to the equal sign on the first line. I can do this with align*, for example:

Code: Select all

\begin{align*}
a = & b + c + \\
& d + e
\end{align*}
Yielding to

Code: Select all

a = b + c +
    d + e
However, the result is horizontally centered on the page. I want the equation to be left-aligned while keeping the alignment of the second line to the equal sign on the first line.

Any ideas?

Thanks.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Aligned Equations flushed left

Post by Stefan Kottwitz »

Hi,

welcoem to the board!

You could use flalign, which is documented in the amsmath manual, such as

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\noindent Some text
\begin{flalign*}
  a = {} & b + c + & \\
         & d + e &
\end{flalign*}
\end{document}
Do you want to have all equations flushed left, or just this one? Because there are options to make this globally.

Stefan
LaTeX.org admin
hkyz
Posts: 9
Joined: Wed Apr 25, 2012 9:37 am

Re: Aligned Equations flushed left

Post by hkyz »

That did the trick. Thanks Stefan, both for the welcome and the answer.
Post Reply