# Aligning equation to the left

I'm trying to have all my equation aligned to the left of the document instead of the center. I'm trying with flalign but fore some strange reason I get this :

Here is the code :

\documentclass[11pt, french]{article} %article report  book  letter  slides
\usepackage{blindtext}
\usepackage{geometry}
\geometry{
a4paper,
total={170mm,257mm},
left=20mm,
top=20mm,
}
\usepackage[french]{babel}
\selectlanguage{french}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{esint}
\begin{document}
\newcommand{\prt}[2]{\frac{\partial #1}{\partial #2}}

\begin{flalign}
C_x = C_{x_0} + k{C_z}^2 && \\
\prt{f}{C_z} = \frac{0.015+\frac{{C_z}^2}{20}-\frac{{C_z}^2}{10}}{\left( 0.015+{C_z}^2 \right)^2}&&\\
\prt{f}{C_z} = 0 \Leftrightarrow C_{x_0} + k{C_z}^2 - 2k{C_z}^2 = 0 \Leftrightarrow C_z = \sqrt{\frac{C_{x_0}}{k}} = 0,548 &&\\
C_x = 0.015 + \frac{1}{20} * 0.548^2 = 0.03&&\\
f = \frac{0.548}{0.03} = 18,26 &&
\end{flalign}

\end{document}


How can I fix my problem?

• \documentclass[11pt, french,fleqn]{article} Nov 21, 2022 at 15:51
• flalign is "full length align" not flush left and like all ams aligments has alignnment rlrlrl... so as you have everything in the first column it is right aligned. If you do not want to align the = use gather not (fl)align Nov 21, 2022 at 15:54
• See Align equation left which contains a more detailed explanation. Dec 1 at 10:27

Use [fleqn] to get equations flush left, and use gather not align as you are not aligning on =

\documentclass[11pt, french,fleqn]{article} %article report  book  letter  slides
\usepackage{blindtext}
\usepackage{geometry}
\geometry{
a4paper,
total={170mm,257mm},
left=20mm,
top=20mm,
}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\selectlanguage{french}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{esint}
\begin{document}
\newcommand{\prt}[2]{\frac{\partial #1}{\partial #2}}

\begin{gather}
C_x = C_{x_0} + k{C_z}^2  \\
\prt{f}{C_z} = \frac{0.015+\frac{{C_z}^2}{20}-\frac{{C_z}^2}{10}}{\left( 0.015+{C_z}^2 \right)^2}\\
\prt{f}{C_z} = 0 \Leftrightarrow C_{x_0} + k{C_z}^2 - 2k{C_z}^2 = 0 \Leftrightarrow C_z = \sqrt{\frac{C_{x_0}}{k}} = 0,548 \\
C_x = 0.015 + \frac{1}{20} * 0.548^2 = 0.03\\
f = \frac{0.548}{0.03} = 18,26
\end{gather}

\end{document}


As David Carlisle has already pointed in his answer, you need to specify the option fleqn, either as an option at the document class stage or when loading the amsmath package.

I would keep using an align setup for the five questions in your sample document.

\documentclass[11pt,french,fleqn]{article}
\usepackage{geometry}
\geometry{a4paper,total={170mm,257mm},left=20mm,top=20mm}
\usepackage{babel}
\usepackage{amssymb}
\usepackage{amsmath}
\newcommand{\prt}[2]{\frac{\partial #1}{\partial #2}}
\usepackage{showframe}
\begin{document}

\begin{align}
C_x &= C_{x_0} + k{C_z}^2  \\
\prt{f}{C_z} &= \frac{0.015+C_z^2/20-C_z^2/10}{(0.015+C_z^2)^2}\\
\prt{f}{C_z} &= 0