lineno
skips the line numbering in this case:
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{lineno}
\linenumbers
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit:
\begin{align}
1+1=2
\end{align}
\end{document}
but is fine with
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{lineno}
\linenumbers
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit:
\begin{align}
1+1=2
\end{align}
\end{document}
Note that though this sounds a lot like this question. I don't believe the answer is related, since this doesn't use $$. Is the latter somehow more correct?
Best Answer
In essence, this is the same, since
align
issues$$
before assembling the environment contents. Here is the definition of thealign
environment inamsmath
:So, at
\begin{align}
is equivalent towhere
\start@align
is defined to take three parameters and condition appropriately. In the definition of\start@align
, I've marked the conditionals, as well as the final$$
for entering display math mode:The conclusion? Use an empty line (or paragraph break). The output with or without is the same, except in this case with
lineno
.