I want to create this kind of table with 3 large columns and at one point the column is divided to two smaller columns. Please note that the column not divided in the whole space.
How can create the table with custom column sizes inside the larger columns?
|------------------------------------------------------------|
| | A | Most Mon |
-------------------------------------------------------------|
| Methods | Time [s] | RunCount | Time [s] | RunCount |
|----------------|---------------------|---------------------|
| C | | | 4 | 1 |
| D | | | 5 | 2 |
| E | | | 6 | 3 |
-------------------------------------------------------------|
Best Answer
Actually, it's the other way round; initially you declare 5 columns and, in the first row, using
\multicolumn
you span some cells to occupy to of them.In the following example, the packages
siunitx
andbooktabs
were used to improve the table formatting:Of course, instead of
S
you could use any other column type (and deal with possible alignments in other ways) such asc
,l
,r
, orp{<length>}
.In a comment it has been requested to produce the table with the vertical rules; here it is: