[Tex/LaTex] amsmath fleqn doesn’t work

amsmath

I would like to have my equations left aligned. I use fleqn to achieve this, but unfortunately, it seems everything is getting right aligned? I really don't know why this happens. Can someone help me out please?

My code:

\usepackage[fleqn]{amsmath}
\usepackage{graphicx}
\usepackage[dutch]{babel}
\usepackage{url}
\usepackage{fancyhdr}
\usepackage{emptypage}
\usepackage{wrapfig}
\usepackage{tocbibind}
\usepackage{ragged2e}
\usepackage{titlesec}
\usepackage[Gray, squaren, thinqspace, thinspace]{SIunits}

\begin{align*}
    \frac{dm}{dt} = \unit{30560}{kg/u} \\
    \rho = \unit{957}{kg/m^3} \\
    D_{extern} = \unit{114,3}{mm} \text{(Uitwendige diameter van de leiding)} \\
    d = \unit{2,9}{mm} \text{(Dikte van de leiding)}
\end{align*}

Best Answer

welcome to tex.sx.

you have specified the option [fleq] instead of [fleqn], but i suspect that is just a typo.

however, you haven't specified any alignment point, so it is assumed that these lines will be aligned at the right, since it's usually the case that alignment is on a sign of relation, in the middle.

to align on the left, put an & at the beginning of each line in the align group:

\documentclass{article}
\usepackage[fleqn]{amsmath}
\usepackage[Gray, squaren, thinqspace, thinspace]{SIunits}

\begin{document}

\begin{align*}
  & \frac{dm}{dt} = \unit{30560}{kg/u} \\
  & \rho = \unit{957}{kg/m^3} \\
  & D_{extern} = \unit{114,3}{mm} \text{(Uitwendige diameter van de leiding)} \\
  & d = \unit{2,9}{mm} \text{(Dikte van de leiding)}
\end{align*}

\end{document}

output of example code

Related Question