latex-lineno / lineno

lineno – Line numbers on paragraphs
Other
11 stars 2 forks source link

line numbers missing on paragraphs preceding the equation* float #6

Closed calebmiller closed 1 year ago

calebmiller commented 1 year ago

I have a number of equation* floats in a document to remove the equation number from being listed. The text between the section header and the start of the equation are skipped for line numbers. document type is revtex4-2

I can put together a MWE if requested

kwwette commented 1 year ago

@calebmiller Thanks, an MWE would be useful.

calebmiller commented 1 year ago

\documentclass{article} \usepackage{amsmath} \usepackage{lineno} \usepackage{lipsum} \begin{document} \linenumbers This paragraph will have line numbers. \lipsum[1-1] \begin{equation} a=b \end{equation} This paragraph will not have line numbers. \lipsum[2-2] \begin{equation*} b=c \end{equation*} This paragraph will have line numbers again. \lipsum[3-3] \begin{equation} c=a \end{equation} \end{document}

I discovered in making the MWE the loading ordering of the amsmath package matters. If amsmath is added after the lineno package no line numbers appear at all.

kwwette commented 1 year ago

@calebmiller With your MWE I get the following output, which looks fine to me: Screenshot from 2023-02-20 13-41-25 Have you tested this with the latest version (5.1) of lineno?

calebmiller commented 1 year ago

I investigated and found overleaf and my local install both using v4.41. I updated the local install (miktek) and it found more recent packages and the MWE performs correctly now. On overleaf the problem persists but that's not an issue with lineno.