[OS X TeX] suppress vertical line in table

Alan Munn amunn at msu.edu
Mon Jan 28 20:00:39 CET 2008


At 11:26 AM -0500 1/28/08, Jonathan Hanson wrote:
>Hello,
>
>I believe that there is a command that suppresses the drawing of 
>vertical lines for a particular row in a table, but I can't remember 
>it and can't find seem to find it anywhere.  I want to create n-by-n 
>boxes with labels on the left and top sides for each row/column, and 
>I can't get rid of the vertical lines extending above the box.

Perhaps the easiest way to do this is to use 
\multicolumn{1}{c}{label} for each of your labels on the top.

For Jonathan's problem:

\begin{tabular}{c|c|c|}
\multicolumn{1}{c}{}&\multicolumn{1}{c}{label1}&\multicolumn{1}{c}{label2}\\
\cline{2-3}
row1 & cell 1 & cell 2\\
\cline{2-3}
row2 & cell 3 & cell 4\\
\cline{2-3}
\end{tabular}

At 12:32 PM -0500 1/28/08, Alain Schremmer wrote:
>However, and not to highjack the thread, I would also like a table 
>in which the upper left cell has no left and no top line.

For Alain's problem:

\begin{tabular}{|c|c|c|}
\cline{2-3}
\multicolumn{1}{c|}{} & label1 & label2\\
\hline
row1 & cell 1 & cell 2\\
\hline
row2 & cell 3 & cell 4\\
\hline
\end{tabular}

Alan

-- 
Alan Munn 
amunn at msu.edu
Department of Linguistics                                 
and Germanic, Slavic, Asian and African Languages   Fax.  +1-517-432-2736
Michigan State University, East Lansing MI 48824      Tel.  +1-517-355-7491
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/macostex-archives/attachments/20080128/b7ac5b19/attachment.html>


More information about the macostex-archives mailing list