Math & ScienceLeft-Justified "align"

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
JonTsu
Posts: 9
Joined: Sun Jan 08, 2012 3:54 pm

Left-Justified "align"

Post by JonTsu »

Hi LaTeXers,

It seems that the default on \begin{align*} ... \end{align*} is to centre it, is there any way of having a left-justified set of aligned equations? e.g.

Code: Select all

\begin{align*}
x&= abcd\\
&=abcd+efgh
\end{align*}
would be centred, but I would like it to appear as

x = abcd
II = abcd+efgh

i.e. with the x completely left-justified.

Any help would be greatly appreciated.

Thanks,
Jonathan
Last edited by Stefan Kottwitz on Sat Mar 16, 2013 6:19 pm, edited 1 time in total.

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

Left-Justified "align"

Post by Stefan Kottwitz »

Hi Jonathan,

you could use a flalign* environment and push all to the left by adding another &:

Code: Select all

\begin{flalign*}
  x &= abcd & \\
    &= abcd + efgh
\end{flalign*}
But you can keep using align* and do the alignment globally, for all displayed math: use the fleqn option, and if you like set also the math indentation to 0pt after loading amsmath, such as

Code: Select all

\documentclass[fleqn]{article}
\usepackage{amsmath}
\setlength{\mathindent}{0pt}
Stefan
LaTeX.org admin
JonTsu
Posts: 9
Joined: Sun Jan 08, 2012 3:54 pm

Re: Left-Justified "align"

Post by JonTsu »

Hi Stefan,
Thanks so much, that works perfectly!
Jonathan
Post Reply