# How can I make a horizontal dashed line?

How can I make a horizontal dashed line in LaTeX?

Just writing lots of single dashes results in a continuous horizontal line.

-

You can look at the dashrule package, for example.

-
Nice... a lot of flexibility :) –  meep.meep Mar 3 '11 at 10:26
please don't link directly to the PDF of a package, but to the package description (ctan.org/pkg/dashrule) or the catalog entry (ctan.org/tex-archive/help/Catalogue/entries/dashrule.html) instead. Thanks. –  Martin Scharrer Mar 3 '11 at 11:25
@Martin Yes, that makes more sense. Fixed now! –  chl Mar 3 '11 at 12:25

What about adding spaces between the dashes: - - - - - - ? When I try it, it works just fine. Or do you want something else?

-

\def\dashfill{\cleaders\hbox{-}\hfill}

\def\dashfill{\cleaders\hbox to 2em{-}\hfill}