Welcome to the TeXnik web site

Linenumbers
TUG logo

Main page

Index
English FAQ
Documentation
Software
CTAN
Search CTAN:
Main Server

Statistics

 


 


More Books

The package is availabe at TeX Archive Network (CTAN). Take care that you always use the latest version. Just as all other packages declare it in the LaTeX preamble with
\usepackage{lineno}

1 Numbered lines

Without any options the lines are numbered by default with the following values:
\linenumberwidth=10pt
\linenumbersep=10pt
\modulolinenumbers[1]
\quotelinenumbersep=\linenumbersep
\def\linenumberfont{\normalfont\tiny\sffamily}
You can change these values in the usual way.

The syntax for the environment is simple:

\begin{linenumbers}
     .....
bla bla bla the text
     .....
\end{linenumbers}
If you like the numbers on the right side of the page, change the option with \rightlinenumbers. The resetting of the counter can be done with (for example): \resetlinenumber[5]. Pay attention for the square brackets!

2 Marked lines

If you like to mark some lines with any character, you can redefine the commands \thelinenumber with
\renewcommand\thelinenumber{>} 
\def\linenumberfont{\normalfont\normalsize\sffamily}
\renewcommand\thelinenumber{>} 
and you'll get quoted lines just in an email reply.

On the other hand you can redefine the command \makelinenumber with

\renewcommand\makeLineNumber{\hss\ !\rlap{\hskip\textwidth\ !}}
to get bothsided marked text.

local time: Fri May 22 19:16:31 UTC 2026; file is: 1.2247 days old
contact webmaster _at_ TeXnik.de