# How to Draw Horizontal Lines in LaTeX

Lines can be drawin in LaTeX using the \line function. This takes an x-slope, y-slope and length like so:

\line(x-slope,y-slope){length}

To draw a horizontal line (or horizontal rule), set the x-slope to 1 and the y-slope to zero.

Depending on the margins which have been set, a length of 450 will draw a line which is the width of the page (minus the margins).

If you’re looking for a clean line to divide the page, try the following:

\begin{center} \line(1,0){250} \end{center}

Reference