Math

class Math(val expression: String, val referenceId: String? = null, val style: NodeStyle = NodeStyle.DEFAULT) : LocationTrackableNode, CrossReferenceableNode, StylableNode, PrimitiveFunctionBackedNode

A math (TeX) block.

A math block can be cross-referenced and can be numbered, as long as it has a referenceId.

Parameters

expression

expression content

referenceId

optional reference id for cross-referencing via a com.quarkdown.core.ast.quarkdown.reference.CrossReference

style

styling applied to the block

Constructors

Link copied to clipboard
constructor(expression: String, referenceId: String? = null, style: NodeStyle = NodeStyle.DEFAULT)

Properties

Link copied to clipboard
open override val backingFunctionName: String

The name of the function that backs this node, from a loaded library.

Link copied to clipboard
open override val canTrackLocation: Boolean

A math block is numbered if it has a referenceId.

Link copied to clipboard
Link copied to clipboard

Whether the synthesized backing call should be treated as a block call. Defaults to true; inline primitive nodes should override to false so the inline output mapper is used during expansion.

Link copied to clipboard

The CrossReferenceableNode.referenceId of this node, if it is a real linkable ID (i.e. not the placeholder).

Link copied to clipboard
open override val referenceId: String?
Link copied to clipboard
open override val style: NodeStyle

Functions

Link copied to clipboard
open override fun <T> accept(visitor: NodeVisitor<T>): T

Accepts a visitor.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Retrieves the stored media associated with this node, if any.

Link copied to clipboard

Registers the location of this node within the document handled by context.

Link copied to clipboard

Registers the formatted location of this node within the document handled by context, according to this node's NumberingFormat.

Link copied to clipboard

Materializes this node's properties into the arguments of the backing function call. Argument names must match the parameter names of the function identified by backingFunctionName.

Link copied to clipboard
fun Node.withChildren(newChildren: List<Node>): Node

Returns a copy of this node with its children replaced by newChildren.

Link copied to clipboard