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.

Possible Duplicate:
Left align (to the page) displayed math

I have a document in which I want to use display mode, but want the expressions left-aligned instead of centered. So far, I've been able to do this with this code:

\begin{align*}
\[some display math\]
\end{align*}

This is a pain. Is there some setting I can use that will align all display math to the left? I've tried [fleqn], but this seems to only left align equations and equation blocks, instead of any general display math.

share|improve this question
    
Your question was migrated here from another stackexchange site. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  percusse Aug 30 '12 at 22:37
    
@Percuse: Indeed a duplicate!! Short memory in my old age. :-) –  Peter Grill Sep 1 '12 at 3:12
add comment

migrated from stackoverflow.com Aug 30 '12 at 22:31

This question came from our site for professional and enthusiast programmers.

marked as duplicate by percusse, lockstep, barbara beeton, Torbjørn T., Peter Grill Sep 1 '12 at 3:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

The [fleqn] class option will align the equations towards the left. The amount of indentation is controlled by the value of the length \mathindent. Setting this to zero results in the equations aligned at the left margin. Here is the otuput of an align* and a standard display math equation using \[ \]:

enter image description here

Notes:

Code:

\documentclass[fleqn]{article}
\usepackage{showframe}
\usepackage{amsmath}

\begin{document}
\setlength{\mathindent}{0.0pt}
\noindent
Here is the output of \verb|align|:
\begin{align*}
x &= y &\\
\sin x &\neq y +z
\end{align*}
Here is the output of display math:
\[
    \sin x \neq y +z
\]
\end{document}
share|improve this answer
add comment