Referencerow (for matrix)

<row> (in a matrix)

A row within a tabular layout

<row> is a Math component that defines the individual row entries in a <matrix>.

Attributes and Properties

Attributes for <row>

Other (10)

text. Default value: none. Border style for the bottom edge of this row.

textList. Symbols treated as function names when parsing.

text. Default value: left. Default horizontal alignment for cells in this row.

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

text. Default value: none. Border style for the left edge of this 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.

text. Default value: middle. Default vertical alignment for cells in this row.

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.bottom

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.left

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

$r.rowNum

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

$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: Defining a <matrix> with <row> components

One of several methods for defining a <matrix> in Doenet is to nest <row> components inside the opening and closing tags. Individual rows can be accessed using index notation with the rows property of the <matrix>.


Example: A <row> with symbolic math

Since a <row> is a Math Component, some of the general attributes of a <math> also work inside a <row>, such as functionSymbols. To use other <math> attributes (such as simplify), you can nest individual <math> components within a <row>.

Attribute Examples

Attribute Example: functionSymbols

The functionSymbols attribute designates special characters or strings that are to be considered functions. By default, only the characters ff and gg are considered function symbols when employed within a Math Component.


Attribute Example: splitSymbols

By default, letters placed adjacent to one another in a <math> component are separated by Doenet for computations, so xyz is interpreted as xyzx \cdot y \cdot z, rather than a single variable composed of three letters. To override this default behavior, set the splitSymbols attribute to false.

Since a <row> is a type of Math Component, it follows this convention, with the exception that spaces between individual entries in a <row> are considered distinct entries (similar to the entries in a <mathList>, while in a general <math>, a space represents implied multiplication.)


Attribute Example: referencesAreFunctionSymbols

The referencesAreFunctionSymbols attribute designates special characters or strings that are to be considered functions, when they are references from another component by name. In this case, the symbolic function letters are selected at random from a list of 6 possibilities.

Note that, even though f and g are default function symbols when written directly, in this example they are referenced values and therefore we need to tell Doenet that they represent functions.

Property Examples

Property Example: rows

Technically speaking, the rows property belongs to the parent <matrix>, rather than the <row>. The information is repeated here, however, because it is a useful way of accessing individual rows and entries.