# Show the number of lines in margin

How to show the number of lines in a short passage like that:

``````(EVEN PAGE STYLE)
margin
on
rightside
The pilot and the passenger got into the plane. It        |   1
was a small plane. It had one engine. It was an old       |   2
plane. The pilot started the engine. "Are you okay?"      |   3
he asked the passenger. She said she was okay. They       |   4
were flying to an island. The island was only 30 mi-      |   5
nutes away. It would be a short flight. She was a         |   6
nurse. Her husband was a doctor. The doctor was on        |   7
the island. The doctor needed some medicine. She had      |   8
the medicine in her bag. The medicine would save a        |   9
young boy. The young boy was very sick. The plane         |  10
took off. The engine sounded funny. The pilot frowned.    |  11
"Is everything okay?" the passenger asked. "I'm afraid    |  12
not," said the pilot. "There's something wrong with       |  13
the engine. We have to land." He landed the plane. The    |  14
nurse got out of the plane. She looked around the air-    |  15
port. She saw another plane. This plane had two en-       |  16
gines. She walked over to the plane. "Is this a new       |  17
plane or an old plane?" she asked the pilot. The pilot    |  18
said it was a new plane. "Good," she said. "Please take   |  19
me to the island."                                        |  20
``````
-

Have a look at the `lineno` package. I use it often like follows:

``````% number the lines
\usepackage{lineno,xcolor}
% Running line numbers:
\linenumbers
\setlength\linenumbersep{5pt}
\renewcommand\linenumberfont{\normalfont\tiny\sffamily\color{gray}}
% Same, but that reset on every page:
%\pagewiselinenumbers
% Number only every 5:th line:
%\modulolinenumbers[5]
``````
-
Thanks to give advice! – Tau spit Nov 26 '11 at 12:55