Latex code for setting hline attributes (color, dashed) and / or vertical line attributes in a table

I want the hline color, for example:

\hline[color=red,width=2mm,dashed] 

or something like that.

Below is a weak attempt that fails. I put textcolor gray around {|} to try and make it gray. Ideally, I want him to be gray and broken. Also note the color of the text around the {\hline} tag. Any help would be appreciated using latex syntax.

Are there attributes for \hline ? If so, where is the documentation ?. There is a reason I love php.net for my other programming needs.

  \begin{array}{c\textcolor{gray}{|}cccccccccc} & \textcolor{gray}{P_1} & \textcolor{gray}{P_2} & \textcolor{gray}{P_3} & \textcolor{gray}{P_4} & \textcolor{gray}{P_5} & \textcolor{gray}{P_6} & \textcolor{gray}{P_7} & \textcolor{gray}{P_8} & \textcolor{gray}{P_9} & \textcolor{gray}{P_{10}}\\ \textcolor{gray}{\hline} \textcolor{gray}{P_1} &0&0&0&0&0&0&0&0&0&0\\ \textcolor{gray}{P_2} & 0&0&0&0&0&0&0&0&0&0\\ \textcolor{gray}{P_3} &0&0&0&0&0&0&0&0&0&0\\ \textcolor{gray}{P_4} &0&1&1&0&0&0&0&0&0&0\\ \textcolor{gray}{P_5} &1&1&0&0&0&0&0&0&0&0\\ \textcolor{gray}{P_6} &0&0&0&0&0&0&0&0&0&0\\ \textcolor{gray}{P_7} &1&1&0&0&1&1&0&0&0&0\\ \textcolor{gray}{P_8} &1&0&0&1&0&1&0&0&0&0\\ \textcolor{gray}{P_9} &0&0&1&0&0&0&0&0&0&0\\ \textcolor{gray}{P_{10}} &0&0&0&0&0&1&0&1&0&0 \end{array} 
+4
source share
1 answer

First import the color package, for example:

 \usepackage{color} 

And then use this .sty file and do it (in a table context):

 \textcolor{gray}{\hdashline} 
+6
source

All Articles