# Numbering all lines in a presentation

I would like everyline of a presentation to be numbered. Like the lineno package will do.

I tried the following but it does not print line numbers. I don't see why, I know there are some \par caveats. But I don't really understand them.

\documentclass{beamer}
\usepackage[mathlines]{lineno}

\linenumbers

\begin{document}

\begin{frame}

A floating line

\begin{theorem}
Some line in a theorem
\end{theorem}

\begin{linenomath}
\begin{eqnarray*}
x + y
\end{eqnarray*}
\end{linenomath}

\end{frame}

\end{document}


-

As mentioned in the lineno manual, line numbers do not automatically apply to boxed material. In beamer each slide is typeset as a box, hence no numbers. Thus you will need to add \internallinenumbers and possibly appropriate \resetlinenumber[<number>] statement to each frame:

\documentclass{beamer}
\usepackage{lineno}
\linenumbers
\begin{document}

\begin{frame}
\internallinenumbers
A line

Another line

A very long line.
A very long line.
A very long line.
A very long line.
A very long line.
A very long line.

Some maths: $y = mx + c$

\begin{linenomath*}
$$y = mx + c$$
\end{linenomath*}

\end{frame}

\end{document}


As you'll notice, the way beamer sets display maths (and other stuff) 'behind the scenes' means that the numbering can be a bit odd. If just numbering text is acceptable then

\documentclass{beamer}
\usepackage{lineno}
\linenumbers
\begin{document}

\begin{frame}
\begin{internallinenumbers}
A line

Another line

A very long line.
A very long line.
A very long line.
A very long line.
A very long line.
A very long line.

Some maths: $y = mx + c$
\end{internallinenumbers}

$$y = mx + c$$

\end{frame}

\end{document}


is rather better.

-