latex-lineno / lineno

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

TexLive 2023, amsmath, allowdisplaybreaks: mathlines option causes text to be omitted from pdf #7

Closed PH111P closed 1 year ago

PH111P commented 1 year ago

Recently, I upgraded to TexLive 2023 (texlive-core 2023.66587-2 / pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023/Arch Linux)) and I noticed that parts of my drafts disappeared from the final pdf.

In particular, using \allowdisplaybreaks (in particular \allowdisplaybreaks[3] or [4]) from amsmath seems to break things. Consider the following MWE (thanks also to @tomaszkociumaka for a first version of the MWE). Everything between the two align's is cut out.

You may also test this with the file linenoamsmathdemo.tex; adding \allowdisplaybreaks reduces its length from 10 pages to 3 pages.

\documentclass{article}
%\usepackage[mathlines]{lineno} % bad
\usepackage{lineno} % good
\linenumbers

\usepackage{amsmath}
\allowdisplaybreaks %bad

\begin{document}
\begin{align*}
    &a
\end{align*}
This line does not appear in the output with TexLive 2023.
\begin{align*}
 & b
\end{align*}
This should not be the first line.

\end{document}
kwwette commented 1 year ago

@PH111P Thanks for reporting. I think this should be fixed in the latest version of lineno.sty: https://github.com/latex-lineno/lineno/blob/master/lineno.sty. Could you please test this version to make sure it fixes your document? I'll then make a new release.

ste-cas commented 1 year ago

I had the same issue with a manuscript I was reviewing and can confirm that with the latest version of lineno.sty the text appears correctly.

kwwette commented 1 year ago

@ste-cas Thanks for the testing. I've just made a new release (v5.2) of lineno and uploaded to CTAN, should appear in a day or so.