TeXnik - Tips TeX and LaTeX


Welcome to the TeXnik website (under construction)

Linenumbers
TUG logo

Main page

Index
UK FAQ
Documentation
Software
CTAN
Search CTAN:

Statistics

Google c.t.t.

Google d.c.t.t.

 


 


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: Thu Apr 25 01:36:17 CEST 2024 ; file is: 1762.41747685185 days old
contact webmaster _at_ TeXnik.de