[texhax] Tabular, cline and column spacing
Philip G. Ratcliffe
philip.ratcliffe at uninsubria.it
Wed Aug 1 17:08:39 CEST 2007
> Suppose I want to typeset a table with three columns,
> vertical lines but a
> horizontal line covering only the second column. This is easy:
>
> \begin{tabular}{|c|c|c|}
> \cline{2-2}
> a & b & c
> \end{tabular}
>
> But now suppose I want to have more space around the vertical
> line between
> columns 2 and 3. Obviously, that's what @{...} are for:
>
> \begin{tabular}{|c|c@{\qquad}|@{\qquad}c|}
> \cline{2-2}
> a & b & c
> \end{tabular}
>
> but something's wrong with the horizontal line here. It is
> as though whatever
> you put in an @{...} suppresses intercolumn space and goes at
> the end of the
> preceding column.
Yes.
> In this very example, if you replace the second @{\qquad} by
> a >{\qquad}, it
> seems to work, but as soon as the column type is p{}, m{} or
> b{} (or X in
> a tabularx) it doesn't.
Quick and nasty (note the doubled && - a fake column):
\begin{tabular}{|c|c@{\qquad}|c@{\qquad}c|}
\cline{2-2}
a & b && c
\end{tabular}
I don't understand what you mean by it doesn't work for >{\qquad} with
column type p{}, ...
Cheers, Phil
More information about the texhax
mailing list