<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 to . 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
Attribute | Type | Values |
---|---|---|
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 = "…" |
Property | Type |
---|---|
$s.disabled | boolean |
$s.fixed | boolean |
$s.fixLocation | boolean |
$s.hidden | boolean |
Example: Defining a custom style
In this example, a custom style has been created and assigned a styleNumber
of . The custom
style is an adaptation of the default “red” styleNumber
of , 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.