ReferencestyleDefinition

<styleDefinition>

<styleDefinition> is a General Operator component that allows the user to define custom styles for an individual document. Default styleNumbers, used in Graphical Components, are numbered 11 to 66. Additional styleNumbers are defined with a <styleDefinition> component nested within a <styleDefinitions> block.

These new styles are assigned unique numbers that can be used locally in that document.

Attributes and Properties

Attributes for <styleDefinition>
AttributeTypeValues
backgroundColor = "…"
backgroundColorDarkMode = "…"
backgroundColorWord = "…"
backgroundColorWordDarkMode = "…"
fillColor = "…"
fillColorDarkMode = "…"
fillColorWord = "…"
fillColorWordDarkMode = "…"
fillOpacity = "…"
lineColor = "…"
lineColorDarkMode = "…"
lineColorWord = "…"
lineColorWordDarkMode = "…"
lineOpacity = "…"
lineStyle = "…"
lineStyleWord = "…"
lineWidth = "…"
lineWidthWord = "…"
markerColor = "…"
markerColorDarkMode = "…"
markerColorWord = "…"
markerColorWordDarkMode = "…"
markerOpacity = "…"
markerSize = "…"
markerStyle = "…"
markerStyleWord = "…"
textColor = "…"
textColorDarkMode = "…"
textColorWord = "…"
textColorWordDarkMode = "…"
Props for <styleDefinition name="s">
PropertyType
$s.disabledboolean
$s.fixedboolean
$s.fixLocationboolean
$s.hiddenboolean

Example: Defining a custom style

In this example, a custom style has been created and assigned a styleNumber of 1010. The custom style is an adaptation of the default “red” styleNumber of 22, generating a thicker line and a round rather than a square point. The attributes ending in Word define the way doenet will render the style descriptions in text references when the styleDescription or styleDescriptionWithNoun properties are used.

Note: A <styleDefinitions> block must be placed within a <setup> component.