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.

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 \\.

share|improve this question
2  
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 at 14:50

1 Answer 1

up vote 9 down vote accepted

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}
share|improve this answer
    
Perfect, thanks! –  Rob Stewart Apr 1 at 14:49

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.