Code: Select all
\begin{equation}
M = \left[ \begin{array}{c|ccc}
A & 0 & 0 & 0 \\
\hline 0 & B & 0 & 0 \\
0 & 0 & C & 0 \\
0 & 0 & 0 & D \\
\end{array} \right]
\end{equation}
Code: Select all
\begin{equation}
M = \left[ \begin{array}{c|ccc}
A & 0 & 0 & 0 \\
\hline 0 & B & 0 & 0 \\
0 & 0 & C & 0 \\
0 & 0 & 0 & D \\
\end{array} \right]
\end{equation}
NEW: TikZ book now 40% off at Amazon.com for a short time.
Code: Select all
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[dvipsnames,table]{xcolor}
\begin{document}
\begin{equation}
\arrayrulecolor{gray!50}
M = \left[
\begin{array}{c|ccc}
A & 0 & 0 & 0 \\
\hline 0 & B & 0 & 0 \\
0 & 0 & C & 0 \\
0 & 0 & 0 & D \\
\end{array}
\right]
\end{equation}
\end{document}
Just habit. Drop it if you want. For details about this option see the xcolor manual.Cham wrote:[…] But why the option "dvipsnames"? […]
It's a percentage value. For details about color specification see the xcolor manual.Cham wrote:[…] And what is the range of the gray color parameter ? I thought that it was from 0 to 255, but it gives an error if above 200.
A percentage ? It should then give an error if the value is higher than 100%. I don't get any error until 201.localghost wrote: It's a percentage value.
NEW: TikZ book now 40% off at Amazon.com for a short time.