Accept options in addition to the MathDocument, and set up the menu based on the defaults, the passed options, and the user's saved settings.
The MathDcument where this menu will post
The options for the menu
Protected
aboutThe "About MathJax" info box
Protected
annotationThe "Show As Annotation" info box
Protected
brailleThe "Show As Speech Text" info box
The current element being explored
The original settings (with page options factored in) for use with the reset command
Protected
documentThe MathDocument in which we are working
Protected
errorThe "Show As Error Message" info box
Protected
helpThe "MathJax Help" info box
Protected
jaxInstances of the various output jax that we can switch to
Protected
mathmlThe "Show As MathML" info box
The contextual menu object that is managed by this Menu
A MathML serializer that has options corresponding to the menu settings
The options for this menu
Protected
originalThe "Show As (original form)" info box
List of font extensions that were loaded via \require
Protected
rerenderThe minium initial state for pending rerender requests (so final rerender gets the right start)
The current settings for this menu (the variables attached to the menu's pool)
Protected
speechThe "Show As Speech Text" info box
Protected
svgThe "Show As SVG Image" info box
Protected
zoomThe info box for zoomed expressions
Protected
Static
_Function used to reject the _loadingPromise
Protected
Static
_Function used to resolve the _loadingPromise
Protected
Static
_A promise that is resolved when all components are loaded
Protected
Static
loadingThe number of startup modules that are currently being loaded
Protected
Static
loadingPromises for the loading components
Static
MENU_The key for the localStorage for the menu settings
Static
OPTIONSThe options for the menu, including the default settings, the various output jax and the list of annotation types and their encodings
Static
SvgThe CSS to include in SVG images
true when the menu is loading some component
A promise that is resolved when all pending loads are complete
Create JSON for an a11y specific variable.
The type of variable being defined
The setting for which to make a variable
Optional
action: (value: T) => voidThe action to perform when the variable is updated
The JSON for the variable
The math to attach the context menu and zoom triggers to
Add extensions that need to be loaded when the renderer changes
The list of extensions
Protected
applyDo what is needed to apply the initial user settings
Protected
attachThe menu to attach
Create JSON for a checkbox item
The id for the item
The content for the item
The (pool) variable to attach to this checkbox
Other values to include in the generated JSON object
The JSON for the checkbox item
Check if a component is loading, and restart if it is
The name of the component to check if it is loading
Protected
checkCheck whether the startup and loader modules are available, and if not, disable the a11y modules (since we can't load them or know if they are available). Otherwise, check if any need to be loaded
Clear the information about stored context menus
Create JSON for a command item
The id for the item
The content for the item
The action function for the command
Other values to include in the generated JSON object
The JSON for the command item
Protected
copyCopy the speech text to the clipboard
Protected
copyCopy the error message to the clipboard
Protected
copyCopy the serialzied MathML to the clipboard
Protected
copyCopy the original form to the clipboard
Protected
copyCopy the speech text to the clipboard
Protected
copyCopy the SVG image to the clipboard
Protected
enableEnable/disable an assistive submenu's items
The name of the item
True to enable, false to disable
Protected
formatThe text to be displayed in an Info box
The text with HTML specials being escaped
Protected
formatThe serialzied SVG to adjust
The adjusted SVG string
Protected
getGet the the value of an a11y option
The name of the ptions to get
The value of the option
Protected
initCreate the menu object, attach the info boxes to it, and output any CSS needed for it
Protected
initSet up the settings and jax objects, and transfer the output jax name and scale to the settings
Protected
isThe event triggering the zoom action
The type of event (click, dblclick) that occurred
True if the event is the right type and has the needed modifiers
Create JSON for a label item
The id for the item
The content for the item
The JSON for the label item
Attempt to load an a11y component
The name of the a11y component to load
Protected
loadAttempt to load a component and perform a callback when done
The name of the component to load
The callback for after loading
Protected
loadLoad the required extensions into the new output jax
The promise combining all loading promises
Protected
mergeLook up the saved settings from localStorage and merge them into the menu settings
Get the SVG image and post it
Create JSON for a radio button item
The id for the item
The content for the item
The (pool) variable to attach to this radio button
Other values to include in the generated JSON object
The JSON for the radio button item
Create JSON for a group of connected radio buttons
The (pool) variable to attach to each radio button
An array of [string] or [string, string], giving the id and content for each radio button (if only one string is given it is used for both)
An array of JSON objects for radion buttons
Protected
rerenderRerender the output if we aren't in the middle of loading a new component (in which case, we will rerender in the callback performed after it is loaded)
The state at which to start rerendering
Protected
resetReset all menu settings to the (page) defaults
Create JSON for a menu rule
The JSON for the rule item
Protected
saveSave any non-default menu settings in localStorage
Protected
scaleRequest the scaling value from the user and save it in the settings
Protected
setMerge menu settings into the a11y document options.
The options.
Protected
setEnable/disable assistive menus based on enrichment setting
Protected
setTrue to output hidden Mathml, false to not
Protected
setTrue to enable braille, false to not
Protected
setThe Braille code format (nemeth or euro)
Protected
setTrue to enable collapsible math, false to not
Protected
setTrue to enable enriched math, false to not
Protected
setThe value that highlighting should have
Protected
setThe new in-line break value
Protected
setThe speech locale
Protected
setSet up the new jax and link it to the document, load any needed extensions, and then rerender the math, if needed
The name of the jax to switch to
True if the document should be rerendered
A promise that is resolved when the renderer is set and rerendering complete
Protected
setThe new overflow value
Protected
setIf the jax is already on record, just use it, otherwise load the new one
The name of the jax to switch to
True if the document should be rerendered
A promise that is resolved when the renderer is set and rerendering complete
Protected
setRerender when the role description changes
Protected
setThe new scaling value
Protected
setTrue to enable speech, false to not
Protected
setTrue for including math in the tab order, false for not
Create JSON for a submenu item
The id for the item
The content for the item
The JSON for the entries
True if this item is diabled initially
The JSON for the submenu item
Protected
toThe MathItem to serialize as MathML
The serialized version of the internal MathML
Protected
toThe MathItem to serialize as SVG
A promise returning the serialized SVG
Protected
transferThe original document whose list is to be transferred
Protected
typesetThe MathItem to serialize as SVG
The SVG font cache type
True if there are inline breaks
A promise returning the serialized SVG
Create JSON for a variable controlling a menu setting
The type of variable being defined
The setting for which to make a variable
Optional
action: (value: T) => voidOptional function to perform after setting the value
The JSON for the variable
Protected
zoomThe event triggering the zoom (or null for from a menu pick)
The type of event occurring (click, dblclick)
The MathItem triggering the event
The Menu object that handles the MathJax contextual menu and its actions