Compiling this MWE

    Compilation fails


! Improper \prevdepth.
<recently read> \prevdepth

l.5 \begin{document}


To work around this issue, I could switch from revtex4-1 to article; comment out \linenumbers; or remove the siunitx package - obviously, these are not ideal solutions. Is there a better one?

  • 1
    move \linenumbers after \begin{document} ? Sep 7, 2018 at 20:41
  • @DavidCarlisle yes, thank you! I had tried \AtBeginDocument, but I had to move it into the document body, it seems.
    – bers
    Sep 7, 2018 at 21:36
  • 1
    The problem is that \linenumbers redefines \par and this is not really a good thing to do in the preamble. The package doesn't say explicitly to issue \linenumbers after \begin{document}, but it's how it should be done.
    – egreg
    Sep 7, 2018 at 22:11

1 Answer 1


You can move \linenumbers after \begin{document}.

  • 1
    – egreg
    Sep 7, 2018 at 22:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .