<asList>
<asList> is an inline component that renders its children as a
comma-separated list. Unlike typed list components such as
<mathList> or <textList>, the children
of an <asList> are not collected into an indexable list of values — the
component is purely for display, joining the rendered text of its children
with , between them.
<asList> is a legacy display helper. When you want to display a single
array property (e.g. $eig.eigenvalues, $ode.rhss,
$choiceInput.selectedValues), the property already renders as a
comma-separated list on its own — no wrapper is needed. Use <asList>
only when joining a fixed set of individually-named components with
commas between them.
Attributes and Properties
Attributes for <asList>
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedboolean. Default value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseboolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. Default value: 1. The style number used to select this component's visual styling from the available style definitions.
Properties for <asList name="a">
Other (6)
$a.disabledboolean. Whether this component is disabled and cannot be interacted with.
$a.fixedboolean. Whether this component's value is fixed and cannot be modified.
$a.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$a.latexlatex. The children rendered as a comma-separated LaTeX string.
$a.texttext. The children rendered as a comma-separated text string.
Common to all components (4)
$a.doenetMLtext. The DoenetML source code that produced this component.
$a.hideboolean. Whether to hide this component from the rendered output.
$a.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$a.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: Joining individually-named children with commas
Each child is rendered in place; <asList> inserts , between them.
Without the wrapper, the three references would be separated only by the
whitespace of the surrounding markup.
Example: Mixing component types
<asList> accepts any inline children — numbers, maths, texts, booleans,
references, and so on — and joins their rendered output with commas.
Property Examples
Property Example: text
The text property exposes the rendered list as a single comma-separated
text string, suitable for downstream text processing.
Property Example: latex
The latex property returns the children’s LaTeX representations joined
with commas, suitable for further LaTeX processing.