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

Tabular Components

The contents of a tabular are specified using four basic commands within the environment body. Some of the specialized tables may define additional row specifiers as well.

\headers{col1-head}{col2-head} ... {colN-head}
The headers tabular child command is used to include column headers in the next row of the table. The header columns are added using <th> HTML elements. If more column headers are provided than there are columns in the table, the extras are ignored. If fewer column headers are provided, no headers will be included in the columns with missing values.
\row{col1-value}{col2-value} ... {colN-value}
The row tabular child command is used to include column data in the next row of the table. The data columns are added using <td> HTML elements. If more column values are provided than there are columns in the table, the extra values are ignored. If fewer column values are provided, only the first n columns will contain values.
\rule
\rule{width}
Adds a horizontal rule that expands the entire width of the table. If the width is not provided, the rule will have a 1px width.
Argument:
width

The width of the horizontal rule

\span[align=l|c|r]{col-content} 
Adds multi-column content that expands the entire width of the table.
Key:
align

Indicates how the full-width content is aligned within the row: left (l), center (c), or right (r).

Examples

Basic Tabular Style

Example
source
  1. \begin{tabular}[ncols=2
  2.     width=50%
  3.     colclass='fnct|'
  4.     colalign='l|c'
  5.     colwidth='40%|60%']
  6.  \headers{Column A}{Column B}
  7.  \row{a}{b}
  8.  \row{c}{d}
  9.  \rule
  10.  \row{e|f}{x}
  11.  \row{g}{h}
  12.  \span[align=c]{This is a multicolumn row.}
  13. \end{tabular}
Column AColumn B
ab
cd
e|fx
gh
This is a multicolumn row.
results

Modified Table Style

Example
source
  1. \begin{tabular}[ncols=2 style=ruled]
  2.  \headers{Id #}{Name}
  3.  \row{100}{John Smith}
  4.  \row{185}{Jane Roberts}
  5.  \row{232}{Sally Green}
  6.  \row{289}{Jason Samuel}
  7. \end{tabular}
Id #Name
100John Smith
185Jane Roberts
232Sally Green
289Jason Samuel
results

Single-Ruled Zebra Stripped

Example
source
  1. \begin{tabular}[ncols=2 style='ruled zebra']
  2.  \headers{Id #}{Name}
  3.  \row{100}{John Smith}
  4.  \row{185}{Jane Roberts}
  5.  \row{232}{Sally Green}
  6.  \row{289}{Jason Samuel}
  7. \end{tabular}
Id #Name
100John Smith
185Jane Roberts
232Sally Green
289Jason Samuel
results
  August 17, 2026 at 11:18 AM