I want these equations be justified. How can I do that? I mean all equation started at the same margin. Can anyone help me?
S.t.
\begin{equation}
\alpha_{ng}^{min}-\alpha_{ng}^{max}+\gamma_n\leq C_{ng}~~\forall g\in\phi^{G-n},\forall n\in\phi^N
\end{equation}
\begin{equation}
\beta_l^{min}-\beta_l^{max}+\frac{\epsilon_l^{min}}{\beta_l}-\frac{\epsilon_l^{max}}{\beta_l}-\gamma_{n}=0~~\forall l\in\phi^L\mid SB(l)=n\\
\end{equation}
\begin{equation}
\beta_l^{min}-\beta_l^{max}+\frac{\epsilon_l^{min}}{\beta_l}-\frac{\epsilon_l^{max}}{\beta_l}+\gamma_{n}=0~~\forall l\in\phi^L\mid RB(l)=n\\
\end{equation}
\begin{gather}
\begin{split}
&-\sum_{\forall l \in\phi^l\mid SB(l)=n}\epsilon_l^{min}+\sum_{\forall l \in\phi^l\mid RB(l)=n}\epsilon_l^{min}\\
&+\sum_{\forall l \in\phi^l\mid SB(l)=n}\epsilon_l^{max}-\sum_{\forall l \in\phi^l\mid RB(l)=n}\epsilon_l^{max}\nonumber\\
&+\delta_n^{min}-\delta_n^{max}=0~~\forall n\in \phi^n\\
\end{split}
\end{gather}
Best Answer
The default is for equations is to center them, and there are several way you can get the equations left aligned.
If you want all your equations left aligned you can use the
fleqn
option to theamsmath
package:Note that equations are aligned on the left but not flush with the margin. If you desire them further to the left you can adjust
\mathindent
. For instance, to get them to be flush with the margin you can apply\setlength{\mathindent}{0pt}
:If you don't want all the equations to be left aligned then you could use the
flalign
environment for the ones which you desire to be left aligned. This yields and output similar to the first image with the equations aligned to the left, but not flush with the margin.If you add a trailing
&
to at least one of the equations then you end up with the equations flush with the margin.And, as egreg pointed out, you can also use the
align
(oralignat
) environment which can be used to specify that the equations be left aligned. These won't be flush with the margin so the output will be as in the first image above.Notes:
showframe
package was used just to show the page margins. It is not needed in your actual use case.Code:
fleqn
option:Code:
flalign
environment:Code:
align
environment: