<extractMath>
<extractMath>
is a General Operator
component that extracts data from mathematical expresssions. (See also, the <matchesPattern>
component
for an alternative method for extracting data.)
The types of data that can be extracted with <extractMath>
are:
- the number of operands in the expression
- the individual operands themselves
- the functions involved in an expression
- the function arguments
Attributes and Properties
Attribute | Type | Values |
---|---|---|
anchor = "…" | point | |
argumentNumber = "…" | number | |
createIntervals = "…" | boolean | "true" "false" |
createVectors = "…" | boolean | "true" "false" |
displayBlanks = "…" | boolean | "true" "false" |
displayDecimals = "…" | integer | |
displayDigits = "…" | integer | |
displaySmallAsZero = "…" | number | |
draggable = "…" | boolean | "true" "false" |
expand = "…" | boolean | "true" "false" |
format = "…" | text | "text" "latex" |
functionSymbols = "…" | textList | |
layer = "…" | number | |
operandNumber = "…" | number | |
padZeros = "…" | boolean | "true" "false" |
parseScientificNotation = "…" | boolean | "true" "false" |
positionFromAnchor = "…" | text | "upperright" "upperleft" "lowerright" "lowerleft" "top" "bottom" "left" "right" "center" |
referencesAreFunctionSymbols = "…" | ||
renderMode = "…" | text | |
simplify = "…" | text | "none" "full" "numbers" "numberspreserveorder" |
splitSymbols = "…" | boolean | "true" "false" |
type = "…" | "operand" "function" "functionargument" "numoperands" "recursiveoperands" | |
unordered = "…" | boolean | "true" "false" |
Property | Type |
---|---|
$e.anchor | point |
$e.argumentNumber | number |
$e.backgroundColor | text |
$e.createIntervals | boolean |
$e.createVectors | boolean |
$e.disabled | boolean |
$e.displayBlanks | boolean |
$e.displayDecimals | integer |
$e.displayDigits | integer |
$e.displaySmallAsZero | number |
$e.draggable | boolean |
$e.expand | boolean |
$e.fixed | boolean |
$e.fixLocation | boolean |
$e.format | text |
$e.functionSymbols | textList |
$e.hidden | boolean |
$e.isNumber | boolean |
$e.isNumeric | boolean |
$e.latex | latex |
$e.layer | number |
$e.list | [ math ] |
$e.matrix | [ math ] |
$e.matrixSize | numberList |
$e.number | number |
$e.numColumns | integer |
$e.numDimensions | integer |
$e.numListItems | integer |
$e.numRows | integer |
$e.operandNumber | number |
$e.padZeros | boolean |
$e.parseScientificNotation | boolean |
$e.positionFromAnchor | text |
$e.renderMode | text |
$e.simplify | text |
$e.splitSymbols | boolean |
$e.text | text |
$e.textColor | text |
$e.textStyleDescription | text |
$e.unordered | boolean |
$e.value | extractMath |
$e.vector | [ math ] |
$e.x | math |
$e.y | math |
$e.z | math |
Example: Extracting operands and number of operands
To extract an operand
, you must also specify the operandNumber
.
Example: Extracting functions and function arguments
To extract a function
or functionArgument
, you must first extract the operand
under
consideration. In order to extract an individual functionArgument
in the case of a multivariable
function; the argumentNumber
must be provided as well.
Note that Doenet recognizes and as function symbols by default. If other symbols are to
represent functions, they can be defined within the <math>
component using the functionSymbols
attribute.
Attribute Example: type
The type
attribute specifies the value to be extracted; it takes one of four possible
inputs: operand
, numOperands
, function
, and functionArgument
.
Attribute Example: operandNumber
The operandNumber
attribute is necessary when the operand
type is extracted. It
specifies the location of the requested operand within the expression.
Attribute Example: argumentNumber
When function arguments are extracted from a math expression, the argumentNumber
attribute specifies the location of the requested argument.