# How to left align an equation, with a brace as left delimiter? [duplicate]

This is my code:

\begin{document}
$$\sigma(s,i) = \left\{ \begin{array}{ll} \tau_{si} & \mbox{si } \{s,i\} \in E \\ \infty & \mbox{sinon.} \end{array} \right.$$
\end{document}


I have the equation in the center. How can I modify the code to have the equation to the left ?

• Just this one equation or every displayed equation? If the latter, use \usepackage[fleqn]{amsmath} and please, don't use $$...$$ but $...$. – Gonzalo Medina May 24 '13 at 18:45
• evry displayed eqation – researcher May 24 '13 at 18:46
• ... and please, don't use \left\{ and array and \right. but \begin{cases} your stuff \end{cases} – jmc May 24 '13 at 18:48
• @researcher, you might consider using other tags. Your code does not have much to do with {latex3}, but more with {equations}. – jmc May 24 '13 at 18:51
• Did Werner's link help? – mafp May 24 '13 at 19:25

You can use the fleqn option for amsmath:

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

\begin{document}

$\sigma(s,i) = \begin{cases} \tau_{si},\quad &\text{si } \{s,i\} \in E \\ \infty, & \text{sinon.} \end{cases}$

\end{document}


The \quad command is optional (though recommended by some authors) and introduces some horizontal space between the expressions and the conditions.

Notice also the use of $...$ instead of the $$....$$ TeX syntax and of the cases environment and the \text command (also from amsmath).

• I think that the \quad should not be there, right? – jmc May 24 '13 at 18:53
• @jmc why not? It's a common recommendation to leave a \quad space between the expression and the condition in a definition by cases. – Gonzalo Medina May 24 '13 at 18:53
• I do not know why one would do that. Please enlighten me... – jmc May 24 '13 at 18:55
• @jmc Take a look at tex.stackexchange.com/questions/25810/… – user13907 May 24 '13 at 19:02
• @Papiro I was just trying to find that answer, but you were faster. Thanks! – Gonzalo Medina May 24 '13 at 19:03