# Thickness control on vertical and horizontal lines

Regarding this example, having now:

\documentclass[10pt]{article}

\begin{document}

\arrayrulewidth=0.7pt
\begin{tabular}{|c|c|l|c|c|c|l|}
\cline{1-3}\cline{5-7}
&  &  &  &  &  &   \\
&  &  &  &  &  &  \\
&  &  &  &  &  &  \\
\cline{1-3}\cline{5-7}
&  &  &  &  &  &  \\
&  &  &  &  &  &   \\
&  &  &  &  &  &  \\
\cline{1-3}\cline{5-7}
&  &  &  &  &  &  \\
&  &  &  &  &   &  \\
&  &   &  &  &  &  \\
\cline{1-3}\cline{5-7}
&  &  &  &  &  &   \\
&  &   &  &  &  &  \\
&  &   &  &  &  &  \\
\cline{1-3}\cline{5-7}
\end{tabular}

\end{document}


The command \arrayrulewidth=0.7pt controls the thickness for both vertical and horizontal lines, but now I want to reduce the thickness of the inner lines (both vertical and horizontal), and keep the thickness of the external lines.

I wanted to add color to the table but I couldn't. I used \arrayrulecolor{[color here]} but in only colored the inner lines, and I want to color the whole table.

• Why are you drawing two tables in one? – cfr Feb 25 '16 at 1:21
• Ah, it's just because I wanted to put two ones together and then I created a space between those. – Alejandro Feb 25 '16 at 2:09
• Just it would be a lot easier if they were 2 rather than 1. – cfr Feb 25 '16 at 2:11
• Can you provide an answer then as an optional way to do it? – Alejandro Feb 25 '16 at 2:12

Since you requested it, here's a solution for a split version of the table i.e. 2 tables rather than 1. Here, we remove the outer lines from the tabular specifications and wrap them in boxes. efbox allows us to specify the rule colour, line width and margin. To make the box fit closely, eliminating any gap between the rules and the table, we set the margin to zero. The line width is then set to 0.7pt and \arrayrulewidth can be left as default or altered as desired. All we need do is set the colours of the box rules and the \arrayrulecolor to the colour(s) we desire. Here, I use a shade of blue.

\documentclass[10pt]{article}
\usepackage[table]{xcolor}
\usepackage{efbox}
\efboxsetup{linecolor=blue!75!black, linewidth=.7pt, margin=0pt}
\begin{document}
\arrayrulecolor{blue!75!black}
\efbox{\begin{tabular}{c|c|l}
&  &       \\
&  &      \\
&  &     \\
\hline
&  &       \\
&  &      \\
&  &     \\
\hline
&  &      \\
&  &      \\
&  &     \\
\hline
&  &       \\
&  &     \\
&  &     \\
\end{tabular}}
\efbox{\begin{tabular}{c|c|l}
&  &       \\
&  &      \\
&  &     \\
\hline
&  &       \\
&  &      \\
&  &     \\
\hline
&  &      \\
&  &      \\
&  &     \\
\hline
&  &       \\
&  &     \\
&  &     \\
\end{tabular}}
\end{document}


• This was actually what I was looking for! Thanks! – Alejandro Feb 25 '16 at 4:44

You can use the boldline package: here is an example with 1pt thicklines:

\documentclass[10pt]{article}
\usepackage{boldline}

\begin{document}

\begin{tabular}{V{2.5}c|c|lV{2.5}cV{2.5}c|c|lV{2.5}}
\clineB{1-3}{2.5}\clineB{5-7}{2.5}
& & & & & & \\
& & & & & & \\
& & & & & & \\
\cline{1-3}\cline{5-7}
& & & & & & \\
& & & & & & \\
& & & & & & \\
\cline{1-3}\cline{5-7}
& & & & & & \\
& & & & & & \\
& & & & & & \\
\cline{1-3}\cline{5-7}
& & & & & & \\
& & & & & & \\
& & & & & & \\[-1pt]
\clineB{1-3}{2.5}\clineB{5-7}{2.5}
\end{tabular}

\end{document}


For coloured lines, it doesn't work. I only can propose a workaround with hhline, colouring double line and the space between the lines:

\documentclass[10pt]{article}
\usepackage{array, colortbl, xcolor, hhline}

\begin{document}

\setlength\doublerulesep{0.2pt}\arrayrulecolor{red}\doublerulesepcolor{red}
\begin{tabular}{!{\color{red}\vrule width1pt}c|c|l!{\color{red}\vrule width1pt}c!{\color{red}\vrule width1pt}c|c|l!{\color{red}\vrule width1pt}}
\hhline{|===|>{\arrayrulecolor{white}\doublerulesepcolor{white}}~>{\arrayrulecolor{red}\doublerulesepcolor{red}}|:===|}
& & & & & & \\
& & & & & & \\
& & & & & & \\
\cline{1-3}\cline{5-7}
& & & & & & \\
& & & & & & \\
& & & & & & \\
\cline{1-3}\cline{5-7}
& & & & & & \\
& & & & & & \\
& & & & & & \\
\cline{1-3}\cline{5-7}
& & & & & & \\
& & & & & & \\
& & & & & & \\
\hhline{===>{\arrayrulecolor{white}\doublerulesepcolor{white}}~%
>{\arrayrulecolor{red}\doublerulesepcolor{red}}|:===}
\end{tabular}

\end{document}


• Oh! I see. The colour problem is harder, as I once tried to patch \hlineB, and it didn't work. But I'm not a LaTeX guru… – Bernard Feb 24 '16 at 15:27
• @Ustanak: I've added a workaround for colour, based on hhline. – Bernard Feb 24 '16 at 16:02
• It is not really hard, but it's lengthy for sure. – Bernard Feb 24 '16 at 16:08