9

I realise that this has been asked many times before, but no answers I've found seem to provide a solution to my question.

I'd like to left align all text in an align block, in:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
b := (a \oplus s_1) \oplus s_2 \\
e := 0 \\
\end{align}

\end{document}

This presents me with:

enter image description here

If I change the first line to \documentclass[fleqn]{article} , then instead I get:

enter image description here

What I'm really looking for is the ability to align the first character on every line in the align block, to the far left i.e. so that b and a are vertically aligned. I would much rather not have to use a character such as & to guide the alignment, I'd prefer to always be the first character of each word after a \\.

  • 3
    i don't think you want the \\ after the last line; that gives you an empty (but numbered) extra line in the output. – barbara beeton Apr 1 '14 at 14:50
10

Don't use align. Use gather instead.

\documentclass[fleqn]{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
b := (a \oplus s_1) \oplus s_2 \\ 
e := 0
\end{gather}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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