Group Table
The grouptable environment is a general purpose table for displaying tabular data that requires grouped columns. It is derived from the tabular environment and accepts all of the same arguments, but defines two additional arguments specific to the groups.
\begin{grouptable}[
ncols=#
width=#]
colgroups='#|#'
headalign=c|c|c
subalign=c|c|c
colalign='l|c'
colclass=x|y|z
colwidth='x|y|z'
style=names]
\groups{groupheader-1}{groupheader-2} ...
\headers{subheader-1}{subheader-2}{subheader-3}{subheader-4} ....
\row{col1-value}{col2-value}{col3-value} ....
\rule
\rule{width}
\span[align=l|c|r]{text}
\end{grouptable}
The grouptable environment defines the \group command for specifying the group headers
\groups{groupheader-1}{groupheader-2} ...
while the \headers command is used to include the sub headings or the individual column headings.
- ncols
-
The total number of columns in the table. The number of groups is based on the info provided by the colsgroups argument. There are two columns by default with 1 column per group.
- colgroups
-
Indicates the size or # of columns in each column groups. The columns are formed into groups starting with the left most column. The column groups as specified using similar notation to that used for the column widths and alignments
colgroups=2|3
The number of entries specified in the group header row entry (\groups) should equal the number of groups.
- subalign
-
The text alignment for the sub headings. This parameter replaces colalign from the tabular environment, but is specified in the same way. The number of alignment specifiers should equal the total number of columns.
An example group table is shown below
- \begin{grouptable}[ncols=4
- colgroups='2|2'
- colalign='c|c|c|c'
- colwidth='1.75in|1in|1.75in|1in']
- \groups{Public}{Private #}
- \headers{IP Address}{Port #}{IP Address}{Port #}
- \row{76.112.37.99}{4500}{192.168.1.8}{3100}
- \row{76.112.37.99}{6501}{192.168.1.8}{31001}
- \row{76.112.37.99}{7388}{192.168.1.4}{28050}
- \end{grouptable}
| Public | Private # | ||
|---|---|---|---|
| IP Address | Port # | IP Address | Port # |
| 76.112.37.99 | 4500 | 192.168.1.8 | 3100 |
| 76.112.37.99 | 6501 | 192.168.1.8 | 31001 |
| 76.112.37.99 | 7388 | 192.168.1.4 | 28050 |