TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer
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 '12 at 17:53
The effect seems to be additive. – qubyte Feb 8 '12 at 18:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.