LaTeX Wiki
Advertisement

The command \hline in LaTeX is most commonly used in tables. It is used to make a horizontal line across the width of the table.

Examples[]

Markup
\begin{tabular}{ cccc }
  1 & 2 & 3 & 4 \\ \hline
  5 & 6 & 7 & 8
\end{tabular}
Renders as Capture-0
Markup
\begin{tabular}{ |c|c|c|c| }
  \hline
  1 & 2 & 3 & 4 \\
  \hline
  5 & 6 & 7 & 8 \\
  \hline
\end{tabular}
Renders as Capture-2

Note that a double backslash \\ is required after the last row to produce a horizontal rule below the table.

Advertisement