6

align environment without any explicit alignments points (given by &) right justifies the equations in the block. They can be left justified by putting & at the beginning of each equation. Is there any way to left justify them without starting &-s? Maybe some special environment or option? It seems to be an extra work to tell the compiler again and again that I want left alignment on each line.

3
  • 1
    See How can I use an align environment flush left?
    – Werner
    Sep 18, 2013 at 23:05
  • That does not work. That left aligns the equation block. The equations within the block a still right aligned. I tried \usepackage[fleqn]{amsmath} and \begin{align*} 1-3=2\ 34343234234-98394895835=239283 \end{align*}
    – xivaxy
    Sep 19, 2013 at 0:45
  • 1
    Close-voters: please notice that according to the comment, this is not a duplicate. xivaxy is not interested in using the fleqn option nor in having the equation block flushed left. Sep 19, 2013 at 4:00

3 Answers 3

9

Left justification is the default (with fleqn) for the gather-environment. So simply use that, after all align is for aligning at user-specified points, which is not what you need.

\documentclass{article}

\usepackage[fleqn]{amsmath}

\begin{document}

\begin{gather*}
1-3=2 \\ 
34343234234-98394895835=239283
\end{gather*}

\end{document}

output

1
  • 1
    That works great! When it comes to left alignment, everyone usually mentions [fleqn], but does not say it should be in combination with gather.
    – xivaxy
    Sep 19, 2013 at 16:14
3

If I understand the question correctly, you can use an array with one column with left alignment:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
\begin{array}{@{}l@{}} 
1-3=2 \\ 
34343234234-98394895835=239283 
\end{array}
\]

\end{document}

enter image description here

3

If you wish to have all your equations to be flush left, pass the [fleqn] option to amsmath, thereby pushing content to the left. Then patch \align@preamble in the following way:

\makeatletter
\patchcmd{\align@preamble}{\hfil}{}{}{}
\makeatother

This removes the right-flushing \hfil from the preamble.

enter image description here

\documentclass[fleqn]{article}
\usepackage{amsmath,etoolbox}% http://ctan.org/pkg/{amsmath,etoolbox}
\makeatletter
\patchcmd{\align@preamble}{\hfil}{}{}{}
\makeatother
\begin{document}

\begin{align}
  1-3=2 \\ 
  34343234234-98394895835=239283 
\end{align}

\end{document}

If you wish to have the content all the way flush with the left margin, add

\setlength{\mathindent}{0pt}

to your preamble as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .