12

I want to present big matrices using concatenation of rows and columns with dashed lines. Also, I need to do the same for some tables. Is there any way to insert dashed lines in arrays and tabulars, or should I use \cdot or something similar to emulate it?

A sample I made using the dcmst's answer:

enter image description here

But, I hope to have a better position and extend for dashed lines. The source associated to this sample is:

\documentclass{article}
\usepackage{arydshln}
\begin{document}

\begin{tabular}{ccc;{0.4pt/10pt}c;{0.4pt/10pt}c;{0.4pt/10pt}c}
text & text & text & & & text \\
text & text & text & & & text \\
text & text & text & & & text \\
\cdashline{1-6}[0.4pt/10pt] \\
\cdashline{1-6}[0.4pt/10pt] \\
\cdashline{1-6}[0.4pt/10pt] \\
text & text & text & & & text 
\end{tabular}

\end{document}

Thanks.

David Carlisle
  • 757,742
imriss
  • 777

1 Answers1

16

you can use the arydshln package which adds \hdashline for horizontal and : for vertical dashed lines

\documentclass{article}
\usepackage{arydshln}
\begin{document}

\begin{tabular}{:c:c:c:}
\hdashline
text & text & text \\
\hdashline
text & text & text \\
\hdashline
text & text & text \\
\hdashline
\end{tabular}

\smallskip
$\begin{array}{:c:c:c:}
\hdashline
1 & 2 & 3 \\
\hdashline
4 & 5 & 6 \\
\hdashline
7 & 8 & 9 \\
\hdashline
\end{array}$

\end{document}

enter image description here

Check section 2.7 of the manual for some issues with other packages.

David Carlisle
  • 757,742
d-cmst
  • 23,095
  • Thanks. I will update the question to show an example I made using your answer for better clarity of what I am looking for. Is there any way to improve the position and also the extend of dashed lines? – imriss Jul 03 '13 at 19:33
  • @imriss after seeing the edit I'm not so sure you can achieve that with arydhsln... I played a bit with it but I was not able to achieve the level of precision you'd like. So maybe another approach may be nedeed here. – d-cmst Jul 04 '13 at 09:12