Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I left align the display math environment (either $$ or \[)? I keep running into people asking about the align environment; but I just want to change displayed math from center to left align relative to the page.

share|improve this question
    
I saw that style in a book and like it, since I did not have to look all over the page width for the formulas, but found them on the left side as well. Is there something I should keep in mind, when I use this style? –  queueoverflow Oct 23 '12 at 13:13

1 Answer 1

up vote 11 down vote accepted

You can use flalign from the amsmath package:

enter image description here

Note:

  • The showframe package was used just to be able to see where the text is relative to the page margins.

Code:

\documentclass{article}
\usepackage{showframe}
\usepackage{amsmath}
\begin{document}
\begin{flalign*}
e & = mc ^2 &\\%  Note the trailing & which is required to equations to the left
F & = ma
\end{flalign*}
\end{document}

Alternatively, if you want all equations left aligned, you can use the package option fleqn as in \documentclass[fleqn]{article} which will align them towards the left. The indentation is controlled by \mathindent, so you could use \setlength{\mathindent}{0pt} if you wanted to eliminate that.

Code:

\documentclass[fleqn]{article}
\usepackage{showframe}
\usepackage{amsmath}
\setlength{\mathindent}{0pt}

\begin{document}
\begin{align*}
e & = mc ^2 \\
F & = ma
\end{align*}
\end{document}
share|improve this answer
    
I don't get it - that's exactly what OP said he wants to avoid in question: I keep running into people asking about the align environment; but I just want to change displayed math from center to left align relative to the page. I think he means to align all displaymath (using $$) left. I know this thread is old, but that's what I was looking for when entered this page through google. –  trakos Feb 9 at 22:53
    
@trakos: I am not sure what you mean. The OP wanted to "left align the display math environment", which is what this answer does. I suggest you post a new question detailing what you want, and you can reference this question if it is relevant. Please do include a MWE including \documentclass and the appropriate packages that sets up the problem. –  Peter Grill Feb 9 at 23:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.