TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I make a horizontal dashed line in LaTeX?

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

share|improve this question

You can look at the dashrule package, for example.

share|improve this answer
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
It would also be great if this answer included a simple example of how to use dashrule. – g33kz0r Apr 21 at 18:08

With Plain leaders, for example:

\hbox to \hsize{\dashfill\hfil}

Changing the spacing is then a matter of redefining the dashfill's hbox:

\def\dashfill{\cleaders\hbox to 2em{-}\hfill}
share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.