<setup>

Container for components used for setup but not rendered

<setup> is a Sectional component that acts as a container element for defining other components. Content defined within the <setup> portion will not be rendered.

Attributes and Properties

Attributes for <setup>

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 <setup name="s">

Common to all components (4)
$s.doenetML

text. The DoenetML source code that produced this component.

$s.hide

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

$s.isResponse

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

$s.styleNumber

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

Examples

Example: Defining maths in a <setup>

Components can be defined in a <setup> and referenced later in the document with the $name notation.


Example: Defining geometry in a <setup>

Components can be defined in a <setup> and referenced later in the document with the $name notation.


Example: Using a <setup> within a <graph>

A <setup> block can also occur in a <graph>. In this case, we don’t want the <boolean> value to render on the <graph>, we just want to define it near the <updateValue> that is using it.