TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

In a normal table, you can use the \hline command to draw a horizontal line. I am trying to make this line a dashed horizontal line.

I have found the package dashrule via this answer, but this only works for \rule situations; i.e. it can't be directly used as a line in a table, and LaTeX won't compile it. Conversely, I've tried wrapping the \hdashrule in a multicolumn:

\multicolumn{5}{|c|}{\hdashrule{130mm}{1pt}{4pt}} \\

However, the padding around the table cell breaks the flow of the table, and the horizontal rule is not aligned with the other \hlines of the table. (It also means that the rule width must be specified manually.)

Is there any way to make a \hline dashed without resorting to tables-in-tables? Can you force a single table cell to have no vertical or horizontal margins and padding?

share|improve this question
Maybe you can help on this question: tex.stackexchange.com/questions/171518/…? – Idear Apr 14 '14 at 23:24

The arydshln package offers you the \hdashline and \cdashline commands which are the dashed counterparts of \hline and \cline, respectively. A little example (including also a vertical dashed line):



   column1a & column2a & column3a \\
   column1b & column2b   & column3b\\ \hdashline
   column1c & column2c & column3c \\ \cdashline{1-2}
   column1d & column2d & column3d \\


You can also specify how wide the dashes should be by specifying a ratio. For a dotted line write

share|improve this answer
It seems like that \usepackage{arydshln} is not compatible with \usepackage{tabularx}. They cannot coexist. Is there any resolution for this? – Idear Apr 14 '14 at 22:46
Maybe you can help on this question: tex.stackexchange.com/questions/171518/…? – Idear Apr 14 '14 at 23:23

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.