# thick line in array environment

I am using an array environment, not tabular, which makes it impossible to use such commands as

\specialrule{.1em}{.05em}{.05em}

\Xhline{2\arrayrulewidth}

\noalign {\ifnum 0=}\fi \hrule height 1pt
\futurelet \reserved@a \@xhline


for making line thicker. I have solved the problem with the vertical lines by using the command

\newcolumntype{"}{@{\hskip\tabcolsep\vrule width 1pt\hskip\tabcolsep}}


and with the horizontal lines by using

\Xhline{1pt}


Is this correct or is there a better way? I thank you very much

Carlo Alberto

• array and tabular are the same code apart from the fact that array cells are in math mode, why do you say your tabular version is impossible? – David Carlisle Feb 18 '18 at 18:30
• I did not add the boldline package. Now I will use one (or more) of the suggested commands (the tip on the colored line is also very useful). Thanks – Intuition Digression Feb 18 '18 at 20:34

They all work within the array environment. Here is demo with makecell, boldline and booktabs. \cmidrule can even be used in the xmatrix environments:

    \documentclass{article}
\usepackage{array, boldline, makecell, booktabs, amsmath}
\newcommand\btrule[1]{\specialrule{#1}{0pt}{0pt}}
\usepackage[svgnames, table]{xcolor}

\begin{document}

\[ \begin{array}{l!{\vline width 1pt}c | r }
\arrayrulecolor{IndianRed} \Xhline{1pt}
1 & 2 & 3 \\
\hline
4 & 5 & 6 \\
\hline
7 & 8 & 9 \\
\Xhline{1pt}
\end{array}
\begin{array}{ lV{2.5}c | r }
\hlineB{2.5}
1 & 2 & 3 \\
\hline
4 & 5 & 6 \\
\hline
7 & 8 & 9 \\
\hlineB{2.5}
\end{array}
\begin{array}{ l!{\color{IndianRed}\vline width 1pt}c | r }
\arrayrulecolor{IndianRed}
\btrule{1pt}
1 & 2 & 3 \\
\arrayrulecolor{black} \hline
4 & 5 & 6 \\
\hline
7 & 8 & 9 \\
\arrayrulecolor{IndianRed}\btrule{1pt}
\end{array}
`