Math & Science ⇒ How to left align some formulas?
How to left align some formulas?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- 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
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: How to left align some formulas?
How to left align some formulas?
Code: Select all
\begin{flalign}
\indent & (a+b)^2 = a^2+2ab+b^2 &
\end{flalign}
Re: How to left align some formulas?
\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?
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}
Re: How to left align some formulas?
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!
Re: How to left align some formulas?
\begin{flalign}
\indent & (a+b)^2 = a^2+2ab+b^2 &
\end{flalign}
plus gmedina's proposal. The latter one seems to be better.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to left align some formulas?
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10