0

How can I align equations to the left in latex? enter image description here this is my code

\documentclass[10pt]{article}

\usepackage{nccmath}

\begin{document} \begin{fleqn}[\parindent] \begin{equation}\label{eq51} \begin{aligned} % \nonumber to remove numbering (before each equation) |e||g_s|-\frac{e^2}{\epsilon+|e|}\bar{g}_s\leq0\ |\hat{e}||\beta_s|-\frac{e^2|\hat{e}|}{e^2+\epsilon}\bar{\beta}_s\leq0\ |e||u_c|/\bar{u}-\frac{e^2}{\epsilon+|e|}\bar{u}_c/\bar{u}\leq0\ \end{aligned} \end{equation} \end{fleqn}

\end{document}

Milito
  • 45

2 Answers2

3

I don't think that equations should be sometimes centered and sometimes flush left. Choose your style and stick with it, which means “either use the fleqn document class option or not”.

If you want flush left equations (with some margin such as \parindent), you do

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

\usepackage{lipsum}% for mock text

\AtBeginDocument{\setlength{\mathindent}{\parindent}}

\begin{document}

\lipsum[1][1-3] \begin{equation} 1+1=2 \end{equation} \lipsum[2][1-3] \begin{equation} \begin{aligned} & |e||g_s|-\frac{e^2}{\epsilon+|e|}\bar{g}_s\leq0\ & |\hat{e}||\beta_s|-\frac{e^2|\hat{e}|}{e^2+\epsilon}\bar{\beta}_s\leq0\ & |e||u_c|/\bar{u}-\frac{e^2}{\epsilon+|e|}\bar{u}_c/\bar{u}\leq0 \end{aligned} \end{equation} \lipsum[3][1-3]

\end{document}

enter image description here

The initial & is needed because aligned makes pairs of columns, one right and one left aligned.

egreg
  • 1,121,712
2

As mentioned in the comments, try putting & at the beginning of every line, as follows:

\documentclass[10pt]{article}

\usepackage{nccmath}

\begin{document} \begin{fleqn}[\parindent] \begin{equation}\label{eq51} \begin{aligned} % \nonumber to remove numbering (before each equation) & |e||g_s|-\frac{e^2}{\epsilon+|e|}\bar{g}_s\leq0\ & |\hat{e}||\beta_s|-\frac{e^2|\hat{e}|}{e^2+\epsilon}\bar{\beta}_s\leq0\ & |e||u_c|/\bar{u}-\frac{e^2}{\epsilon+|e|}\bar{u}_c/\bar{u}\leq0\ \end{aligned} \end{equation} \end{fleqn}

\end{document}

enter image description here