@mathjax/src
    Preparing search index...

    Class CommonOutputJax<N, T, D, WW, WF, WC, CC, VV, DD, FD, FC>Abstract

    The CommonOutputJax class on which the CHTML and SVG jax are built

    The OutputJax type

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    adaptor: DOMAdaptor<N, T, D> = null

    The MathDocument's DOMAdaptor

    container: N

    The container element for the math

    containerWidth: number

    The container width for linebreaking;

    document: MathDocument<N, T, D>

    The MathDocument for the math we find

    factory: WF

    The wrapper factory for the MathML nodes

    font: FD

    The data for the font in use

    linebreaks: Linebreaks<
        N,
        T,
        D,
        CommonOutputJax<N, T, D, WW, WF, WC, CC, VV, DD, FD, FC>,
        WW,
        WF,
        WC,
        CC,
        VV,
        DD,
        FD,
        FC,
    >

    The linebreak visitor to use for automatic linebreaks

    math: MathItem<N, T, D>

    the MathItem currently being processed

    nodeMap: Map<MmlNode, WW>

    A map from the nodes in the expression currently being processed to the wrapper nodes for them (used by functions like core() to locate the wrappers from the core nodes)

    options: OptionList

    The actual options supplied to the output jax

    postFilters: FunctionList

    Filters to run after the output is processed

    pxPerEm: number

    The pixels per em for the math item being processed

    styleJson: StyleJsonSheet

    Used for collecting styles needed for the output jax

    table: WW

    The top-level table, if any

    testDisplay: N

    Node used to test for display metric data

    testInline: N

    Node used to test for in-line metric data

    unknownCache: UnknownVariantMap

    Cache of unknonw character bounding boxes for this element

    commonStyles: StyleJson = ...

    The default styles for the output jax

    NAME: string = 'Common'

    The name of this output jax

    OPTIONS: OptionList = ...

    Accessors

    • get forceInlineBreaks(): boolean

      Returns boolean

      True when in-line breaks need to be forced (e.g., for SVG output)

    • get name(): string

      Returns string

      The name for this output jax class

    Methods

    • Add a registered font extension to the output jax's font.

      Parameters

      • font: FontExtensionData<CC, DD>

        The name of the extension to add to this output jax's font

      • prefix: string = ''

        The prefix for dynamically loaded files for this extension

      Returns string[]

      New CSS rules needed for the font

    • Parameters

      • m: number

        A number to be shown with a fixed number of digits

      • n: number = 3

        The number of digits to use

      Returns string

      The formatted number

    • Returns number

      The initial scaling value for the math node

    • Parameters

      • node: N

        The container node whose metrics are to be measured

      • display: boolean

        True if the metrics are for displayed math

      Returns ExtendedMetrics

      Object containing em, ex, containerWidth, etc.

    • Parameters

      • node: N

        The math element to be measured

      • display: boolean

        Is the element in display math?

      Returns N

      The test elements that were added

    • Parameters

      • type: string

        The type of HTML node to create

      • def: OptionList = {}

        The properties to set on the HTML node

      • content: (N | T)[] = []

        Array of child nodes to set for the HTML node

      • Optionalns: string

        The namespace for the element

      Returns N

      The newly created DOM tree

    • Parameters

      • marked: boolean

        Whether the node has already been marked

      • forcebreak: boolean

        Whether the break is to be forced

      • linebreak: string

        The break type

      • node: MmlNode

        The parent node to mark

      • child: MmlNode

        The child node to mark

      • mo: MmlNode = null

        The core mo to mark

      Returns boolean

      The modified marked variable

    • Measure text from a specific font, or that isn't in the MathJax font

      Parameters

      • text: string

        The text to measure

      • variant: string

        The variant for the text

      • font: CssFontData = ...

        The family, italic, and bold data for explicit fonts

      Returns UnknownBBox

      The width, height, and depth of the text (in ems)

    • Measure the width of a text element by placing it in the page and looking up its size (fake the height and depth, since we can't measure that)

      Parameters

      • text: N

        The text element to measure

      Returns UnknownBBox

      The width, height and depth for the text (in ems)

    • Get the size of a text node, caching the result, and using a cached result, if there is one.

      Parameters

      • text: N

        The text element to measure

      • chars: string

        The string contained in the text node

      • variant: string

        The variant for the text

      • font: CssFontData = ...

        The family, italic, and bold data for explicit fonts

      Returns UnknownBBox

      The width, height and depth for the text

    • This is the actual typesetting function supplied by the subclass

      Parameters

      • wrapper: WW

        The wrapped intenral MathML node of the root math element to process

      • node: N

        The container node where the math is to be typeset

      Returns void

    • Parameters

      • node: N

        The container whose scale is to be set

      • wrapper: WW

        The wrapper for the math element being scaled

      Returns void

    • Parameters

      • text: string

        The text string for which to make a text node

      Returns T

      A text node with the given text

    • Set the document where HTML nodes will be created via the adaptor Set up global values Recursively set the TeX classes for the nodes Set the scaling for the DOM node Create the nodeMap (maps MathML nodes to corresponding wrappers) Create the HTML output for the root MathML node in the container Clear the nodeMape Execute the post-filters

      Parameters

      • math: MathItem<N, T, D>

        The math item to convert

      • node: N

        The contaier to place the result into

      • html: MathDocument<N, T, D> = null

        The document containing the math

      Returns void

    • Create a DOM node for text from a specific CSS font, or that is not in the current MathJax font

      Parameters

      • text: string

        The text to be displayed

      • variant: string

        The name of the variant for the text

      Returns N

      The text element containing the text