Span Columns and Rows
A table cell can span more than one column and row.
Span factor and operator
With a span a table cell can stretch across adjacent columns, rows, or a block of adjacent columns and rows. A span consists of a span factor and a span operator.
The span factor indicates the number columns, rows, or columns and rows a cell should span.
- Column span factor
-
A single integer (
<n>
) that represents the number of consecutive columns a cell should span. - Row span factor
-
A single integer prefixed with a dot (
.<n>
) that represents the number of consecutive rows a cell should span. - Block span factor
-
Two integers (
<n>.<n>
) that represent a block of adjacent columns and rows a cell should span. The first integer,<n>
, is the column span factor. The second integer, which is prefixed with a dot,.<n>
, is the row span factor.
The span operator is a plus sign (+
) placed directly after the span factor (<n>.<n>+
).
The span operator tells the converter to interpret the span factor as part of a span instead of a duplication.
A span is the first operator in a cell specifier.
<span factor><span operator><horizontal alignment operator><vertical alignment operator><style operator>|<cell’s content>
Span multiple columns
To have a cell span consecutive columns, enter the column span factor and span operator (<n>+
) in the cell specifier.
Don’t insert any spaces between the span, any alignment or style operators (if present), and the cell’s separator (|
).
|===
|Column 1, header row |Column 2, header row |Column 3, header row |Column 4, header row
3+|This cell spans columns 1, 2, and 3 because its specifier contains a span of `3+`
|Cell in column 4, row 2
|Cell in column 1, row 3
|Cell in column 2, row 3
|Cell in column 3, row 3
|Cell in column 4, row 3
|===
The table from Example 1 is displayed below.
Column 1, header row | Column 2, header row | Column 3, header row | Column 4, header row |
---|---|---|---|
This cell spans columns 1, 2, and 3 because its specifier contains a span of |
Cell in column 4, row 2 |
||
Cell in column 1, row 3 |
Cell in column 2, row 3 |
Cell in column 3, row 3 |
Cell in column 4, row 3 |
Span multiple rows
To have a cell span consecutive rows, enter the row span factor and span operator (.<n>+
) in the cell specifier.
Remember to prefix the span factor with a dot (.
).
Don’t insert any spaces between the span, any alignment or style operators (if present), and the cell’s separator (|
).
|===
|Column 1, header row |Column 2, header row
.2+|This cell spans rows 2 and 3 because its specifier contains a span of `.2+`
|Cell in column 2, row 2
|Cell in column 2, row 3
|Cell in column 1, row 4
|Cell in column 2, row 4
|===
The table from Example 2 is displayed below.
Column 1, header row | Column 2, header row |
---|---|
This cell spans rows 2 and 3 because its specifier contains a span of |
Cell in column 2, row 2 |
Cell in column 2, row 3 |
|
Cell in column 1, row 4 |
Cell in column 2, row 4 |
Span columns and rows
A single cell can span a block of adjacent columns and rows.
Enter the column span factor (<n>
), followed by the row span factor (.<n>
), and then the span operator (+
).
|===
|Column 1, header row |Column 2, header row |Column 3, header row |Column 4, header row
|Cell in column 1, row 2
2.3+|This cell spans columns 2 and 3 and rows 2, 3, and 4 because its specifier contains a span of `2.3+`
|Cell in column 4, row 2
|Cell in column 1, row 3
|Cell in column 4, row 3
|Cell in column 1, row 4
|Cell in column 4, row 4
|===
The table from Example 3 is displayed below.
Column 1, header row | Column 2, header row | Column 3, header row | Column 4, header row |
---|---|---|---|
Cell in column 1, row 2 |
This cell spans columns 2 and 3 and rows 2, 3, and 4 because its specifier contains a span of |
Cell in column 4, row 2 |
|
Cell in column 1, row 3 |
Cell in column 4, row 3 |
||
Cell in column 1, row 4 |
Cell in column 4, row 4 |