Text FormattingPlacing a horizontal line in text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
dkaplan
Posts: 6
Joined: Tue May 19, 2009 4:18 pm

Placing a horizontal line in text

Post by dkaplan »

Hi all,
I wish to place a horizontal line in a text separating a title from the rest of the text. For example

Blah Blah Blah
_________________________________________________________

more blah blah blah


I tried \rule but I end up with an error. This seems simple, but I have unable to figure out how to do this.
Thanks in advance,

David

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Placing a horizontal line in text

Post by gmedina »

Hi,

the following example shows some options:

Code: Select all

\documentclass{article}

\begin{document}

\noindent Text

\noindent\rule{\linewidth}{0.4pt}

\vspace*{2cm}

\noindent Text

\noindent\rule[7pt]{\linewidth}{0.4pt}

\vspace*{2cm}

\noindent Text

\noindent\hrulefill

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply