I want to add line numbering to a document. I can't use lineno because for one reason or another it does not detect all the lines of my document (I use a lot of math equations and this makes line numbering diffiult). Instead I tried to use vruler but I have some problems with it. What I want would be to number the lines of the sections independently of each other and to be able to stop using the ruler on other sections.
Example :
\documentclass{article}
\usepackage[verbose=true,letterpaper]{geometry}
\newgeometry{
textheight=9.5in,
textwidth=7in,
top=0.5in,
headheight=12pt,
headsep=25pt,
footskip=30pt
}
\usepackage{vruler}
\usepackage{lipsum}
\begin{document}
\section{Test}
\subsection{Test1}
\lipsum[2-4]
\subsection{Test2}
\setvruler[10pt][1][1][4][1][10pt][10pt][0pt][\textheight]
\lipsum[2-10]
\subsection{Test3}
\unsetvruler
\end{document}
This example does not work : the ruler does not begin at Test2 and does not stop at Test3.
EDIT : lineno does not work well in maths and I want to be able to avoid rewriting all the $
and $$
to \(
and \[
for every file I use.
lineno.sty
is the one will support your requirement, but you said it doesn't detectlinenumbers in math
, for this please refer tex.stackexchange.com/questions/461186/… hope it may helps you....$$
for display math. The LaTeX syntax is\[..\]
. tex.stackexchange.com/questions/503/why-is-preferable-to