I have the following code, which needs 2 sub-columns in the last main column. I have written code as follows:
\begin{table}
\centering
\begin{tabular}{|c|l|c|c|}
\hline
\multicolumn{1}{|c|}{\bfseries First} & \multicolumn{1}{|c|}{\bfseries Characteristics} & \multicolumn{2}{|c|}{\bfseries Implemented in}\\ A&B \\ \hline
a & b & c & d \\
1 & 2 & 3 & 4\\
\end{tabular}
\end{table}
The result is
I want the "A" and "B" as sub-column within the "Implemented in" column.
Best Answer
You can use
\\ && A&B
instead of\\ A&B
. The first two&&
are to skip over the first two columns.Notes:
multirow
package was used to vertically center the first two headers across the two rows.\cline{3-4}
can be used to draw lines across specified columns.However, I would strongly recommend you have a look at the
booktabs
package for tables:Code:
Code:
booktabs