## LaTeX forum ⇒ Math & Science ⇒ How to not indent \align* environment?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

### How to not indent \align* environment?

When I use the \align* environment I am okay with the vertical space it sets by default but the formula in between this environment gets indented. How can I stop it doing that? i want it to be aligned with the page number to the left as per the following example. Here is the code

\documentclass[fleqn]{article}\setlength{\parindent}{0in}\usepackage{fullpage}\usepackage[margin=1in]{geometry}\usepackage{graphicx}\usepackage{amsmath}\allowdisplaybreaks\usepackage{xfrac}\usepackage[makeroom]{cancel}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage{siunitx}\pagestyle{empty}\sisetup{%   output-decimal-marker={.},   load-configurations=abbreviations,   group-separator={,},   per-mode=fraction,   fraction-function=\sfrac}\usepackage{fix-cm}\begin{document}\begin{enumerate}\item\begin{minipage}[t]{2in}\begin{aligned}[t]\Delta t&=\text{9.09 \cancel{hr}}\left(\dfrac{\text{60 \cancel{min}}}{\text{1 \cancel{hr}}}\right)\left(\dfrac{\text{60 s}}{\text{1 \cancel{min}}}\right)=\text{32,724 s} \\\omega&=\text{?}\end{aligned}\end{minipage}\begin{align*}\omega=\dfrac{\theta}{\Delta t}=\dfrac{\text{1.34 rad}}{\text{32,724 s}}=\text{\num{4.09e-5} rad/s}\end{align*}\end{enumerate}\end{document}
Attachments
LaTeX2.pdf
Last edited by ghostanime2001 on Sat Jun 18, 2011 5:36 am, edited 1 time in total.

Stefan Kottwitz
Posts: 9201
Joined: Mon Mar 10, 2008 9:44 pm
Set the length \mathindent to zero:

\setlength{\mathindent}{0pt}

Stefan

ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am
In the preamble?

Stefan Kottwitz
Posts: 9201
Joined: Mon Mar 10, 2008 9:44 pm
Yes, then it's for all such math environments. Or later, if you want it later. You can even use within environments, if you wish to keep the effect local.

Stefan

ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am
It doesn't seem to work

Stefan Kottwitz
Posts: 9201
Joined: Mon Mar 10, 2008 9:44 pm
It does. If you use align* within enumerate, it aligns to the left regarding the items. Not to the left of the number. If you desire that, first end the enumerate environment, then start align*.

Stefan

ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am
I think u misunderstood me. But anyway, i got it fixed

Stefan Kottwitz
Posts: 9201
Joined: Mon Mar 10, 2008 9:44 pm
You could explain what has been meant. And how you fixed it (code? pdf?), this would also explain what the problem has been, originally.

Stefan

ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am
I wrote "\setlength{\mathindent}{0pt}" exactly one line before \begin{document} and for equations i wanted to have a nice vertical space without manually setting \vspace i set \begin{align*} into math equations i wanted to have this good vertical space and it worked. If you still don't know what I mean i can show you a PDF?

Stefan Kottwitz
Posts: 9201
Joined: Mon Mar 10, 2008 9:44 pm
This explanation doesn't make it clearer. Well, the question was how to remove the indentation of align*, and this way it's left aligned.

\documentclass[fleqn]{article}\usepackage{amsmath}\setlength{\mathindent}{0pt}\begin{document}\noindent Left aligned\begin{align*}x &= y\end{align*}\end{document}

align.png (2.2 KiB) Viewed 8922 times

Stefan