I would like to force the column width in a table to be zero even if there is text in the column.

I'm after something like this:

Zero width collumn

So I try the code

\hline  1 &  &  \tabularnewline
\hline   & 2 &  \tabularnewline
\hline   &  & 3 \tabularnewline
\hline  \end{tabular} 

which produces

non-zero width collumn

I can use the @{} trick from Removing or changing table border spacing to remove the padding before the 2, but that does not help me that much.

Any ideas?

I'm guessing it's possible to play the game using negative spaces, or maybe draw it with tikz... but it feels a bit cumbersome.

PS: In reality, I just want to be able to put symbols on the borders of the table, so if anyone knows how to do that instead, I'm equally happy.

1 Answer 1


You have to use a box of 0pt width for this cell with 2. Also, you need to add @{\hspace{-.5\arrayrulewidth}} and @{\hspace{-.5\arrayrulewidth}} around this column specification. The reason for the negative space is to shift the second pipe | to the position of the first one, so that they become a single pipe, and the text will be centered around the pipe.


\hline 1 &                  &   \tabularnewline
\hline   & \makebox[0pt]{2} &   \tabularnewline
\hline   &                  & 3 \tabularnewline
\hline  \end{tabular} 


enter image description here

You must log in to answer this question.

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