2

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.

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

2 Answers 2

1

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}

2 tables in 2 boxes

1
  • This was actually what I was looking for! Thanks!
    – Schwale
    Commented Feb 25, 2016 at 4:44
5

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} 

enter image description here

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} 

enter image description here

3
  • 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
    Commented Feb 24, 2016 at 15:27
  • @Ustanak: I've added a workaround for colour, based on hhline.
    – Bernard
    Commented Feb 24, 2016 at 16:02
  • It is not really hard, but it's lengthy for sure.
    – Bernard
    Commented Feb 24, 2016 at 16:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .