# Why fleqn option lead to line number disappears for paragraph followed by equation?

When I use fleqn equation for amsmath package, I found that the paragraphs followed by equation is not numbered by lineno package. An example is

\documentclass{article}
\usepackage[fleqn]{amsmath}
\usepackage{lineno}
\usepackage{blindtext}
\begin{document}
\linenumbers
\blindtext[2]
$$\label{eq:test} a^2+b^2=c^2$$
\blindtext[3]
\end{document}


If the fleqn option is not used in the above code, the lineno package works well and all the text lines is numbered.

How can I make lineno work when the fleqn option is used?

You need to use a linenomath environment around the equation.

\documentclass{article}
\usepackage[fleqn]{amsmath}
\usepackage{lineno}
\usepackage{blindtext}
\begin{document}
\linenumbers
\blindtext[2]

\begin{linenomath}
$$\label{eq:test} a^2+b^2=c^2$$
\end{linenomath}

\blindtext[3]
\end{document}

• Thanks for your answer. By adding a empty line between the text paragraph and the equation, the paragraph can be numbered. But the additional empty lines introduce the extra large vertical space between the text and math equation. My goal is to numbered the text paragraph with the normal space. – Ice0cean Aug 16 at 7:24
• @Ice0cean yeah sorry, it was just to make it easier to see. Use the linenomath environment around the equation. – Niklas Aug 16 at 7:25