[Tex/LaTex] How to achieve double border line between some columns of tikz matrix

matricestikz-pgf

I've read
TikZ matrix as a replacement for tabular
which nicely explained how to get table with borders in the first place.

Now, I'd like to have let's say thicker border (or double border line) between 2 & 3 columns of my multicolumn matrix. As far as I understand column sep is specified for entire matrix. So is it possible to mimic at least appearance of different border between some columns?

I want this to visually show on example how data was normalized in DB and I want to separate superkey from other columns.

Best Answer

You can customise the distance between columns when you're writing the first row of your matrix. For example

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}

\begin{tikzpicture}
\matrix [matrix of nodes,row sep=-\pgflinewidth,nodes={rectangle,draw,minimum width=3em}]
{
0   &[-\pgflinewidth]   3 &[5mm]    6 \\
1   &                   1 &         3 \\
2   &                   2 &         9 \\
};
\end{tikzpicture}

\end{document}

gets you this:

enter image description here

Note that I have used the answer from the question linked in this question as a template, but I've kept it simple to highlight the column separations.

Related Question