Skip to Content
Referencecolumn (for table)

<column> (in a table)

A column of cells within a `<spreadsheet>`

<column> is a container for a column of <cell> children inside a <spreadsheet>. It is the column-oriented counterpart to <row>: each child <cell> populates the next row of the same column.

Unlike <row>, which is also accepted inside a <tabular>, <column> is only valid as a child of <spreadsheet> in non-matrix contexts. For column-by-column construction of a matrix, see <column> (in a matrix).

Attributes and Properties

Attributes for <column>

Highlighted (1)
widthIn development

componentSize. Display width of this column. Expressed as a percentage of the width of the spreadsheet so that it survives conversion to PreTeXt.

Other (5)

text. Column number where this column is placed (1-based).

textList. Symbols treated as function names when parsing.

parseScientificNotation

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

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

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

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 <column name="c">

Highlighted (1)
$c.widthIn development

componentSize. Display width of this column. Expressed as a percentage of the width of the spreadsheet so that it survives conversion to PreTeXt.

Other (1)
$c.colNum

text. Column number where this column is placed (1-based).

Common to all components (8)
$c.disabled

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

$c.doenetML

text. The DoenetML source code that produced this component.

$c.fixed

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

$c.fixLocation

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

$c.hidden

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

$c.hide

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

$c.isResponse

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

$c.styleNumber

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

Examples

Example: Build a spreadsheet column-by-column

Two <column> children populate the spreadsheet column by column. Compare with <row>, which populates row by row.

Attribute Examples

Attribute Example: colNum

Setting colNum anchors the column to a specific column letter (or number). Without it, columns fill from the left in the order they appear.


Attribute Example: width

The width attribute sets the width of the column as a percentage of the width of the spreadsheet; the columns without one share out the rest. It is the same attribute, with the same values, as the width of a <col>, so the width of a column is written the same way whether or not it has a <column> of its own. As with <col>, express it as a percentage rather than as a number of pixels: a percentage is what survives conversion of the document to PreTeXt, so a printed spreadsheet keeps its column widths.

Last updated on