☰ Click for Table of Contents
BookWiki Documentation
Copyright 2026
Rance D. Necaise

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.

tabular module
\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}
A specialized form of the tabular environment in which columns are organized into groups. The headers are assigned to the column groups. A third type of table row can be included to create a subheader row in which the column contents are assigned to each column. The subheader row has a dark background by default.

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.

Keys:
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.

Plugin:  GroupTablePlugin

An example group table is shown below

Example
source
  1. \begin{grouptable}[ncols=4
  2.       colgroups='2|2'
  3.       colalign='c|c|c|c'
  4.       colwidth='1.75in|1in|1.75in|1in']
  5.  \groups{Public}{Private #}
  6.  \headers{IP Address}{Port #}{IP Address}{Port #}
  7.  \row{76.112.37.99}{4500}{192.168.1.8}{3100}
  8.  \row{76.112.37.99}{6501}{192.168.1.8}{31001}
  9.  \row{76.112.37.99}{7388}{192.168.1.4}{28050}
  10. \end{grouptable}
PublicPrivate #
IP AddressPort #IP AddressPort #
76.112.37.994500192.168.1.83100
76.112.37.996501192.168.1.831001
76.112.37.997388192.168.1.428050
results
  August 17, 2026 at 12:07 PM