# Math equation alignment using align*

Problem: I'm am using align*to create an equation. The result is too aligned to the right.

Actual code example:

\begin{align*}
\textrm{Fusion}(C_{i}^k, C_{i}^l, k) = 1 \quad \textrm{S'il existe $C_{i+1}^j$ tel que } \\
\frac{(V_i^k \cup V_i^l) \cap V_{i+1}^j}{Max (|V_i^k \cup V_i^l|, |V_{i+1}^k|)} > k\% \quad; |V_i^k \cap V_{i+1}^j| > \frac{|C_i^k|}{2} \quad  \text{et} \quad  |V_i^l \cap V_{i+1}^j| > \frac{|C_i^l|}{2}
\end{align}


Result I am getting: Wanted result: the first line to be aligned to the left or the center but not to the right.

• align doesn't do its job by pure magic: you must tell what has to be aligned, with an ampersand before each aligned element. – Bernard Jan 15 '17 at 17:15

## 4 Answers

You're using the wrong tool, in my opinion:

\documentclass{article}
\usepackage{amsmath,mathtools}

\usepackage{lipsum} % for context

\DeclareMathOperator{\Fusion}{Fusion}

\begin{document}

\lipsum*
\begin{equation*}
\Fusion(C_{i}^k, C_{i}^l, k) = 1
\text{ s'il existe $C_{i+1}^j$ tel que }
\begin{dcases}
\frac{(V_i^k \cup V_i^l) \cap V_{i+1}^j}{\max (|V_i^k \cup V_i^l|, |V_{i+1}^k|)} > k\%, \\
|V_i^k \cap V_{i+1}^j| > \frac{|C_i^k|}{2}, \\
|V_i^l \cap V_{i+1}^j| > \frac{|C_i^l|}{2}.
\end{dcases}
\end{equation*}
\lipsum

\end{document} Alternatively, use three lines, not two:

\documentclass{article}
\usepackage{amsmath,mathtools}

\usepackage{lipsum} % for context

\DeclareMathOperator{\Fusion}{Fusion}

\begin{document}

\lipsum*
\begin{equation*}
\Fusion(C_{i}^k, C_{i}^l, k) = 1
\end{equation*}
s'il existe $C_{i+1}^j$ tel que
\begin{equation*}
\frac{(V_i^k \cup V_i^l) \cap V_{i+1}^j}{\max (|V_i^k \cup V_i^l|, |V_{i+1}^k|)} > k\%,
\quad
|V_i^k \cap V_{i+1}^j| > \frac{|C_i^k|}{2}
\quad\text{et}\quad
|V_i^l \cap V_{i+1}^j| > \frac{|C_i^l|}{2}.
\end{equation*}
\lipsum

\end{document} Always remember to add a minimal working example MWE.

Use & to control the alignment. See the following

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{align*}
&\textrm{Fusion}(C_{i}^k, C_{i}^l, k) = 1 \quad \textrm{S'il existe $C_{i+1}^j$ tel que } \\
&\frac{(V_i^k \cup V_i^l) \cap V_{i+1}^j}{Max (|V_i^k \cup V_i^l|, |V_{i+1}^k|)} > k\% \quad; |V_i^k \cap V_{i+1}^j| > \frac{|C_i^k|}{2} \quad  \text{et} \quad  |V_i^l \cap V_{i+1}^j| > \frac{|C_i^l|}{2}
\end{align*}
\end{document} Here is another solution, using the \shortintertext command, from mathtools, and the gather* environment, from amsmath. I took the opportunity to replace your pairs of | … | with an \abs command, for a better spacing. In the starred version, it has variable-sized vertical rules. Needless to load amsmath, since mathtools (an extension of amsmath) does it.

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{mathtools}

\DeclareMathOperator{\var}{Var}
\DeclarePairedDelimiter\abs\lvert\rvert

\begin{document}

\begin{gather*}
\shortintertext{Fusion$(C_{i}^k, C_{i}^l, k) = 1$ \enspace s'il existe $C_{i+1}^j$ tel que } \frac{(V_i^k ∪ V_i^l) ∩ V_{i+1}^j}{\max(\abs{V_i^k ∪ V_i^l}, \abs{V_{i+1}^k})} > k\,\%, \quad \abs{V_i^k ∩ V_{i+1}^j} > \frac{\abs{ C_i^k}}{2} \quad \text{et} \quad \abs{V_i^l ∩ V_{i+1}^j} > \frac{\abs{C_i^l}}{2}
\end{gather*}

\end{document} I would wrote yours equation on the following way:

\documentclass{article}
\usepackage{mathtools}
\DeclarePairedDelimiter\abs{\lvert}{\rvert}%

\begin{document}
Fusion $(C_{i}^k, C_{i}^l, k) = 1$ S'il existe $C_{i+1}^j$ tel que

\begin{align*}
\frac{(V_i^k \cup V_i^l) \cap V_{i+1}^j}{\max(\abs{V_i^k \cup V_i^l}, \abs{V_{i+1}^k})}
&   > k\% ; \\
\abs{V_i^k \cap V_{i+1}^j}
&   > \frac{\abs{C_i^k}}{2}
\quad\text{et}\quad  \abs{V_i^l}
\cap V_{i+1}^j| > \frac{\abs{C_i^l}}{2}
\end{align*}
\end{document} 