Math & ScienceAligning specific Arrays of Equations

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
KarolisK
Posts: 13
Joined: Sat Jun 18, 2011 3:36 pm

Aligning specific Arrays of Equations

Post by KarolisK »

Hello!
My name is Karolis and I am very glad to have joined LaTeX community. As I started using LaTeX just yesterday, I have encountered copious amounts of errors. However, almost all of them I have solved, except for one particular problem with the alignment. I want to align specific blocks or single equations to the left, while leaving others aligned to the center. I have seen in the previous posts how to align all the equations to the left by adding [fleqn] in \documentclass entry.

Code: Select all

\documentclass[a4paper]{article}
\usepackage{amsmath}
\begin{document}
Sum?:\newline
I want to sum be aligned with letter $I$ at the start of this sentence:
	\begin{align*}
	\sum_j
	\end{align*}
\begin{flushleft}
The next equation should appear in the center:
\end{flushleft}
\begin{equation}
\omega=0
\end{equation}
\end{document}
After scrolling through some other posts, seems like it can be done by inserting \setlength{\mathindent}{0} at some environment, however i noticed it does not work if you do not use [fleqn], which automatically aligns all the equations(including the ones I want to be centered) to the left.
Attachments
Alignment issue.pdf
(39.35 KiB) Downloaded 207 times
Last edited by KarolisK on Mon Jun 20, 2011 6:18 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.

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

Aligning specific Arrays of Equations

Post by Stefan Kottwitz »

Hi Karolis,

welcome to the board!

It's very good that you posted a compilable minimal example, so it's easy to test and to make working suggestions.

You can use a flalign environment and force left alignment by two &:

Code: Select all

\begin{flalign*}
  \sum_j &&
\end{flalign*}
Stefan
LaTeX.org admin
KarolisK
Posts: 13
Joined: Sat Jun 18, 2011 3:36 pm

Re: Aligning specific Arrays of Equations

Post by KarolisK »

Thank you for the help, works perfectly!
Post Reply