I am trying to implement the following K-map with a table
AB
C 00 01 11 10
______________
0| 1 0 1 0
1| 0 1 1 0
I implemented it like this:
\begin{table}[htdp]
\begin{center}
\begin{tabular}{c|c|c|c|c|}
&00 & 01& 11& 10 \\ \hline
0&1&1&1&1\\
1&0&0&0&0\\
\end{tabular}
\end{center}
\label{default}
\end{table}
However on the top row I have vertical lines that I'd like to not see. I went with this approach because if i was to use a one row with the information so that I wouldn't have to worry about aligning the headings. So is there a way I can get the vertical lines not to appear in the heading row?
Best Answer
You can use
\multicolumn
to override the column specification given in the table format:I used
\centering
instead of thecenter
environment to prevent extra vertical spacing. Are you sure you need vertical rules at all?The booktabs package can help you improve your tables; the package documentation gives useful advice on formatting tables. Even in this little example the results are better; compare the vertical spacing of the horizontal rule using
booktabs
: