I've looked at questions about numbering each line in Latex document, and using package lineno
and tried all the tricks shown in the questions and answers, but nothing is working for me. The package still do not number each line. I want each line numbered, including math and text.
Has something changed recently? I tried
\usepackage[]{lineno}
\linenumbers
Tried
\usepackage[]{lineno}
\internallinenumbers
Tried
\usepackage[]{lineno}
\linenumbers
\setrunninglinenumbers
\runninglinenumbers
Tried
\usepackage[]{lineno}
\internallinenumbers
\setrunninglinenumbers
\runninglinenumbers
This last one does the best job, but it stil skips some equations and some text lines as well by random.
Here is a MWE using the above last configuration, as it seems to work best
\documentclass[12pt]{article}%
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}%
\usepackage[]{lineno}
\internallinenumbers
\setrunninglinenumbers
\runninglinenumbers
\begin{document}
\section{problem (a), page 88}%
\[
y^{\prime\prime}=\frac{1}{x^{5}}y
\]
Irregular singular point at $x\rightarrow0^{+}$.
Let $y=e^{S_{0}\left(x\right)}$ and the above becomes%
\begin{align*}
y\left( x\right) & =e^{S_{0}\left( x\right) }\\
y^{\prime}\left( x\right) & =S_{0}^{\prime}e^{S}\\
y^{\prime\prime} & =S_{0}^{\prime\prime}e^{S_{0}}+\left( S_{0}^{\prime
}\right) ^{2}e^{S_{0}}\\
& =\left( S_{0}^{\prime\prime}+\left(S_{0}^{\prime}\right) ^{2}\right)e^{S_{0}}
\end{align*}
Substituting back into $\frac{d^{2}}{dx^{2}}y=x^{-5}y$ gives
Hence%
\begin{align*}
S_{1} & \thicksim-\int\frac{S_{0}^{\prime\prime}}{S_{0}^{\prime}}dx\\
& \thicksim-\ln S_{0}^{\prime}+c
\end{align*}
\end{document}
Here is the pdf generated using lualatex foo.tex You can see it skips lines and some math.
I tried solution given in number-every-line-of-pages/16012#16012 but the code given in the answer there did not even compile for me. Many errors. May be things changed since answer was old.
my question is: How can one number each line (math and text) in document?