Math & ScienceFlushing a single equation to the left

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Flushing a single equation to the left

Post by Cham »

I would like to push a few equations to the left side. Do flalign is the only option to do this, for a single equation ? Here's a tiny MWE to show what I want to do :

Code: Select all

\documentclass{article}
\usepackage{amsmath}

\begin{document}
Blablabla
	\begin{equation}
		\frac{1}{3 x + 4} = \frac{2}{x}.
	\end{equation}
Blabla
	\begin{flalign}
		&\frac{1}{3 x + 4} = \frac{2}{x}.&
	\end{flalign}
\end{document}
I find it a bit weird that I have to use the align environment (with two "&") just to do this. Is there another way in achieving this?

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

Flushing a single equation to the left

Post by Stefan Kottwitz »

Common typography is to decide either having equations centered or flushed left. Mixing is so unusual, that there's no official support for it. flalign is the easiest and works. Just take it. Other solutions would be rather hacks. It's not officially supported (because it's uncommon) and since there's this flalign way, no implemetation is needed.

Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Flushing a single equation to the left

Post by Cham »

I agree. Personally, I usually center all of my equations.

However, in the case of the course notes I'm writing, I need to mix calculations examples (all centered) with exercices for the students. In this case, I need to envisage an empty space at the right side of the equations so the students could do their own calculations there (they have to fill the empty space by hand). This is why I need some equations to be flushed to the left.
Post Reply