[Tex/LaTex] Line numbers restarting

line-numbering

My line numbers are restarting midpage whenever there is a new section heading or a new environment (like an indented quote). Is there something I need to add to these commands (below) in order to make sure that the page numbers are continuous within each page?

\reversemarginpar
\begin{pagewiselinenumbers}

\linenumbers
\modulolinenumbers[5]

Best Answer

Using lineno package, don't use double dollar $$ $$ but use \[ \] instead.

It works perfectly.

\documentclass{report}
\usepackage{lineno,lipsum}

\begin{document}
\lipsum[2]

\section{title}

\lipsum[1]
\begin{quotation}
    \lipsum[2]
\end{quotation}

\lipsum[2]
\end{document}

enter image description here

Related Question