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: Wed Oct 16 21:15:10 CEST 2019 ; file is: 110.236145833333 days old
contact webmaster _at_ TeXnik.de