I was trying to get all the lines numbered in my document, as explained in this question: Show the number of lines in margin
However, when I added the lines:
\usepackage{lineno}
\linenumbers
to the top of my document, the document got split into hundreds of pages – one line per page. How can I get it to work?
EDIT: The preamble of the document looks like this:
\documentclass[12pt,twoside,pra,aps,amssymb,amsfonts,amsmath,tightenlines]{revtex4}
\usepackage{dsfont}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{natbib}
%\usepackage{url}
\usepackage{lineno}
\linenumbers
EDIT 2: Minimal example:
\documentclass[12pt,twoside,pra,aps,amssymb,amsfonts,amsmath,tightenlines]{revtex4}
\usepackage{dsfont}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{natbib}
%\usepackage{url}
\usepackage{blindtext}
\usepackage{lineno}
\pagewiselinenumbers
\begin{document}
\Blindtext
\end{document}
Best Answer
Your MWE can be greatly reduced to be
With such a simple MWE it becomes clear that the problem is an interaction between
revtex4
andlineno
. Searching thelineno
documentation yields:Leading to a working MWE of