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.

1 Answer 1


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


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


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.

  • This works! However I don't see default column sep besides row sep that you have. I guess it is necessary if there are many columns and one is lazy to explicitly specify separation after each ampersand sign. What I wonder is that when I add supposedly default column sep that it affects visually the distance between columns. Do they add up (default & after & sign) or something?
    – mlt
    Feb 8, 2012 at 17:53
  • The effect seems to be additive.
    – qubyte
    Feb 8, 2012 at 18:24

You must log in to answer this question.

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