Math & Science ⇒ How to left align some formulas?
How to left align some formulas?
How can I "left align" (parindent) one or more, but not all, formulas in a manuscript? That is, by avoiding general commands like "fleqn" and the like.
Last edited by ks-zadeh on Mon Sep 20, 2010 11:52 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to left align some formulas?
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{mathtools} % Loads »amsmath«
\usepackage{blindtext}
\begin{document}
\blindtext
\begin{align}
(a+b)^2 &= a^2+2ab+b^2 \\
(a-b)^2 &= a^2-2ab+b^2 \\
(a+b)(a-b) &= a^2-b^2
\end{align}
\blindtext
\begin{flalign}
(a+b)^2 &= a^2+2ab+b^2 & \\
(a-b)^2 &= a^2-2ab+b^2 & \\
(a+b)(a-b) &= a^2-b^2 &
\end{flalign}
\blindtext
\end{document}
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: How to left align some formulas?
Sorry, it seems I have not stated my problem clearly. What I would like to obtain is this: to have, deliberately, one or another of my formulas start at the left hand side of the line where the paragraph indent is. Is there a special, optional command that one can add to equation, eqnarray, gather, etc. to obtain that result?
How to left align some formulas?
Perhaps a modification of the above approach would suit your needs, e.g., for a one-liner:
Code: Select all
\begin{flalign}
\indent & (a+b)^2 = a^2+2ab+b^2 &
\end{flalign}
Re: How to left align some formulas?
It seems your proposal works for equations only, but not for formulas in general. For example, I want to left align (with indent) an n-tuple like the following one:
\langle \Omega, \mathcal{E}, p, T, A_{t_{1}}, B_{t_{2}}, X \rangle
Using your proposal it is centered.
\langle \Omega, \mathcal{E}, p, T, A_{t_{1}}, B_{t_{2}}, X \rangle
Using your proposal it is centered.
How to left align some formulas?
Hi,
you could try the fleqn environment provided by the nccmath package. A little example:
you could try the fleqn environment provided by the nccmath package. A little example:
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\usepackage{nccmath}
\begin{document}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\begin{fleqn}[\parindent]
\begin{align}
a &= b \\
&= c\\
&= d.
\end{align}
\end{fleqn}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\begin{fleqn}[\parindent]
\begin{equation}
\langle \Omega, \mathcal{E}, p, T, A_{t_{1}}, B_{t_{2}}, X \rangle
\end{equation}
\end{fleqn}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: How to left align some formulas?
Using the latter proposal still centers the formulas. But the preceding proposal works. I discovered that initially I had made a mistake. My problem has been resolved. Thank you all!
How to left align some formulas?
Eh? The fleqn environment doesn't center formulas. Did you compile my example code?ks-zadeh wrote:Using the latter proposal still centers the formulas. But the preceding proposal works. I discovered that initially I had made a mistake. My problem has been resolved. Thank you all!
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: How to left align some formulas?
My problem found a solution by following proposal:
\begin{flalign}
\indent & (a+b)^2 = a^2+2ab+b^2 &
\end{flalign}
plus gmedina's proposal. The latter one seems to be better.
\begin{flalign}
\indent & (a+b)^2 = a^2+2ab+b^2 &
\end{flalign}
plus gmedina's proposal. The latter one seems to be better.
Last edited by ks-zadeh on Tue Sep 21, 2010 7:57 am, edited 1 time in total.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to left align some formulas?
Now that the problem is solved, please be so kind and mark the topic accordingly as clearly written in Section 3 of the Board Rules. Please keep that in mind for the future so that further reminders will not be necessary any more.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10