% multicoltab-doc.tex -- technical documentation for the multicoltab package
% Copyright (C) 2026 Andres Zanzani <azanzani@gmail.com>
%
% This file may be distributed and/or modified under the conditions of the
% LaTeX Project Public License, either version 1.3c of this license or (at
% your option) any later version.

\documentclass[a4paper,11pt]{article}

\usepackage[margin=2.3cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{booktabs}
\usepackage{xcolor}
\usepackage{multicol}
\usepackage{multicoltab}
\usepackage{hyperref}

\hypersetup{
  colorlinks=true,
  linkcolor=blue!50!black,
  urlcolor=blue!50!black,
  pdftitle={The multicoltab package},
  pdfauthor={Andres Zanzani}
}

\newcommand{\pkg}[1]{\textsf{#1}}
\newcommand{\cmd}[1]{\texttt{\textbackslash#1}}
\newcommand{\file}[1]{\texttt{#1}}
\newcommand{\opt}[1]{\texttt{#1}}
\newcommand{\env}[1]{\texttt{#1}}

\title{The \pkg{multicoltab} package}
\author{Andres Zanzani\thanks{\href{mailto:azanzani@gmail.com}{azanzani@gmail.com}}}
\date{Version 0.8 -- 2026-09-04}

\begin{document}

\maketitle

\begin{abstract}
  \pkg{multicoltab} provides a non-floating table environment whose source rows
  can continue in the next column of a \pkg{multicols} layout or on a later
  page. It achieves this without replacing LaTeX's output routine: each source
  row is emitted as an independent \env{tabular} or \env{tabularx}. A break can
  therefore occur between rows but never in the middle of one. This manual
  describes the public interface, the layout model, source-row parsing,
  measurement, execution constraints, continuation commands, and the structure
  of the implementation.
\end{abstract}

\tableofcontents

\section{Purpose and scope}

Standard table environments are boxes: LaTeX cannot split a \env{tabular} at a
page boundary, and \pkg{longtable} is incompatible with \pkg{multicol} because
both packages need control of the output routine. \pkg{multicoltab} covers the
missing case: a non-floating table or structured list that must flow through
the columns created by \env{multicols}.

The package has a deliberately narrow contract. A source row is the smallest
unbreakable unit. The package may move a complete row to the next layout column
or page, but it never splits a row internally. This is suitable for glossaries,
price lists, game statistics, compact catalogues, terminology, and other data
where a source row is short enough to be kept together.

\subsection{What the package is and is not}

\begin{center}
\begin{tabular}{@{}p{.29\linewidth}p{.63\linewidth}@{}}
  \toprule
  \textbf{Use \pkg{multicoltab} when} & \textbf{Use another mechanism when} \\
  \midrule
  Rows must flow through \env{multicols} columns or ordinary later pages. & A
  conventional multi-page table needs captions, footnotes, page headers, or
  footers. Use \pkg{longtable} outside \env{multicols}. \\
  \addlinespace
  Each source row can remain unbroken. & A single cell must break across layout
  columns or pages. Restructure the data or use ordinary prose. \\
  \addlinespace
  A table must participate in normal paragraph flow rather than float. & A
  floating table with placement control is required. Use \env{table}. \\
  \bottomrule
\end{tabular}
\end{center}

\section{Installation and requirements}

For a local installation, place \file{multicoltab.sty} in the document
directory. For a persistent installation, place it in a directory searched by
your TeX distribution and refresh the file-name database if required.

The package requires a current LaTeX2e format with expl3 support and loads
\pkg{xparse}, \pkg{array}, \pkg{tabularx}, and \pkg{keyval}. It does \emph{not}
load \pkg{multicol}: load that package only when the document uses
\env{multicols}.

\begin{verbatim}
\usepackage{multicol}     % Only when multicols is needed
\usepackage{multicoltab}
\end{verbatim}

The distribution includes regression tests for pdfTeX, LuaTeX, and XeTeX. The
examples and manual are ordinary LaTeX documents and may be compiled with any
of those engines.

\section{Quick start}

The complete public environment is:

\begin{verbatim}
\begin{multicoltab}[<options>]{<column specification>}
  <rows>
\end{multicoltab}
\end{verbatim}

Every normal row uses the familiar alignment syntax:

\begin{verbatim}
left cell & right cell \\
\end{verbatim}

The final row terminator is optional. The following document creates a normal
two-column structured list. The table width is the current \cmd{linewidth}, so
it automatically fits one \env{multicols} column.

\begin{verbatim}
\begin{multicols}{2}
\begin{multicoltab}{@{}p{1.8cm}X@{}}
  Armor & Reduces the damage received by a character. \\
  Shield & Improves a character's defense. \\
  Torch & Provides light in dark places.
\end{multicoltab}
\end{multicols}
\end{verbatim}

\section{Table columns and layout columns}

\textbf{There is no two-column limitation.} The number of columns in the
\emph{table} is independent of the number of columns in the surrounding
\emph{layout}. A table can have two, three, four, or more explicit columns.
Likewise, \env{multicols} may have any column count accepted by \pkg{multicol}.

The following example has a three-column table in a two-column layout. It does
not use \cmd{multicolumn}.

\begin{verbatim}
\begin{multicols}{2}
\begin{multicoltab}{@{}lXX@{}}
  Name & First value & Second value \\
  Armor & 2 & 5 \\
  Shield & 3 & 6
\end{multicoltab}
\end{multicols}
\end{verbatim}

For example, the same source form works with three or four layout columns. The
supplied columns example document combines three and four table columns with
three- and four-column layouts.

\subsection{Live three-column example}

\begin{multicols}{2}
\small
\begin{multicoltab}{@{}lXX@{}}
  \mchead[\toprule][\midrule]
    {\textbf{Item} & \textbf{Value} & \textbf{Effect}} \\
  Armor & 2 & Reduces damage received. \\
  Shield & 5 & Improves defense. \\
  Torch & 1 & Provides light in dark places.
\end{multicoltab}
\end{multicols}

\section{Execution model}

Understanding the execution model is important when designing tables and when
placing macros with side effects in cells. The environment processes its body in
three conceptual stages.

\begin{enumerate}
  \item \textbf{Collection.} The \texttt{+b} environment argument collects the
    complete table body before any row is emitted. Consequently, verbatim-like
    commands that require normal character-by-character input scanning are not
    generally safe.
  \item \textbf{Preparation.} The package scans the direct column tokens in
    the preamble. In global natural-width mode, direct natural columns
    \texttt{l}, \texttt{c}, and \texttt{r} are measured across the source
    rows. Fixed and \texttt{X} columns are not measured by \pkg{multicoltab}.
  \item \textbf{Emission.} The body is parsed again and every source row is
    typeset as a separate alignment. A directly recognized preamble without
    \texttt{X} uses \env{tabular}; a preamble with \texttt{X}, aliases, or
    constructs whose expansion is unknown uses \env{tabularx}. LaTeX then sees
    ordinary vertical material between rows and may break there.
\end{enumerate}

Conceptually, a table such as

\begin{verbatim}
\begin{multicoltab}{lX}
  A & first row \\
  B & second row
\end{multicoltab}
\end{verbatim}

becomes a vertical sequence resembling:

\begin{verbatim}
\begin{tabularx}{<width>}{<prepared preamble>} A & first row \\ \end{tabularx}
<row penalty and optional spacing>
\begin{tabularx}{<width>}{<prepared preamble>} B & second row \\ \end{tabularx}
\end{verbatim}

This is the reason rows can continue across columns. Features that intrinsically
span multiple ordinary alignment rows remain outside the package's scope; the
supported standalone \pkg{booktabs} rules are handled as special single items.

\section{Source-row syntax and parser rules}

\subsection{Row terminators}

At top level, \texttt{\textbackslash\textbackslash} ends a source row. The package also accepts the
usual optional suffixes:

\begin{center}
\begin{tabular}{@{}ll@{}}
  \toprule
  \textbf{Source ending} & \textbf{Meaning} \\
  \midrule
  \texttt{\textbackslash\textbackslash} & Normal row boundary. \\
  \texttt{\textbackslash\textbackslash*} & Normal alignment ending plus a prohibitive outer break penalty. \\
  \texttt{\textbackslash\textbackslash[<length>]} & Add vertical space within the emitted alignment row. \\
  \texttt{\textbackslash\textbackslash*[<length>]} & Combine the no-break marker and alignment row space. \\
  \bottomrule
\end{tabular}
\end{center}

The final terminator may be omitted. A
\texttt{\textbackslash\textbackslash} inside braces is not seen
as an outer row terminator; for example, a nested valid alignment may contain
its own row endings. This parser protection does not make arbitrary grouped
content valid inside a table cell. For an ordinary in-cell line break, use
\cmd{newline}.

The parser trims top-level surrounding spaces and removes top-level
\cmd{par} tokens. Thus paragraph breaks written inside cells are not supported;
use \cmd{newline} instead.

At top level, \cmd{toprule}, \cmd{midrule}, and \cmd{bottomrule} are recognized
as standalone rule items. They may use the standard \pkg{booktabs} form without
a following row terminator. An explicit terminator is also accepted when a
rule is written as its own source item. Optional rule-width arguments are
passed unchanged to \pkg{booktabs}.

\subsection{Cell counts}

Rows should supply the number of cells required by their effective preamble.
The final emitted \env{tabular} or \env{tabularx} remains responsible for the
usual \pkg{array} diagnostics when a row contains too many cells, too few
cells, or an invalid alignment construct. This design intentionally preserves
familiar LaTeX error messages instead of creating a parallel cell-counting API.

\section{Options}

The optional environment argument is a comma-separated \pkg{keyval} list.
All options are local to the environment.

\begin{center}
\begin{tabular}{@{}p{.30\linewidth}p{.15\linewidth}p{.46\linewidth}@{}}
  \toprule
  \textbf{Option} & \textbf{Default} & \textbf{Effect} \\
  \midrule
  \opt{width=<length>} & \cmd{linewidth} & Target width passed to
  \env{tabularx}. It has an exact stretching effect only when the preamble has
  an \texttt{X} column or other stretchable material. \\
  \addlinespace
  \opt{row-sep=<length>} & \texttt{0pt} & Vertical glue placed after each
  emitted source row. \\
  \addlinespace
  \opt{break-penalty=<integer>} & \texttt{0} & Penalty after a normal row.
  Positive values discourage a break; negative values encourage one. \\
  \addlinespace
  \opt{natural-widths=global} & \texttt{global} & Measure direct natural
  columns across the body and reuse the widths in every emitted row. \\
  \addlinespace
  \opt{natural-widths=local} & --- & Do not perform package-level natural-cell
  measurement; every natural column keeps its normal per-row width. \\
  \bottomrule
\end{tabular}
\end{center}

For example:

\begin{verbatim}
\begin{multicoltab}[width=.96\linewidth,row-sep=.6ex,
                    break-penalty=50]{@{}p{.3\linewidth}X@{}}
  Short label & A longer description that may wrap. \\
  Another label & Another description.
\end{multicoltab}
\end{verbatim}

\subsection{Break penalties and headings}

The \opt{break-penalty} setting applies to normal rows. A generated heading
receives a prohibitive penalty, so it stays with the following row. The penalty
is placed before \opt{row-sep}; the glue therefore does not introduce a
separate permitted break after the heading.

\section{Column specifications}

The mandatory preamble is passed to \pkg{array}/\pkg{tabularx} for final
typesetting. \pkg{multicoltab} additionally recognizes a conservative subset
of direct column tokens to decide which natural widths can be synchronized.

\begin{center}
\begin{tabular}{@{}p{.28\linewidth}p{.63\linewidth}@{}}
  \toprule
  \textbf{Token} & \textbf{Meaning in \pkg{multicoltab}} \\
  \midrule
  \texttt{l}, \texttt{c}, \texttt{r} & Natural columns. In global mode, a
  direct occurrence is converted to a measured fixed-width paragraph column
  while retaining left, centred, or right alignment. \\
  \addlinespace
  \texttt{p\{width\}}, \texttt{m\{width\}}, \texttt{b\{width\}} & Fixed-width
  paragraph columns supplied by \pkg{array}. They are not measured by this
  package. \\
  \addlinespace
  \texttt{X} & \pkg{tabularx} paragraph column that absorbs remaining width.
  Multiple \texttt{X} columns use the normal \pkg{tabularx} width algorithm. \\
  \addlinespace
  \texttt{w\{align\}\{width\}}, \texttt{W\{align\}\{width\}} & Fixed-width
  single-line \pkg{array} columns. Their grouped arguments are preserved. \\
  \addlinespace
  \texttt{>\{code\}}, \texttt{<\{code\}}, \texttt{@\{code\}},
  \texttt{!\{code\}}, \texttt{|} & Standard \pkg{array} modifiers and
  separators are preserved for final output. \\
  \bottomrule
\end{tabular}
\end{center}

\subsection{Natural and fixed widths}

Use \texttt{l}, \texttt{c}, and \texttt{r} for short labels or values that
need a uniform natural width across rows. Use a fixed paragraph column or
\texttt{X} for prose that must wrap. A typical robust preamble is:

\begin{verbatim}
@{}p{2cm}X@{}
\end{verbatim}

The first cell has a stable label width; the second uses the rest of the
available line width. Multiple \texttt{X} columns share available width:

\begin{verbatim}
\begin{multicoltab}{@{}lXX@{}}
  Name & First value & Second value \\
  Armor & 2 & 5
\end{multicoltab}
\end{verbatim}

Relative \texttt{X} widths use the normal \cmd{hsize} convention. The assigned
relative values must sum to the number of \texttt{X} columns.

\begin{verbatim}
\begin{multicoltab}
  {>{\hsize=.5\hsize}X>{\hsize=1.5\hsize}X}
  Short label & A wider description column.
\end{multicoltab}
\end{verbatim}

By default, \texttt{X} behaves as a top-aligned \texttt{p} column. The
standard \pkg{tabularx} hook changes this for following \texttt{X} columns:

\begin{verbatim}
\renewcommand{\tabularxcolumn}[1]{m{#1}}
\end{verbatim}

\subsection{Modifiers, aliases, and repeated specifications}

Modifiers remain available for final output. Their code is not replayed during
natural-width measurement because doing so would require executing arbitrary
preamble code while measuring cells. Therefore, if a modifier, a custom column
alias, or a repeated \texttt{*\{n\}\{...\}} specification is combined with
natural columns, the package keeps the source natural columns per-row and issues
a warning instead of making an unreliable global measurement.

This is a deliberate safety boundary. If synchronized natural widths are
required, write direct column tokens explicitly and avoid modifiers on those
natural columns. Otherwise select local natural widths, fixed-width paragraph
columns, or \texttt{X} columns.

\subsection{Spanning cells}

A literal \cmd{multicolumn} at the start of a cell is supported. Its span
advances the logical column position during measurement; its content does not
contribute to any individual natural-column maximum because there is no unique
way to distribute a spanning width among the covered columns.

\begin{verbatim}
\begin{multicoltab}{lll}
  \multicolumn{2}{c}{Grouped values} & Total \\
  Armor & Shield & 7
\end{multicoltab}
\end{verbatim}

Do not hide a spanning command inside an arbitrary macro when global natural
width measurement matters. A row beginning with \cmd{rowcolor} followed by
\cmd{multicolumn} is typeset correctly, but global natural-width
synchronization is conservatively disabled for that table and a warning is
issued.

\section{Cell evaluation and side effects}

This section is critical for macros that modify document state. The package does
not measure contents in \texttt{X}, \texttt{p}, \texttt{m}, \texttt{b},
\texttt{w}, or \texttt{W} columns. In global mode it measures direct natural
\texttt{l}, \texttt{c}, and \texttt{r} cells once in a box before final output.

For a directly recognized preamble without \texttt{X}, rows are emitted with
\env{tabular}. Combining this with \opt{natural-widths=local} gives one
package-level execution of each cell. However, a preamble containing \texttt{X}
uses \env{tabularx}. \pkg{tabularx} may typeset its body repeatedly while it
solves the width of its \texttt{X} columns. This is standard \pkg{tabularx}
behaviour and cannot be generically eliminated while retaining its width
algorithm.

Do not place arbitrary global side effects in cells of a table containing
\texttt{X}. In particular, calculate counters, random values, file writes,
index entries, or custom global assignments before the environment and insert
the already calculated value in the cell.

\begin{verbatim}
% Preferred: calculate state before the table.
\stepcounter{example}
\edef\examplevalue{\arabic{example}}
\begin{multicoltab}{lX}
  Example & \examplevalue
\end{multicoltab}
\end{verbatim}

LaTeX counters and writes receive some protection from \pkg{tabularx} trial
typesetting, but arbitrary package state does not. Treat side-effect-free cell
contents as the portable rule.

\section{Row formatting, rules, and colours}

No wrapper is required for ordinary row formatting. Place normal table commands
directly before the row cells. When \pkg{xcolor} is loaded with its
\texttt{table} option, \cmd{rowcolor} colours the following source row.

\begin{verbatim}
Potion & Restores a small number of hit points. \\
\rowcolor{gray!20}
Rope & Useful for climbing and tying equipment. \\
Map & Helps the group avoid getting lost.
\end{verbatim}

There are two supported ways to use the three main \pkg{booktabs} rules. Use
standalone rules when the heading is not stored or repeated. The usual
\pkg{booktabs} syntax is accepted:

\begin{verbatim}
\toprule
Header & Value \\
\midrule
Entry & Description \\
\bottomrule
\end{verbatim}

Standalone rules are emitted as empty alignments. This preserves the
\pkg{booktabs} rule spacing without passing a source-row terminator after the
rule's \cmd{noalign} material. Optional rule widths are accepted as usual.

Use the optional before/after arguments of \cmd{mchead} when the heading and
its rules must be stored and printed again after an explicit continuation.
\cmd{mchead} also keeps that heading with its first data row. It is not needed
merely to draw a rule.

\section{Headings}

\subsection{Declaring a heading}

\cmd{mchead} records and prints a heading. Its syntax is:

\begin{verbatim}
\mchead[<before>][<after>]{<cells>} \\
\end{verbatim}

The cell material is always the mandatory braced argument. A command that
formats the heading row, such as \cmd{rowcolor}, must be placed inside that
argument rather than between the optional arguments and the cell material. For
\cmd{rowcolor}, load \pkg{xcolor} with its \texttt{table} option:
\texttt{\string\usepackage[table]
  \{xcolor\}}.

\begin{verbatim}
\mchead[\toprule][\midrule]{%
  \rowcolor{gray!20}%
  \textbf{Patron} & \textbf{Archetypal resonances}%
} \\
Patron A & Description
\end{verbatim}

The optional before/after material is inserted around the heading cells inside
the emitted alignment. This is the heading-aware form of rule usage:

\begin{verbatim}
\mchead[\toprule][\midrule]
  {\textbf{Item} & \textbf{Description}} \\
Armor & Reduces damage. \\
Shield & Improves defense.
\end{verbatim}

The heading has a prohibitive outer break penalty and remains with its next
emitted data row. A heading command must be a complete source row.

\subsection{Repeating the last heading in place}

\cmd{mcheadrepeat} prints the most recently declared heading again without
forcing a column or page break. It is useful for a visible manual subdivision:

\begin{verbatim}
\mchead{\textbf{Item} & \textbf{Description}} \\
Armor & Reduces damage. \\

\mcheadrepeat \\
Torch & Provides light.
\end{verbatim}

It is an error to use \cmd{mcheadrepeat} before an earlier \cmd{mchead}.

\section{Explicit continuation}

\pkg{multicol} decides automatic balancing and column breaks only after it
receives vertical material. It cannot reliably call back into a table to insert
a repeated heading at every arbitrary automatic break. When a repeated heading
is mandatory, use an explicit continuation directive.

\subsection{Next \env{multicols} column}

Inside \env{multicols}, \cmd{multicoltabbreak} forces the next layout column
and repeats the declared heading:

\begin{verbatim}
\begin{multicols}{2}
\begin{multicoltab}{@{}p{1.8cm}X@{}}
  \mchead{\textbf{Item} & \textbf{Description}} \\
  Armor & Reduces damage. \\
  \multicoltabbreak \\
  Torch & Provides light.
\end{multicoltab}
\end{multicols}
\end{verbatim}

\subsection{Next ordinary page}

Outside \env{multicols}, \cmd{multicoltabpagebreak} forces a new page and
repeats the heading:

\begin{verbatim}
\begin{multicoltab}{@{}p{1.8cm}X@{}}
  \mchead{\textbf{Item} & \textbf{Description}} \\
  Map & Helps avoid getting lost. \\
  \multicoltabpagebreak \\
  Rations & Food and water for the journey.
\end{multicoltab}
\end{verbatim}

Both continuation commands require a preceding \cmd{mchead}, must be complete
source rows, and are executed only in the emission pass. Do not use
\cmd{multicoltabpagebreak} inside \env{multicols}; use \cmd{multicoltabbreak}
there instead.

\section{Implementation architecture}

The public environment is intentionally small, but the implementation has four
separate responsibilities. This overview is useful for maintainers and for
users diagnosing boundary cases.

\begin{center}
\begin{tabular}{@{}p{.28\linewidth}p{.63\linewidth}@{}}
  \toprule
  \textbf{Component} & \textbf{Responsibility} \\
  \midrule
  Environment setup & Initializes keys, captures the source preamble, and
  scopes changes with a group. \\
  \addlinespace
  Preamble scanner & Classifies direct column tokens, records whether natural
  widths are safe to synchronize, and chooses \env{tabular} or \env{tabularx}.
  \\
  \addlinespace
  Measurement pass & Splits normal rows at top-level \texttt{\&}, skips fixed
  and \texttt{X} cells, records maximum widths for direct natural cells, and
  advances over literal \cmd{multicolumn} spans. \\
  \addlinespace
  Row parser and emitter & Reads top-level row terminators, recognizes heading
  and continuation directives, emits an independent alignment for each row,
  and supplies the outer break penalty and spacing. \\
  \bottomrule
\end{tabular}
\end{center}

The implementation is contained in \file{multicoltab.sty}. Internal control
sequence names use the \texttt{multicoltab@} prefix or expl3 names beginning
with \texttt{l\_multicoltab\_}. They are implementation details, not a public
API. Documents should use only the environment, the four marker commands
\cmd{mchead}, \cmd{mcheadrepeat}, \cmd{multicoltabbreak}, and
\cmd{multicoltabpagebreak}, and the three supported \pkg{booktabs} rule
commands.

\subsection{Preamble processing}

The scanner intentionally does not expand custom column types. Expansion could
run arbitrary user code and would make a general parser dependent on private
\pkg{array} internals. Direct \texttt{l}, \texttt{c}, \texttt{r}, \texttt{X},
\texttt{p}, \texttt{m}, \texttt{b}, \texttt{w}, and \texttt{W} tokens are
recognized, along with the argument groups of the standard separators and
modifiers. Unknown constructs cause the conservative fallback described in
Section~\ref{sec:diagnostics}.

\subsection{Measurement and reconstructed preamble}

In global mode, each direct natural token is reconstructed as a fixed-width
paragraph column. The width is the maximum measured cell width plus a small
allowance. That allowance avoids a word whose natural width is exactly the
measured maximum being immediately reconsidered for hyphenation in the
paragraph box. Centre and right alignment are recreated with the usual
\cmd{centering}/\cmd{raggedleft} and \cmd{arraybackslash} pattern.

Fixed columns retain their source specification, and \texttt{X} retains normal
\pkg{tabularx} behaviour. If the preamble is not safe to measure, natural
columns also retain their source form and the warning below is issued.

\section{Diagnostics and troubleshooting}\label{sec:diagnostics}

\begin{center}
\begin{tabular}{@{}p{.43\linewidth}p{.48\linewidth}@{}}
  \toprule
  \textbf{Message or symptom} & \textbf{Cause and response} \\
  \midrule
  \texttt{Natural-column widths cannot be synchronized for this preamble} &
  The preamble contains a modifier, alias, repetition, or another construct
  that the safe direct-token scanner does not measure. Use fixed/\texttt{X}
  columns, write direct tokens explicitly, or accept local natural widths. \\
  \addlinespace
  \texttt{Heading repeated before it was declared} & Place \cmd{mchead} before
  \cmd{mcheadrepeat}, \cmd{multicoltabbreak}, or
  \cmd{multicoltabpagebreak}. \\
  \addlinespace
  \texttt{<command> used outside multicoltab} & Heading and continuation
  markers are parser directives, valid only as complete rows in the environment.
  \\
  \addlinespace
  Repeated counters or custom global changes & A table uses \texttt{X}, so
  \pkg{tabularx} trial typesetting is evaluating cell material. Calculate the
  value before the table. \\
  \addlinespace
  \texttt{Misplaced \string\noalign} from a rule command & A rule command was
  used in a form not supported by the row parser. Use standalone
  \cmd{toprule}, \cmd{midrule}, or \cmd{bottomrule} rows, or put heading rules
  in the optional arguments of \cmd{mchead}. \\
  \bottomrule
\end{tabular}
\end{center}

\section{Limitations and compatibility}

\begin{itemize}
  \item A row cannot break internally. A row taller than the available layout
    area is moved as a whole and may still overfill an exceptionally small area.
  \item \cmd{multirow} across source rows is not supported. Every source row is
    a separate alignment.
  \item Floats, captions, and footnotes retain the normal restrictions of
    \pkg{multicol}. This package does not add float or longtable features.
  \item The body is collected before rows are emitted. Avoid \cmd{verb} and
    similar verbatim input commands in cells unless another package supplies a
    verified verbatim-safe mechanism.
  \item Paragraph breaks written as \cmd{par} in cells are removed by the row
    parser. Use \cmd{newline} for a line break within a cell.
  \item Automatic repeated headings at arbitrary \pkg{multicol} breaks are not
    available. Use an explicit continuation directive when repetition is
    required.
  \item A direct \cmd{multicolumn} is handled during measurement; its spanning
    content does not set individual natural widths.
  \item Standalone rules are supported for \cmd{toprule}, \cmd{midrule}, and
    \cmd{bottomrule} from \pkg{booktabs}. Other \pkg{booktabs} commands and
    \cmd{hline}/\cmd{cline} rows are not supported.
\end{itemize}

\section{Testing and maintenance}

The distribution contains \file{build.lua} and an \pkg{l3build} regression
test in \file{testfiles/regression.lvt}. The test suite covers fixed and
\texttt{X} measurement avoidance, global natural measurement, local execution
without \texttt{X}, multi-column and spanning rows, colours, preamble forms,
row-ending suffixes, standalone \pkg{booktabs} rules, explicit page
continuation, and heading protection.

From the package directory, run:

\begin{verbatim}
l3build check
l3build doc
\end{verbatim}

The first command executes the regression suite with pdfTeX, LuaTeX, and XeTeX.
The second compiles this manual and every listed example. A release archive
should contain the package file, README, license, manual source and PDF,
examples and their PDFs, changelog, build configuration, and regression test
sources; it should not contain TeX auxiliary files such as \file{.aux},
\file{.log}, or \file{.synctex.gz}.

\section{Files in the distribution}

\begin{center}
\begin{tabular}{@{}ll@{}}
  \toprule
  \textbf{File} & \textbf{Purpose} \\
  \midrule
  \file{multicoltab.sty} & Package implementation. \\
  \file{multicoltab-doc.tex} & Source of this technical manual. \\
  \file{multicoltab-doc.pdf} & Compiled manual. \\
  \file{README.md} & Short overview and CTAN-facing quick reference. \\
  \file{CHANGELOG.md} & Release history. \\
  \file{LICENSE} & LPPL license notice. \\
  \file{*-example.tex} & Standalone examples. \\
  \file{*-example.pdf} & Compiled example output. \\
  \file{build.lua} and \file{testfiles/} & \pkg{l3build} configuration and tests. \\
  \bottomrule
\end{tabular}
\end{center}

\section{License and contact}

This work is released under the LaTeX Project Public License, version 1.3c or
later. A license notice is included in \file{LICENSE}; the full text is at
\url{https://www.latex-project.org/lppl/}.

Questions, bug reports, and suggestions may be sent to
\href{mailto:azanzani@gmail.com}{azanzani@gmail.com}.

\end{document}
