# How to add vertical and horizontal dashed lines in array and tabular enviroments?

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?

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.

-

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}


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

-
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 3 '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. –  dcmst Jul 4 '13 at 9:12