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

Document Table

The doctable environment is a general purpose table for use in a various types of documents. It is derived from the tabular and accepts the same set of arguments, many of which are only needed in special circumstances.

tabular module
\begin{doctable}[
          ncols=2
          width=#] 
          headalign='c|c'
          colalign='l|l'
          colwidth='x|y|z'
          colclass=x|y|z
          style=names] 
 \headers{header-1}{header-2}{header-3} ....
 \row{col1-value}{col2-value}{col3-value} .... 
 \rule
 \rule{width}
 \span[align=l|c|r]{text}
\end{doctable}
A specialized form of the tabular table which produces a simple table for use in a variety of documents. By default it has 2 columns with both columns left aligned and the headers center aligned and it's styled as single ruled with light gray zebra stripes.
Keys:
ncols

The number of columns in the table. The default is 2.

width

The width of the table. The default is use to use the natural width.

headalign

Specifies the text alignment for the column headers. None are specified by default. The value of this argument must be specified as a sequence of single letters separated by a vertical bar

   headalign=l|c|r

with one letter for each column. The letters used to specify the header alignment are shown below:

ValueDescription
lalign left
calign center
ralign right

To use the default alignment for a column, the letter can be omitted, but the vertical bar is still required:

   headalign=l||r
colalign

Indicates the text alignment within each column. None are specified by default. This argument takes a string similar to that used with headalign.

colwidth

Defines the width of each column. No widths are specified by default. The column widths are specified as a sequence of css widths separated by a vertical bar (|).

   colwidth='50%|30%|20%'

As with the head and column alignments, a width can be omitted to use the natural width, but all vertical bars must be provided.

   colwidth='|50%|'
colclass

The class name to assign to the <td> elements of each column. None are specified by default. The class names are specified in the same format as the other column specific parameters.

   colclass='args|descp|notes'
style

Class name(s) appended to the table's class name. This allows for additional styling of the default tables. For example, style='zebra ruled' can be used to create a zebra striped and single ruled basic table.

Plugin:  DocumentTablePlugin

Example

The table definition below produces a simple ruled and zebra striped document table

Example
source
  1. \begin{doctable}
  2.  \headers{Column A}{Column B}
  3.  \row{a}{b}
  4.  \row{c}{d}
  5.  \row{e | f}{x}
  6.  \row{g}{h}
  7. \end{doctable}
Column AColumn B
ab
cd
e | fx
gh
results
  October 4, 2026 at 03:29 PM