Referencerow (for table)

<row> (in a table)

A row within a tabular layout

<row> is a Sectional component that functions as a container element for the individual <cell> elements of a <tabular> or a <spreadsheet>.

<row> is also accepted inside a <matrix>, where it defines a row of math values; see <row> (in a matrix) for that flavor.

Attributes and Properties

Attributes for <row>

Other (10)

keyword. Border style for the bottom edge of this row.

ValueDescription
none (default)Do not render a border.
minorRender a thin border line.
mediumRender a medium-weight border line.
majorRender a thick border line.

textList. Symbols treated as function names when parsing.

keyword. Default horizontal alignment for cells in this row.

ValueDescription
start (default)Align cell content to the leading edge: the left in a left-to-right document, the right in a right-to-left one.
centerCenter cell content horizontally.
endAlign cell content to the trailing edge: the right in a left-to-right document, the left in a right-to-left one.
justifyJustify cell content across the full cell width.

boolean. Default value: false. Whether this row is a header row.

parseScientificNotation

boolean. Whether to parse expressions like 1e3 as scientific notation.

reference. References whose names should be treated as function symbols when parsing.

rowNum

text. Row number where this row is placed (1-based).

boolean. Whether multi-character symbols are split into a product of variables.

keyword. Border style for the leading edge of this row: its left edge in a left-to-right document, its right edge in a right-to-left one.

ValueDescription
none (default)Do not render a border.
minorRender a thin border line.
mediumRender a medium-weight border line.
majorRender a thick border line.

keyword. Default vertical alignment for cells in this row.

ValueDescription
topAlign cell content to the top.
middle (default)Center cell content vertically.
bottomAlign cell content to the bottom.
Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <row name="r">

Other (10)
$r.bottomBorder

text. Border style for the bottom edge of the row.

$r.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$r.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$r.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$r.halign

text. Default horizontal alignment for cells in this row.

$r.header

boolean. Whether this row is a header row.

$r.hidden

boolean. Whether this component is hidden from the rendered output.

$r.rowNum

text. Row number where this row is placed (1-based).

$r.startBorder

text. Border style for the leading edge of the row: its left edge in a left-to-right document, its right edge in a right-to-left one.

$r.valign

text. Default vertical alignment for cells in this row.

Common to all components (4)
$r.doenetML

text. The DoenetML source code that produced this component.

$r.hide

boolean. Whether to hide this component from the rendered output.

$r.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$r.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: a <row> inside a <tabular>

The basic, unformatted structure of a <table> is illustrated. Individual rows are contained within a <tabular>, and individual cells are contained within a <row>.


Example: a <row> inside a <spreadsheet>

<row> also populates a <spreadsheet> row by row. Compare with <column>, which populates a spreadsheet column by column.

Attribute Examples

Attribute Example: header

The header attribute defines a <row> with header styling.


Attribute Example: halign

The halign attribute defines the horizontal alignment of content within each <cell> for the given <row>. The available options are start (default), center, end, and justify. start and end follow the writing direction: start is the left edge in a left-to-right document and the right edge in a right-to-left one.


Attribute Example: valign

The valign attribute defines the vertical alignment of content within each <cell> for the given <row>. The available options are top, middle (default), and bottom.


Attribute Example: startBorder

The startBorder attribute defines the weight for the border on the leading edge of content within each <cell> for the given <row> — its left edge in a left-to-right document, its right edge in a right-to-left one. The available options are none (default), minor, medium, and major.

Note that the startBorder attribute can also be specified in the <tabular>, which then applies to the entire table. If specified in both locations, the specification within the individual <row> takes precedence.


Attribute Example: bottomBorder

The bottomBorder attribute defines the weight for the bottom border element of content within each <cell> for the given <row>. The available options are none (default), minor, medium, and major.

Note that the bottomBorder attribute can also be specified in the <tabular>, which then applies to the entire table. If specified in both locations, the specification within the individual <row> takes precedence.