{"version":3,"file":"temml-BQUKR1fw.js","sources":["../../node_modules/temml/dist/temml.mjs"],"sourcesContent":["/**\n * This is the ParseError class, which is the main error thrown by Temml\n * functions when something has gone wrong. This is used to distinguish internal\n * errors from errors in the expression that the user provided.\n *\n * If possible, a caller should provide a Token or ParseNode with information\n * about where in the source string the problem occurred.\n */\nclass ParseError {\n constructor(\n message, // The error message\n token // An object providing position information\n ) {\n let error = \" \" + message;\n let start;\n\n const loc = token && token.loc;\n if (loc && loc.start <= loc.end) {\n // If we have the input and a position, make the error a bit fancier\n\n // Get the input\n const input = loc.lexer.input;\n\n // Prepend some information\n start = loc.start;\n const end = loc.end;\n if (start === input.length) {\n error += \" at end of input: \";\n } else {\n error += \" at position \" + (start + 1) + \": \\n\";\n }\n\n // Underline token in question using combining underscores\n const underlined = input.slice(start, end).replace(/[^]/g, \"$&\\u0332\");\n\n // Extract some context from the input and add it to the error\n let left;\n if (start > 15) {\n left = \"…\" + input.slice(start - 15, start);\n } else {\n left = input.slice(0, start);\n }\n let right;\n if (end + 15 < input.length) {\n right = input.slice(end, end + 15) + \"…\";\n } else {\n right = input.slice(end);\n }\n error += left + underlined + right;\n }\n\n // Some hackery to make ParseError a prototype of Error\n // See http://stackoverflow.com/a/8460753\n const self = new Error(error);\n self.name = \"ParseError\";\n self.__proto__ = ParseError.prototype;\n self.position = start;\n return self;\n }\n}\n\nParseError.prototype.__proto__ = Error.prototype;\n\n//\n/**\n * This file contains a list of utility functions which are useful in other\n * files.\n */\n\n/**\n * Provide a default value if a setting is undefined\n */\nconst deflt = function(setting, defaultIfUndefined) {\n return setting === undefined ? defaultIfUndefined : setting;\n};\n\n// hyphenate and escape adapted from Facebook's React under Apache 2 license\n\nconst uppercase = /([A-Z])/g;\nconst hyphenate = function(str) {\n return str.replace(uppercase, \"-$1\").toLowerCase();\n};\n\nconst ESCAPE_LOOKUP = {\n \"&\": \"&\",\n \">\": \">\",\n \"<\": \"<\",\n '\"': \""\",\n \"'\": \"'\"\n};\n\nconst ESCAPE_REGEX = /[&><\"']/g;\n\n/**\n * Escapes text to prevent scripting attacks.\n */\nfunction escape(text) {\n return String(text).replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);\n}\n\n/**\n * Sometimes we want to pull out the innermost element of a group. In most\n * cases, this will just be the group itself, but when ordgroups and colors have\n * a single element, we want to pull that out.\n */\nconst getBaseElem = function(group) {\n if (group.type === \"ordgroup\") {\n if (group.body.length === 1) {\n return getBaseElem(group.body[0]);\n } else {\n return group;\n }\n } else if (group.type === \"color\") {\n if (group.body.length === 1) {\n return getBaseElem(group.body[0]);\n } else {\n return group;\n }\n } else if (group.type === \"font\") {\n return getBaseElem(group.body);\n } else {\n return group;\n }\n};\n\n/**\n * TeXbook algorithms often reference \"character boxes\", which are simply groups\n * with a single character in them. To decide if something is a character box,\n * we find its innermost group, and see if it is a single character.\n */\nconst isCharacterBox = function(group) {\n const baseElem = getBaseElem(group);\n\n // These are all the types of groups which hold single characters\n return baseElem.type === \"mathord\" || baseElem.type === \"textord\" || baseElem.type === \"atom\"\n};\n\nconst assert = function(value) {\n if (!value) {\n throw new Error(\"Expected non-null, but got \" + String(value));\n }\n return value;\n};\n\n/**\n * Return the protocol of a URL, or \"_relative\" if the URL does not specify a\n * protocol (and thus is relative), or `null` if URL has invalid protocol\n * (so should be outright rejected).\n */\nconst protocolFromUrl = function(url) {\n // Check for possible leading protocol.\n // https://url.spec.whatwg.org/#url-parsing strips leading whitespace\n // (\\x00) or C0 control (\\x00-\\x1F) characters.\n // eslint-disable-next-line no-control-regex\n const protocol = /^[\\x00-\\x20]*([^\\\\/#?]*?)(:|*58|*3a|&colon)/i.exec(url);\n if (!protocol) {\n return \"_relative\";\n }\n // Reject weird colons\n if (protocol[2] !== \":\") {\n return null;\n }\n // Reject invalid characters in scheme according to\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.1\n if (!/^[a-zA-Z][a-zA-Z0-9+\\-.]*$/.test(protocol[1])) {\n return null;\n }\n // Lowercase the protocol\n return protocol[1].toLowerCase();\n};\n\n/**\n * Round `n` to 4 decimal places, or to the nearest 1/10,000th em. The TeXbook\n * gives an acceptable rounding error of 100sp (which would be the nearest\n * 1/6551.6em with our ptPerEm = 10):\n * http://www.ctex.org/documents/shredder/src/texbook.pdf#page=69\n */\nconst round = function(n) {\n return +n.toFixed(4);\n};\n\n// Identify short letters. Used for accents and \\cancelto.\nconst smalls = \"acegıȷmnopqrsuvwxyzαγεηικμνοπρςστυχωϕ𝐚𝐜𝐞𝐠𝐦𝐧𝐨𝐩𝐪𝐫𝐬𝐮𝐯𝐰𝐱𝐲𝐳\";\n\n/**\n * This is a module for storing settings passed into Temml. It correctly handles\n * default settings.\n */\n\n\n/**\n * The main Settings object\n */\nclass Settings {\n constructor(options) {\n // allow null options\n options = options || {};\n this.displayMode = deflt(options.displayMode, false); // boolean\n this.annotate = deflt(options.annotate, false); // boolean\n this.leqno = deflt(options.leqno, false); // boolean\n this.throwOnError = deflt(options.throwOnError, false); // boolean\n this.errorColor = deflt(options.errorColor, \"#b22222\"); // string\n this.macros = options.macros || {};\n this.wrap = deflt(options.wrap, \"none\"); // \"none\" | \"tex\" | \"=\"\n this.xml = deflt(options.xml, false); // boolean\n this.colorIsTextColor = deflt(options.colorIsTextColor, false); // boolean\n this.strict = deflt(options.strict, false); // boolean\n this.trust = deflt(options.trust, false); // trust context. See html.js.\n this.maxSize = (options.maxSize === undefined\n ? [Infinity, Infinity]\n : Array.isArray(options.maxSize)\n ? options.maxSize\n : [Infinity, Infinity]\n );\n this.maxExpand = Math.max(0, deflt(options.maxExpand, 1000)); // number\n }\n\n /**\n * Check whether to test potentially dangerous input, and return\n * `true` (trusted) or `false` (untrusted). The sole argument `context`\n * should be an object with `command` field specifying the relevant LaTeX\n * command (as a string starting with `\\`), and any other arguments, etc.\n * If `context` has a `url` field, a `protocol` field will automatically\n * get added by this function (changing the specified object).\n */\n isTrusted(context) {\n if (context.url && !context.protocol) {\n const protocol = protocolFromUrl(context.url);\n if (protocol == null) {\n return false\n }\n context.protocol = protocol;\n }\n const trust = typeof this.trust === \"function\" ? this.trust(context) : this.trust;\n return Boolean(trust);\n }\n}\n\n/**\n * All registered functions.\n * `functions.js` just exports this same dictionary again and makes it public.\n * `Parser.js` requires this dictionary.\n */\nconst _functions = {};\n\n/**\n * All MathML builders. Should be only used in the `define*` and the `build*ML`\n * functions.\n */\nconst _mathmlGroupBuilders = {};\n\nfunction defineFunction({\n type,\n names,\n props,\n handler,\n mathmlBuilder\n}) {\n // Set default values of functions\n const data = {\n type,\n numArgs: props.numArgs,\n argTypes: props.argTypes,\n allowedInArgument: !!props.allowedInArgument,\n allowedInText: !!props.allowedInText,\n allowedInMath: props.allowedInMath === undefined ? true : props.allowedInMath,\n numOptionalArgs: props.numOptionalArgs || 0,\n infix: !!props.infix,\n primitive: !!props.primitive,\n handler: handler\n };\n for (let i = 0; i < names.length; ++i) {\n _functions[names[i]] = data;\n }\n if (type) {\n if (mathmlBuilder) {\n _mathmlGroupBuilders[type] = mathmlBuilder;\n }\n }\n}\n\n/**\n * Use this to register only the MathML builder for a function(e.g.\n * if the function's ParseNode is generated in Parser.js rather than via a\n * stand-alone handler provided to `defineFunction`).\n */\nfunction defineFunctionBuilders({ type, mathmlBuilder }) {\n defineFunction({\n type,\n names: [],\n props: { numArgs: 0 },\n handler() {\n throw new Error(\"Should never be called.\")\n },\n mathmlBuilder\n });\n}\n\nconst normalizeArgument = function(arg) {\n return arg.type === \"ordgroup\" && arg.body.length === 1 ? arg.body[0] : arg\n};\n\n// Since the corresponding buildMathML function expects a\n// list of elements, we normalize for different kinds of arguments\nconst ordargument = function(arg) {\n return arg.type === \"ordgroup\" ? arg.body : [arg]\n};\n\n/**\n * This node represents a document fragment, which contains elements, but when\n * placed into the DOM doesn't have any representation itself. It only contains\n * children and doesn't have any DOM node properties.\n */\nclass DocumentFragment {\n constructor(children) {\n this.children = children;\n this.classes = [];\n this.style = {};\n }\n\n hasClass(className) {\n return this.classes.includes(className);\n }\n\n /** Convert the fragment into a node. */\n toNode() {\n const frag = document.createDocumentFragment();\n\n for (let i = 0; i < this.children.length; i++) {\n frag.appendChild(this.children[i].toNode());\n }\n\n return frag;\n }\n\n /** Convert the fragment into HTML markup. */\n toMarkup() {\n let markup = \"\";\n\n // Simply concatenate the markup for the children together.\n for (let i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n return markup;\n }\n\n /**\n * Converts the math node into a string, similar to innerText. Applies to\n * MathDomNode's only.\n */\n toText() {\n // To avoid this, we would subclass documentFragment separately for\n // MathML, but polyfills for subclassing is expensive per PR 1469.\n const toText = (child) => child.toText();\n return this.children.map(toText).join(\"\");\n }\n}\n\n/**\n * These objects store the data about the DOM nodes we create, as well as some\n * extra data. They can then be transformed into real DOM nodes with the\n * `toNode` function or HTML markup using `toMarkup`. They are useful for both\n * storing extra properties on the nodes, as well as providing a way to easily\n * work with the DOM.\n *\n * Similar functions for working with MathML nodes exist in mathMLTree.js.\n *\n */\n\n/**\n * Create an HTML className based on a list of classes. In addition to joining\n * with spaces, we also remove empty classes.\n */\nconst createClass = function(classes) {\n return classes.filter((cls) => cls).join(\" \");\n};\n\nconst initNode = function(classes, style) {\n this.classes = classes || [];\n this.attributes = {};\n this.style = style || {};\n};\n\n/**\n * Convert into an HTML node\n */\nconst toNode = function(tagName) {\n const node = document.createElement(tagName);\n\n // Apply the class\n node.className = createClass(this.classes);\n\n // Apply inline styles\n for (const style in this.style) {\n if (Object.prototype.hasOwnProperty.call(this.style, style )) {\n node.style[style] = this.style[style];\n }\n }\n\n // Apply attributes\n for (const attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr )) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n }\n\n // Append the children, also as HTML nodes\n for (let i = 0; i < this.children.length; i++) {\n node.appendChild(this.children[i].toNode());\n }\n\n return node;\n};\n\n/**\n * Convert into an HTML markup string\n */\nconst toMarkup = function(tagName) {\n let markup = `<${tagName}`;\n\n // Add the class\n if (this.classes.length) {\n markup += ` class=\"${escape(createClass(this.classes))}\"`;\n }\n\n let styles = \"\";\n\n // Add the styles, after hyphenation\n for (const style in this.style) {\n if (Object.prototype.hasOwnProperty.call(this.style, style )) {\n styles += `${hyphenate(style)}:${this.style[style]};`;\n }\n }\n\n if (styles) {\n markup += ` style=\"${styles}\"`;\n }\n\n // Add the attributes\n for (const attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr )) {\n markup += ` ${attr}=\"${escape(this.attributes[attr])}\"`;\n }\n }\n\n markup += \">\";\n\n // Add the markup of the children, also as markup\n for (let i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n markup += `${tagName}>`;\n\n return markup;\n};\n\n/**\n * This node represents a span node, with a className, a list of children, and\n * an inline style.\n *\n */\nclass Span {\n constructor(classes, children, style) {\n initNode.call(this, classes, style);\n this.children = children || [];\n }\n\n setAttribute(attribute, value) {\n this.attributes[attribute] = value;\n }\n\n toNode() {\n return toNode.call(this, \"span\");\n }\n\n toMarkup() {\n return toMarkup.call(this, \"span\");\n }\n}\n\nlet TextNode$1 = class TextNode {\n constructor(text) {\n this.text = text;\n }\n toNode() {\n return document.createTextNode(this.text);\n }\n toMarkup() {\n return escape(this.text);\n }\n};\n\n// Create an node.\nclass AnchorNode {\n constructor(href, classes, children) {\n this.href = href;\n this.classes = classes;\n this.children = children || [];\n }\n\n toNode() {\n const node = document.createElement(\"a\");\n node.setAttribute(\"href\", this.href);\n if (this.classes.length > 0) {\n node.className = createClass(this.classes);\n }\n for (let i = 0; i < this.children.length; i++) {\n node.appendChild(this.children[i].toNode());\n }\n return node\n }\n\n toMarkup() {\n let markup = ` 0) {\n markup += ` class=\"${escape(createClass(this.classes))}\"`;\n }\n markup += \">\";\n for (let i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n markup += \"\";\n return markup\n }\n}\n\n/*\n * This node represents an image embed (
) element.\n */\nclass Img {\n constructor(src, alt, style) {\n this.alt = alt;\n this.src = src;\n this.classes = [\"mord\"];\n this.style = style;\n }\n\n hasClass(className) {\n return this.classes.includes(className);\n }\n\n toNode() {\n const node = document.createElement(\"img\");\n node.src = this.src;\n node.alt = this.alt;\n node.className = \"mord\";\n\n // Apply inline styles\n for (const style in this.style) {\n if (Object.prototype.hasOwnProperty.call(this.style, style )) {\n node.style[style] = this.style[style];\n }\n }\n\n return node;\n }\n\n toMarkup() {\n let markup = `
\";\n return markup;\n }\n}\n\n//\n/**\n * These objects store data about MathML nodes.\n * The `toNode` and `toMarkup` functions create namespaced DOM nodes and\n * HTML text markup respectively.\n */\n\n\nfunction newDocumentFragment(children) {\n return new DocumentFragment(children);\n}\n\n/**\n * This node represents a general purpose MathML node of any type,\n * for example, `\"mo\"` or `\"mspace\"`, corresponding to `` and\n * `` tags).\n */\nclass MathNode {\n constructor(type, children, classes, style) {\n this.type = type;\n this.attributes = {};\n this.children = children || [];\n this.classes = classes || [];\n this.style = style || {}; // Used for elements\n this.label = \"\";\n }\n\n /**\n * Sets an attribute on a MathML node. MathML depends on attributes to convey a\n * semantic content, so this is used heavily.\n */\n setAttribute(name, value) {\n this.attributes[name] = value;\n }\n\n /**\n * Gets an attribute on a MathML node.\n */\n getAttribute(name) {\n return this.attributes[name];\n }\n\n setLabel(value) {\n this.label = value;\n }\n\n /**\n * Converts the math node into a MathML-namespaced DOM element.\n */\n toNode() {\n const node = document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", this.type);\n\n for (const attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n }\n\n if (this.classes.length > 0) {\n node.className = createClass(this.classes);\n }\n\n // Apply inline styles\n for (const style in this.style) {\n if (Object.prototype.hasOwnProperty.call(this.style, style )) {\n node.style[style] = this.style[style];\n }\n }\n\n for (let i = 0; i < this.children.length; i++) {\n node.appendChild(this.children[i].toNode());\n }\n\n return node;\n }\n\n /**\n * Converts the math node into an HTML markup string.\n */\n toMarkup() {\n let markup = \"<\" + this.type;\n\n // Add the attributes\n for (const attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n markup += \" \" + attr + '=\"';\n markup += escape(this.attributes[attr]);\n markup += '\"';\n }\n }\n\n if (this.classes.length > 0) {\n markup += ` class=\"${escape(createClass(this.classes))}\"`;\n }\n\n let styles = \"\";\n\n // Add the styles, after hyphenation\n for (const style in this.style) {\n if (Object.prototype.hasOwnProperty.call(this.style, style )) {\n styles += `${hyphenate(style)}:${this.style[style]};`;\n }\n }\n\n if (styles) {\n markup += ` style=\"${styles}\"`;\n }\n\n markup += \">\";\n\n for (let i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n markup += \"\" + this.type + \">\";\n\n return markup;\n }\n\n /**\n * Converts the math node into a string, similar to innerText, but escaped.\n */\n toText() {\n return this.children.map((child) => child.toText()).join(\"\");\n }\n}\n\n/**\n * This node represents a piece of text.\n */\nclass TextNode {\n constructor(text) {\n this.text = text;\n }\n\n /**\n * Converts the text node into a DOM text node.\n */\n toNode() {\n return document.createTextNode(this.text);\n }\n\n /**\n * Converts the text node into escaped HTML markup\n * (representing the text itself).\n */\n toMarkup() {\n return escape(this.toText());\n }\n\n /**\n * Converts the text node into a string\n * (representing the text itself).\n */\n toText() {\n return this.text;\n }\n}\n\n// Do not make an the only child of a .\n// An acts as its own implicit .\nconst wrapWithMstyle = expression => {\n let node;\n if (expression.length === 1 && expression[0].type === \"mrow\") {\n node = expression.pop();\n node.type = \"mstyle\";\n } else {\n node = new MathNode(\"mstyle\", expression);\n }\n return node\n};\n\n/**\n * This file provides support for building horizontal stretchy elements.\n */\n\n\n// TODO: Remove when Chromium stretches \\widetilde & \\widehat\nconst estimatedWidth = node => {\n let width = 0;\n if (node.body && Array.isArray(node.body)) {\n for (const item of node.body) {\n width += estimatedWidth(item);\n }\n } else if (node.body) {\n width += estimatedWidth(node.body);\n } else if (node.type === \"supsub\") {\n width += estimatedWidth(node.base);\n if (node.sub) { width += 0.7 * estimatedWidth(node.sub); }\n if (node.sup) { width += 0.7 * estimatedWidth(node.sup); }\n } else if (node.type === \"mathord\" || node.type === \"textord\") {\n for (const ch of node.text.split('')) {\n const codePoint = ch.codePointAt(0);\n if ((0x60 < codePoint && codePoint < 0x7B) || (0x03B0 < codePoint && codePoint < 0x3CA)) {\n width += 0.56; // lower case latin or greek. Use advance width of letter n\n } else if (0x2F < codePoint && codePoint < 0x3A) {\n width += 0.50; // numerals.\n } else {\n width += 0.92; // advance width of letter M\n }\n }\n } else {\n width += 1.0;\n }\n return width\n};\n\nconst stretchyCodePoint = {\n widehat: \"^\",\n widecheck: \"ˇ\",\n widetilde: \"~\",\n wideparen: \"⏜\", // \\u23dc\n utilde: \"~\",\n overleftarrow: \"\\u2190\",\n underleftarrow: \"\\u2190\",\n xleftarrow: \"\\u2190\",\n overrightarrow: \"\\u2192\",\n underrightarrow: \"\\u2192\",\n xrightarrow: \"\\u2192\",\n underbrace: \"\\u23df\",\n overbrace: \"\\u23de\",\n overbracket: \"\\u23b4\",\n underbracket: \"\\u23b5\",\n overgroup: \"\\u23e0\",\n overparen: \"⏜\",\n undergroup: \"\\u23e1\",\n underparen: \"\\u23dd\",\n overleftrightarrow: \"\\u2194\",\n underleftrightarrow: \"\\u2194\",\n xleftrightarrow: \"\\u2194\",\n Overrightarrow: \"\\u21d2\",\n xRightarrow: \"\\u21d2\",\n overleftharpoon: \"\\u21bc\",\n xleftharpoonup: \"\\u21bc\",\n overrightharpoon: \"\\u21c0\",\n xrightharpoonup: \"\\u21c0\",\n xLeftarrow: \"\\u21d0\",\n xLeftrightarrow: \"\\u21d4\",\n xhookleftarrow: \"\\u21a9\",\n xhookrightarrow: \"\\u21aa\",\n xmapsto: \"\\u21a6\",\n xrightharpoondown: \"\\u21c1\",\n xleftharpoondown: \"\\u21bd\",\n xtwoheadleftarrow: \"\\u219e\",\n xtwoheadrightarrow: \"\\u21a0\",\n xlongequal: \"=\",\n xrightleftarrows: \"\\u21c4\",\n xtofrom: \"\\u21c4\",\n xleftrightharpoons: \"\\u21cb\",\n xrightleftharpoons: \"\\u21cc\",\n yields: \"\\u2192\",\n yieldsLeft: \"\\u2190\",\n mesomerism: \"\\u2194\",\n longrightharpoonup: \"\\u21c0\",\n longleftharpoondown: \"\\u21bd\",\n eqrightharpoonup: \"\\u21c0\",\n eqleftharpoondown: \"\\u21bd\",\n \"\\\\cdrightarrow\": \"\\u2192\",\n \"\\\\cdleftarrow\": \"\\u2190\",\n \"\\\\cdlongequal\": \"=\",\n yieldsLeftRight: \"\\u21c4\",\n chemequilibrium: \"\\u21cc\"\n};\n\nconst mathMLnode = function(label) {\n const child = new TextNode(stretchyCodePoint[label.slice(1)]);\n const node = new MathNode(\"mo\", [child]);\n node.setAttribute(\"stretchy\", \"true\");\n return node\n};\n\nconst crookedWides = [\"\\\\widetilde\", \"\\\\widehat\", \"\\\\widecheck\", \"\\\\utilde\"];\n\n// TODO: Remove when Chromium stretches \\widetilde & \\widehat\nconst accentNode = (group) => {\n const mo = mathMLnode(group.label);\n if (crookedWides.includes(group.label)) {\n const width = estimatedWidth(group.base);\n if (1 < width && width < 1.6) {\n mo.classes.push(\"tml-crooked-2\");\n } else if (1.6 <= width && width < 2.5) {\n mo.classes.push(\"tml-crooked-3\");\n } else if (2.5 <= width) {\n mo.classes.push(\"tml-crooked-4\");\n }\n }\n return mo\n};\n\n/**\n * This file holds a list of all no-argument functions and single-character\n * symbols (like 'a' or ';').\n *\n * For each of the symbols, there are two properties they can have:\n * - group (required): the ParseNode group type the symbol should have (i.e.\n \"textord\", \"mathord\", etc).\n * - replace: the character that this symbol or function should be\n * replaced with (i.e. \"\\phi\" has a replace value of \"\\u03d5\", the phi\n * character in the main font).\n *\n * The outermost map in the table indicates what mode the symbols should be\n * accepted in (e.g. \"math\" or \"text\").\n */\n\n// Some of these have a \"-token\" suffix since these are also used as `ParseNode`\n// types for raw text tokens, and we want to avoid conflicts with higher-level\n// `ParseNode` types. These `ParseNode`s are constructed within `Parser` by\n// looking up the `symbols` map.\nconst ATOMS = {\n bin: 1,\n close: 1,\n inner: 1,\n open: 1,\n punct: 1,\n rel: 1\n};\nconst NON_ATOMS = {\n \"accent-token\": 1,\n mathord: 1,\n \"op-token\": 1,\n spacing: 1,\n textord: 1\n};\n\nconst symbols = {\n math: {},\n text: {}\n};\n\n/** `acceptUnicodeChar = true` is only applicable if `replace` is set. */\nfunction defineSymbol(mode, group, replace, name, acceptUnicodeChar) {\n symbols[mode][name] = { group, replace };\n\n if (acceptUnicodeChar && replace) {\n symbols[mode][replace] = symbols[mode][name];\n }\n}\n\n// Some abbreviations for commonly used strings.\n// This helps minify the code, and also spotting typos using jshint.\n\n// modes:\nconst math = \"math\";\nconst text = \"text\";\n\n// groups:\nconst accent = \"accent-token\";\nconst bin = \"bin\";\nconst close = \"close\";\nconst inner = \"inner\";\nconst mathord = \"mathord\";\nconst op = \"op-token\";\nconst open = \"open\";\nconst punct = \"punct\";\nconst rel = \"rel\";\nconst spacing = \"spacing\";\nconst textord = \"textord\";\n\n// Now comes the symbol table\n\n// Relation Symbols\ndefineSymbol(math, rel, \"\\u2261\", \"\\\\equiv\", true);\ndefineSymbol(math, rel, \"\\u227a\", \"\\\\prec\", true);\ndefineSymbol(math, rel, \"\\u227b\", \"\\\\succ\", true);\ndefineSymbol(math, rel, \"\\u223c\", \"\\\\sim\", true);\ndefineSymbol(math, rel, \"\\u27c2\", \"\\\\perp\", true);\ndefineSymbol(math, rel, \"\\u2aaf\", \"\\\\preceq\", true);\ndefineSymbol(math, rel, \"\\u2ab0\", \"\\\\succeq\", true);\ndefineSymbol(math, rel, \"\\u2243\", \"\\\\simeq\", true);\ndefineSymbol(math, rel, \"\\u224c\", \"\\\\backcong\", true);\ndefineSymbol(math, rel, \"|\", \"\\\\mid\", true);\ndefineSymbol(math, rel, \"\\u226a\", \"\\\\ll\", true);\ndefineSymbol(math, rel, \"\\u226b\", \"\\\\gg\", true);\ndefineSymbol(math, rel, \"\\u224d\", \"\\\\asymp\", true);\ndefineSymbol(math, rel, \"\\u2225\", \"\\\\parallel\");\ndefineSymbol(math, rel, \"\\u2323\", \"\\\\smile\", true);\ndefineSymbol(math, rel, \"\\u2291\", \"\\\\sqsubseteq\", true);\ndefineSymbol(math, rel, \"\\u2292\", \"\\\\sqsupseteq\", true);\ndefineSymbol(math, rel, \"\\u2250\", \"\\\\doteq\", true);\ndefineSymbol(math, rel, \"\\u2322\", \"\\\\frown\", true);\ndefineSymbol(math, rel, \"\\u220b\", \"\\\\ni\", true);\ndefineSymbol(math, rel, \"\\u220c\", \"\\\\notni\", true);\ndefineSymbol(math, rel, \"\\u221d\", \"\\\\propto\", true);\ndefineSymbol(math, rel, \"\\u22a2\", \"\\\\vdash\", true);\ndefineSymbol(math, rel, \"\\u22a3\", \"\\\\dashv\", true);\ndefineSymbol(math, rel, \"\\u220b\", \"\\\\owns\");\ndefineSymbol(math, rel, \"\\u2258\", \"\\\\arceq\", true);\ndefineSymbol(math, rel, \"\\u2259\", \"\\\\wedgeq\", true);\ndefineSymbol(math, rel, \"\\u225a\", \"\\\\veeeq\", true);\ndefineSymbol(math, rel, \"\\u225b\", \"\\\\stareq\", true);\ndefineSymbol(math, rel, \"\\u225d\", \"\\\\eqdef\", true);\ndefineSymbol(math, rel, \"\\u225e\", \"\\\\measeq\", true);\ndefineSymbol(math, rel, \"\\u225f\", \"\\\\questeq\", true);\ndefineSymbol(math, rel, \"\\u2260\", \"\\\\ne\", true);\ndefineSymbol(math, rel, \"\\u2260\", \"\\\\neq\");\n// unicodemath\ndefineSymbol(math, rel, \"\\u2a75\", \"\\\\eqeq\", true);\ndefineSymbol(math, rel, \"\\u2a76\", \"\\\\eqeqeq\", true);\n// mathtools.sty\ndefineSymbol(math, rel, \"\\u2237\", \"\\\\dblcolon\", true);\ndefineSymbol(math, rel, \"\\u2254\", \"\\\\coloneqq\", true);\ndefineSymbol(math, rel, \"\\u2255\", \"\\\\eqqcolon\", true);\ndefineSymbol(math, rel, \"\\u2239\", \"\\\\eqcolon\", true);\ndefineSymbol(math, rel, \"\\u2A74\", \"\\\\Coloneqq\", true);\n\n// Punctuation\ndefineSymbol(math, punct, \"\\u002e\", \"\\\\ldotp\");\ndefineSymbol(math, punct, \"\\u00b7\", \"\\\\cdotp\");\n\n// Misc Symbols\ndefineSymbol(math, textord, \"\\u0023\", \"\\\\#\");\ndefineSymbol(text, textord, \"\\u0023\", \"\\\\#\");\ndefineSymbol(math, textord, \"\\u0026\", \"\\\\&\");\ndefineSymbol(text, textord, \"\\u0026\", \"\\\\&\");\ndefineSymbol(math, textord, \"\\u2135\", \"\\\\aleph\", true);\ndefineSymbol(math, textord, \"\\u2200\", \"\\\\forall\", true);\ndefineSymbol(math, textord, \"\\u210f\", \"\\\\hbar\", true);\ndefineSymbol(math, textord, \"\\u2203\", \"\\\\exists\", true);\n// ∇ is actually a unary operator, not binary. But this works.\ndefineSymbol(math, bin, \"\\u2207\", \"\\\\nabla\", true);\ndefineSymbol(math, textord, \"\\u266d\", \"\\\\flat\", true);\ndefineSymbol(math, textord, \"\\u2113\", \"\\\\ell\", true);\ndefineSymbol(math, textord, \"\\u266e\", \"\\\\natural\", true);\ndefineSymbol(math, textord, \"Å\", \"\\\\Angstrom\", true);\ndefineSymbol(text, textord, \"Å\", \"\\\\Angstrom\", true);\ndefineSymbol(math, textord, \"\\u2663\", \"\\\\clubsuit\", true);\ndefineSymbol(math, textord, \"\\u2667\", \"\\\\varclubsuit\", true);\ndefineSymbol(math, textord, \"\\u2118\", \"\\\\wp\", true);\ndefineSymbol(math, textord, \"\\u266f\", \"\\\\sharp\", true);\ndefineSymbol(math, textord, \"\\u2662\", \"\\\\diamondsuit\", true);\ndefineSymbol(math, textord, \"\\u2666\", \"\\\\vardiamondsuit\", true);\ndefineSymbol(math, textord, \"\\u211c\", \"\\\\Re\", true);\ndefineSymbol(math, textord, \"\\u2661\", \"\\\\heartsuit\", true);\ndefineSymbol(math, textord, \"\\u2665\", \"\\\\varheartsuit\", true);\ndefineSymbol(math, textord, \"\\u2111\", \"\\\\Im\", true);\ndefineSymbol(math, textord, \"\\u2660\", \"\\\\spadesuit\", true);\ndefineSymbol(math, textord, \"\\u2664\", \"\\\\varspadesuit\", true);\ndefineSymbol(math, textord, \"\\u2640\", \"\\\\female\", true);\ndefineSymbol(math, textord, \"\\u2642\", \"\\\\male\", true);\ndefineSymbol(math, textord, \"\\u00a7\", \"\\\\S\", true);\ndefineSymbol(text, textord, \"\\u00a7\", \"\\\\S\");\ndefineSymbol(math, textord, \"\\u00b6\", \"\\\\P\", true);\ndefineSymbol(text, textord, \"\\u00b6\", \"\\\\P\");\ndefineSymbol(text, textord, \"\\u263a\", \"\\\\smiley\", true);\ndefineSymbol(math, textord, \"\\u263a\", \"\\\\smiley\", true);\n\n// Math and Text\ndefineSymbol(math, textord, \"\\u2020\", \"\\\\dag\");\ndefineSymbol(text, textord, \"\\u2020\", \"\\\\dag\");\ndefineSymbol(text, textord, \"\\u2020\", \"\\\\textdagger\");\ndefineSymbol(math, textord, \"\\u2021\", \"\\\\ddag\");\ndefineSymbol(text, textord, \"\\u2021\", \"\\\\ddag\");\ndefineSymbol(text, textord, \"\\u2021\", \"\\\\textdaggerdbl\");\n\n// Large Delimiters\ndefineSymbol(math, close, \"\\u23b1\", \"\\\\rmoustache\", true);\ndefineSymbol(math, open, \"\\u23b0\", \"\\\\lmoustache\", true);\ndefineSymbol(math, close, \"\\u27ef\", \"\\\\rgroup\", true);\ndefineSymbol(math, open, \"\\u27ee\", \"\\\\lgroup\", true);\n\n// Binary Operators\ndefineSymbol(math, bin, \"\\u2213\", \"\\\\mp\", true);\ndefineSymbol(math, bin, \"\\u2296\", \"\\\\ominus\", true);\ndefineSymbol(math, bin, \"\\u228e\", \"\\\\uplus\", true);\ndefineSymbol(math, bin, \"\\u2293\", \"\\\\sqcap\", true);\ndefineSymbol(math, bin, \"\\u2217\", \"\\\\ast\");\ndefineSymbol(math, bin, \"\\u2294\", \"\\\\sqcup\", true);\ndefineSymbol(math, bin, \"\\u25ef\", \"\\\\bigcirc\", true);\ndefineSymbol(math, bin, \"\\u2219\", \"\\\\bullet\", true);\ndefineSymbol(math, bin, \"\\u2021\", \"\\\\ddagger\");\ndefineSymbol(math, bin, \"\\u2240\", \"\\\\wr\", true);\ndefineSymbol(math, bin, \"\\u2a3f\", \"\\\\amalg\");\ndefineSymbol(math, bin, \"\\u0026\", \"\\\\And\"); // from amsmath\ndefineSymbol(math, bin, \"\\u2AFD\", \"\\\\sslash\", true); // from stmaryrd\n\n// Arrow Symbols\ndefineSymbol(math, rel, \"\\u27f5\", \"\\\\longleftarrow\", true);\ndefineSymbol(math, rel, \"\\u21d0\", \"\\\\Leftarrow\", true);\ndefineSymbol(math, rel, \"\\u27f8\", \"\\\\Longleftarrow\", true);\ndefineSymbol(math, rel, \"\\u27f6\", \"\\\\longrightarrow\", true);\ndefineSymbol(math, rel, \"\\u21d2\", \"\\\\Rightarrow\", true);\ndefineSymbol(math, rel, \"\\u27f9\", \"\\\\Longrightarrow\", true);\ndefineSymbol(math, rel, \"\\u2194\", \"\\\\leftrightarrow\", true);\ndefineSymbol(math, rel, \"\\u27f7\", \"\\\\longleftrightarrow\", true);\ndefineSymbol(math, rel, \"\\u21d4\", \"\\\\Leftrightarrow\", true);\ndefineSymbol(math, rel, \"\\u27fa\", \"\\\\Longleftrightarrow\", true);\ndefineSymbol(math, rel, \"\\u21a4\", \"\\\\mapsfrom\", true);\ndefineSymbol(math, rel, \"\\u21a6\", \"\\\\mapsto\", true);\ndefineSymbol(math, rel, \"\\u27fc\", \"\\\\longmapsto\", true);\ndefineSymbol(math, rel, \"\\u2197\", \"\\\\nearrow\", true);\ndefineSymbol(math, rel, \"\\u21a9\", \"\\\\hookleftarrow\", true);\ndefineSymbol(math, rel, \"\\u21aa\", \"\\\\hookrightarrow\", true);\ndefineSymbol(math, rel, \"\\u2198\", \"\\\\searrow\", true);\ndefineSymbol(math, rel, \"\\u21bc\", \"\\\\leftharpoonup\", true);\ndefineSymbol(math, rel, \"\\u21c0\", \"\\\\rightharpoonup\", true);\ndefineSymbol(math, rel, \"\\u2199\", \"\\\\swarrow\", true);\ndefineSymbol(math, rel, \"\\u21bd\", \"\\\\leftharpoondown\", true);\ndefineSymbol(math, rel, \"\\u21c1\", \"\\\\rightharpoondown\", true);\ndefineSymbol(math, rel, \"\\u2196\", \"\\\\nwarrow\", true);\ndefineSymbol(math, rel, \"\\u21cc\", \"\\\\rightleftharpoons\", true);\ndefineSymbol(math, mathord, \"\\u21af\", \"\\\\lightning\", true);\ndefineSymbol(math, mathord, \"\\u220E\", \"\\\\QED\", true);\ndefineSymbol(math, mathord, \"\\u2030\", \"\\\\permil\", true);\ndefineSymbol(text, textord, \"\\u2030\", \"\\\\permil\");\ndefineSymbol(math, mathord, \"\\u2609\", \"\\\\astrosun\", true);\ndefineSymbol(math, mathord, \"\\u263c\", \"\\\\sun\", true);\ndefineSymbol(math, mathord, \"\\u263e\", \"\\\\leftmoon\", true);\ndefineSymbol(math, mathord, \"\\u263d\", \"\\\\rightmoon\", true);\ndefineSymbol(math, mathord, \"\\u2295\", \"\\\\Earth\");\n\n// AMS Negated Binary Relations\ndefineSymbol(math, rel, \"\\u226e\", \"\\\\nless\", true);\n// Symbol names preceeded by \"@\" each have a corresponding macro.\ndefineSymbol(math, rel, \"\\u2a87\", \"\\\\lneq\", true);\ndefineSymbol(math, rel, \"\\u2268\", \"\\\\lneqq\", true);\ndefineSymbol(math, rel, \"\\u2268\\ufe00\", \"\\\\lvertneqq\");\ndefineSymbol(math, rel, \"\\u22e6\", \"\\\\lnsim\", true);\ndefineSymbol(math, rel, \"\\u2a89\", \"\\\\lnapprox\", true);\ndefineSymbol(math, rel, \"\\u2280\", \"\\\\nprec\", true);\n// unicode-math maps \\u22e0 to \\npreccurlyeq. We'll use the AMS synonym.\ndefineSymbol(math, rel, \"\\u22e0\", \"\\\\npreceq\", true);\ndefineSymbol(math, rel, \"\\u22e8\", \"\\\\precnsim\", true);\ndefineSymbol(math, rel, \"\\u2ab9\", \"\\\\precnapprox\", true);\ndefineSymbol(math, rel, \"\\u2241\", \"\\\\nsim\", true);\ndefineSymbol(math, rel, \"\\u2224\", \"\\\\nmid\", true);\ndefineSymbol(math, rel, \"\\u2224\", \"\\\\nshortmid\");\ndefineSymbol(math, rel, \"\\u22ac\", \"\\\\nvdash\", true);\ndefineSymbol(math, rel, \"\\u22ad\", \"\\\\nvDash\", true);\ndefineSymbol(math, rel, \"\\u22ea\", \"\\\\ntriangleleft\");\ndefineSymbol(math, rel, \"\\u22ec\", \"\\\\ntrianglelefteq\", true);\ndefineSymbol(math, rel, \"\\u2284\", \"\\\\nsubset\", true);\ndefineSymbol(math, rel, \"\\u2285\", \"\\\\nsupset\", true);\ndefineSymbol(math, rel, \"\\u228a\", \"\\\\subsetneq\", true);\ndefineSymbol(math, rel, \"\\u228a\\ufe00\", \"\\\\varsubsetneq\");\ndefineSymbol(math, rel, \"\\u2acb\", \"\\\\subsetneqq\", true);\ndefineSymbol(math, rel, \"\\u2acb\\ufe00\", \"\\\\varsubsetneqq\");\ndefineSymbol(math, rel, \"\\u226f\", \"\\\\ngtr\", true);\ndefineSymbol(math, rel, \"\\u2a88\", \"\\\\gneq\", true);\ndefineSymbol(math, rel, \"\\u2269\", \"\\\\gneqq\", true);\ndefineSymbol(math, rel, \"\\u2269\\ufe00\", \"\\\\gvertneqq\");\ndefineSymbol(math, rel, \"\\u22e7\", \"\\\\gnsim\", true);\ndefineSymbol(math, rel, \"\\u2a8a\", \"\\\\gnapprox\", true);\ndefineSymbol(math, rel, \"\\u2281\", \"\\\\nsucc\", true);\n// unicode-math maps \\u22e1 to \\nsucccurlyeq. We'll use the AMS synonym.\ndefineSymbol(math, rel, \"\\u22e1\", \"\\\\nsucceq\", true);\ndefineSymbol(math, rel, \"\\u22e9\", \"\\\\succnsim\", true);\ndefineSymbol(math, rel, \"\\u2aba\", \"\\\\succnapprox\", true);\n// unicode-math maps \\u2246 to \\simneqq. We'll use the AMS synonym.\ndefineSymbol(math, rel, \"\\u2246\", \"\\\\ncong\", true);\ndefineSymbol(math, rel, \"\\u2226\", \"\\\\nparallel\", true);\ndefineSymbol(math, rel, \"\\u2226\", \"\\\\nshortparallel\");\ndefineSymbol(math, rel, \"\\u22af\", \"\\\\nVDash\", true);\ndefineSymbol(math, rel, \"\\u22eb\", \"\\\\ntriangleright\");\ndefineSymbol(math, rel, \"\\u22ed\", \"\\\\ntrianglerighteq\", true);\ndefineSymbol(math, rel, \"\\u228b\", \"\\\\supsetneq\", true);\ndefineSymbol(math, rel, \"\\u228b\", \"\\\\varsupsetneq\");\ndefineSymbol(math, rel, \"\\u2acc\", \"\\\\supsetneqq\", true);\ndefineSymbol(math, rel, \"\\u2acc\\ufe00\", \"\\\\varsupsetneqq\");\ndefineSymbol(math, rel, \"\\u22ae\", \"\\\\nVdash\", true);\ndefineSymbol(math, rel, \"\\u2ab5\", \"\\\\precneqq\", true);\ndefineSymbol(math, rel, \"\\u2ab6\", \"\\\\succneqq\", true);\ndefineSymbol(math, bin, \"\\u22b4\", \"\\\\unlhd\");\ndefineSymbol(math, bin, \"\\u22b5\", \"\\\\unrhd\");\n\n// AMS Negated Arrows\ndefineSymbol(math, rel, \"\\u219a\", \"\\\\nleftarrow\", true);\ndefineSymbol(math, rel, \"\\u219b\", \"\\\\nrightarrow\", true);\ndefineSymbol(math, rel, \"\\u21cd\", \"\\\\nLeftarrow\", true);\ndefineSymbol(math, rel, \"\\u21cf\", \"\\\\nRightarrow\", true);\ndefineSymbol(math, rel, \"\\u21ae\", \"\\\\nleftrightarrow\", true);\ndefineSymbol(math, rel, \"\\u21ce\", \"\\\\nLeftrightarrow\", true);\n\n// AMS Misc\ndefineSymbol(math, rel, \"\\u25b3\", \"\\\\vartriangle\");\ndefineSymbol(math, textord, \"\\u210f\", \"\\\\hslash\");\ndefineSymbol(math, textord, \"\\u25bd\", \"\\\\triangledown\");\ndefineSymbol(math, textord, \"\\u25ca\", \"\\\\lozenge\");\ndefineSymbol(math, textord, \"\\u24c8\", \"\\\\circledS\");\ndefineSymbol(math, textord, \"\\u00ae\", \"\\\\circledR\", true);\ndefineSymbol(text, textord, \"\\u00ae\", \"\\\\circledR\");\ndefineSymbol(text, textord, \"\\u00ae\", \"\\\\textregistered\");\ndefineSymbol(math, textord, \"\\u2221\", \"\\\\measuredangle\", true);\ndefineSymbol(math, textord, \"\\u2204\", \"\\\\nexists\");\ndefineSymbol(math, textord, \"\\u2127\", \"\\\\mho\");\ndefineSymbol(math, textord, \"\\u2132\", \"\\\\Finv\", true);\ndefineSymbol(math, textord, \"\\u2141\", \"\\\\Game\", true);\ndefineSymbol(math, textord, \"\\u2035\", \"\\\\backprime\");\ndefineSymbol(math, textord, \"\\u2036\", \"\\\\backdprime\");\ndefineSymbol(math, textord, \"\\u2037\", \"\\\\backtrprime\");\ndefineSymbol(math, textord, \"\\u25b2\", \"\\\\blacktriangle\");\ndefineSymbol(math, textord, \"\\u25bc\", \"\\\\blacktriangledown\");\ndefineSymbol(math, textord, \"\\u25a0\", \"\\\\blacksquare\");\ndefineSymbol(math, textord, \"\\u29eb\", \"\\\\blacklozenge\");\ndefineSymbol(math, textord, \"\\u2605\", \"\\\\bigstar\");\ndefineSymbol(math, textord, \"\\u2222\", \"\\\\sphericalangle\", true);\ndefineSymbol(math, textord, \"\\u2201\", \"\\\\complement\", true);\ndefineSymbol(math, textord, \"\\u2571\", \"\\\\diagup\");\ndefineSymbol(math, textord, \"\\u2572\", \"\\\\diagdown\");\ndefineSymbol(math, textord, \"\\u25a1\", \"\\\\square\");\ndefineSymbol(math, textord, \"\\u25a1\", \"\\\\Box\");\ndefineSymbol(math, textord, \"\\u25ca\", \"\\\\Diamond\");\n// unicode-math maps U+A5 to \\mathyen. We map to AMS function \\yen\ndefineSymbol(math, textord, \"\\u00a5\", \"\\\\yen\", true);\ndefineSymbol(text, textord, \"\\u00a5\", \"\\\\yen\", true);\ndefineSymbol(math, textord, \"\\u2713\", \"\\\\checkmark\", true);\ndefineSymbol(text, textord, \"\\u2713\", \"\\\\checkmark\");\ndefineSymbol(math, textord, \"\\u2717\", \"\\\\ballotx\", true);\ndefineSymbol(text, textord, \"\\u2717\", \"\\\\ballotx\");\ndefineSymbol(text, textord, \"\\u2022\", \"\\\\textbullet\");\n\n// AMS Hebrew\ndefineSymbol(math, textord, \"\\u2136\", \"\\\\beth\", true);\ndefineSymbol(math, textord, \"\\u2138\", \"\\\\daleth\", true);\ndefineSymbol(math, textord, \"\\u2137\", \"\\\\gimel\", true);\n\n// AMS Greek\ndefineSymbol(math, textord, \"\\u03dd\", \"\\\\digamma\", true);\ndefineSymbol(math, textord, \"\\u03f0\", \"\\\\varkappa\");\n\n// AMS Delimiters\ndefineSymbol(math, open, \"\\u231C\", \"\\\\ulcorner\", true);\ndefineSymbol(math, close, \"\\u231D\", \"\\\\urcorner\", true);\ndefineSymbol(math, open, \"\\u231E\", \"\\\\llcorner\", true);\ndefineSymbol(math, close, \"\\u231F\", \"\\\\lrcorner\", true);\n\n// AMS Binary Relations\ndefineSymbol(math, rel, \"\\u2266\", \"\\\\leqq\", true);\ndefineSymbol(math, rel, \"\\u2a7d\", \"\\\\leqslant\", true);\ndefineSymbol(math, rel, \"\\u2a95\", \"\\\\eqslantless\", true);\ndefineSymbol(math, rel, \"\\u2272\", \"\\\\lesssim\", true);\ndefineSymbol(math, rel, \"\\u2a85\", \"\\\\lessapprox\", true);\ndefineSymbol(math, rel, \"\\u224a\", \"\\\\approxeq\", true);\ndefineSymbol(math, bin, \"\\u22d6\", \"\\\\lessdot\");\ndefineSymbol(math, rel, \"\\u22d8\", \"\\\\lll\", true);\ndefineSymbol(math, rel, \"\\u2276\", \"\\\\lessgtr\", true);\ndefineSymbol(math, rel, \"\\u22da\", \"\\\\lesseqgtr\", true);\ndefineSymbol(math, rel, \"\\u2a8b\", \"\\\\lesseqqgtr\", true);\ndefineSymbol(math, rel, \"\\u2251\", \"\\\\doteqdot\");\ndefineSymbol(math, rel, \"\\u2253\", \"\\\\risingdotseq\", true);\ndefineSymbol(math, rel, \"\\u2252\", \"\\\\fallingdotseq\", true);\ndefineSymbol(math, rel, \"\\u223d\", \"\\\\backsim\", true);\ndefineSymbol(math, rel, \"\\u22cd\", \"\\\\backsimeq\", true);\ndefineSymbol(math, rel, \"\\u2ac5\", \"\\\\subseteqq\", true);\ndefineSymbol(math, rel, \"\\u22d0\", \"\\\\Subset\", true);\ndefineSymbol(math, rel, \"\\u228f\", \"\\\\sqsubset\", true);\ndefineSymbol(math, rel, \"\\u227c\", \"\\\\preccurlyeq\", true);\ndefineSymbol(math, rel, \"\\u22de\", \"\\\\curlyeqprec\", true);\ndefineSymbol(math, rel, \"\\u227e\", \"\\\\precsim\", true);\ndefineSymbol(math, rel, \"\\u2ab7\", \"\\\\precapprox\", true);\ndefineSymbol(math, rel, \"\\u22b2\", \"\\\\vartriangleleft\");\ndefineSymbol(math, rel, \"\\u22b4\", \"\\\\trianglelefteq\");\ndefineSymbol(math, rel, \"\\u22a8\", \"\\\\vDash\", true);\ndefineSymbol(math, rel, \"\\u22ab\", \"\\\\VDash\", true);\ndefineSymbol(math, rel, \"\\u22aa\", \"\\\\Vvdash\", true);\ndefineSymbol(math, rel, \"\\u2323\", \"\\\\smallsmile\");\ndefineSymbol(math, rel, \"\\u2322\", \"\\\\smallfrown\");\ndefineSymbol(math, rel, \"\\u224f\", \"\\\\bumpeq\", true);\ndefineSymbol(math, rel, \"\\u224e\", \"\\\\Bumpeq\", true);\ndefineSymbol(math, rel, \"\\u2267\", \"\\\\geqq\", true);\ndefineSymbol(math, rel, \"\\u2a7e\", \"\\\\geqslant\", true);\ndefineSymbol(math, rel, \"\\u2a96\", \"\\\\eqslantgtr\", true);\ndefineSymbol(math, rel, \"\\u2273\", \"\\\\gtrsim\", true);\ndefineSymbol(math, rel, \"\\u2a86\", \"\\\\gtrapprox\", true);\ndefineSymbol(math, bin, \"\\u22d7\", \"\\\\gtrdot\");\ndefineSymbol(math, rel, \"\\u22d9\", \"\\\\ggg\", true);\ndefineSymbol(math, rel, \"\\u2277\", \"\\\\gtrless\", true);\ndefineSymbol(math, rel, \"\\u22db\", \"\\\\gtreqless\", true);\ndefineSymbol(math, rel, \"\\u2a8c\", \"\\\\gtreqqless\", true);\ndefineSymbol(math, rel, \"\\u2256\", \"\\\\eqcirc\", true);\ndefineSymbol(math, rel, \"\\u2257\", \"\\\\circeq\", true);\ndefineSymbol(math, rel, \"\\u225c\", \"\\\\triangleq\", true);\ndefineSymbol(math, rel, \"\\u223c\", \"\\\\thicksim\");\ndefineSymbol(math, rel, \"\\u2248\", \"\\\\thickapprox\");\ndefineSymbol(math, rel, \"\\u2ac6\", \"\\\\supseteqq\", true);\ndefineSymbol(math, rel, \"\\u22d1\", \"\\\\Supset\", true);\ndefineSymbol(math, rel, \"\\u2290\", \"\\\\sqsupset\", true);\ndefineSymbol(math, rel, \"\\u227d\", \"\\\\succcurlyeq\", true);\ndefineSymbol(math, rel, \"\\u22df\", \"\\\\curlyeqsucc\", true);\ndefineSymbol(math, rel, \"\\u227f\", \"\\\\succsim\", true);\ndefineSymbol(math, rel, \"\\u2ab8\", \"\\\\succapprox\", true);\ndefineSymbol(math, rel, \"\\u22b3\", \"\\\\vartriangleright\");\ndefineSymbol(math, rel, \"\\u22b5\", \"\\\\trianglerighteq\");\ndefineSymbol(math, rel, \"\\u22a9\", \"\\\\Vdash\", true);\ndefineSymbol(math, rel, \"\\u2223\", \"\\\\shortmid\");\ndefineSymbol(math, rel, \"\\u2225\", \"\\\\shortparallel\");\ndefineSymbol(math, rel, \"\\u226c\", \"\\\\between\", true);\ndefineSymbol(math, rel, \"\\u22d4\", \"\\\\pitchfork\", true);\ndefineSymbol(math, rel, \"\\u221d\", \"\\\\varpropto\");\ndefineSymbol(math, rel, \"\\u25c0\", \"\\\\blacktriangleleft\");\n// unicode-math says that \\therefore is a mathord atom.\n// We kept the amssymb atom type, which is rel.\ndefineSymbol(math, rel, \"\\u2234\", \"\\\\therefore\", true);\ndefineSymbol(math, rel, \"\\u220d\", \"\\\\backepsilon\");\ndefineSymbol(math, rel, \"\\u25b6\", \"\\\\blacktriangleright\");\n// unicode-math says that \\because is a mathord atom.\n// We kept the amssymb atom type, which is rel.\ndefineSymbol(math, rel, \"\\u2235\", \"\\\\because\", true);\ndefineSymbol(math, rel, \"\\u22d8\", \"\\\\llless\");\ndefineSymbol(math, rel, \"\\u22d9\", \"\\\\gggtr\");\ndefineSymbol(math, bin, \"\\u22b2\", \"\\\\lhd\");\ndefineSymbol(math, bin, \"\\u22b3\", \"\\\\rhd\");\ndefineSymbol(math, rel, \"\\u2242\", \"\\\\eqsim\", true);\ndefineSymbol(math, rel, \"\\u2251\", \"\\\\Doteq\", true);\ndefineSymbol(math, rel, \"\\u297d\", \"\\\\strictif\", true);\ndefineSymbol(math, rel, \"\\u297c\", \"\\\\strictfi\", true);\n\n// AMS Binary Operators\ndefineSymbol(math, bin, \"\\u2214\", \"\\\\dotplus\", true);\ndefineSymbol(math, bin, \"\\u2216\", \"\\\\smallsetminus\");\ndefineSymbol(math, bin, \"\\u22d2\", \"\\\\Cap\", true);\ndefineSymbol(math, bin, \"\\u22d3\", \"\\\\Cup\", true);\ndefineSymbol(math, bin, \"\\u2a5e\", \"\\\\doublebarwedge\", true);\ndefineSymbol(math, bin, \"\\u229f\", \"\\\\boxminus\", true);\ndefineSymbol(math, bin, \"\\u229e\", \"\\\\boxplus\", true);\ndefineSymbol(math, bin, \"\\u29C4\", \"\\\\boxslash\", true);\ndefineSymbol(math, bin, \"\\u22c7\", \"\\\\divideontimes\", true);\ndefineSymbol(math, bin, \"\\u22c9\", \"\\\\ltimes\", true);\ndefineSymbol(math, bin, \"\\u22ca\", \"\\\\rtimes\", true);\ndefineSymbol(math, bin, \"\\u22cb\", \"\\\\leftthreetimes\", true);\ndefineSymbol(math, bin, \"\\u22cc\", \"\\\\rightthreetimes\", true);\ndefineSymbol(math, bin, \"\\u22cf\", \"\\\\curlywedge\", true);\ndefineSymbol(math, bin, \"\\u22ce\", \"\\\\curlyvee\", true);\ndefineSymbol(math, bin, \"\\u229d\", \"\\\\circleddash\", true);\ndefineSymbol(math, bin, \"\\u229b\", \"\\\\circledast\", true);\ndefineSymbol(math, bin, \"\\u22ba\", \"\\\\intercal\", true);\ndefineSymbol(math, bin, \"\\u22d2\", \"\\\\doublecap\");\ndefineSymbol(math, bin, \"\\u22d3\", \"\\\\doublecup\");\ndefineSymbol(math, bin, \"\\u22a0\", \"\\\\boxtimes\", true);\ndefineSymbol(math, bin, \"\\u22c8\", \"\\\\bowtie\", true);\ndefineSymbol(math, bin, \"\\u22c8\", \"\\\\Join\");\ndefineSymbol(math, bin, \"\\u27d5\", \"\\\\leftouterjoin\", true);\ndefineSymbol(math, bin, \"\\u27d6\", \"\\\\rightouterjoin\", true);\ndefineSymbol(math, bin, \"\\u27d7\", \"\\\\fullouterjoin\", true);\n\n// stix Binary Operators\ndefineSymbol(math, bin, \"\\u2238\", \"\\\\dotminus\", true);\ndefineSymbol(math, bin, \"\\u27D1\", \"\\\\wedgedot\", true);\ndefineSymbol(math, bin, \"\\u27C7\", \"\\\\veedot\", true);\ndefineSymbol(math, bin, \"\\u2A62\", \"\\\\doublebarvee\", true);\ndefineSymbol(math, bin, \"\\u2A63\", \"\\\\veedoublebar\", true);\ndefineSymbol(math, bin, \"\\u2A5F\", \"\\\\wedgebar\", true);\ndefineSymbol(math, bin, \"\\u2A60\", \"\\\\wedgedoublebar\", true);\ndefineSymbol(math, bin, \"\\u2A54\", \"\\\\Vee\", true);\ndefineSymbol(math, bin, \"\\u2A53\", \"\\\\Wedge\", true);\ndefineSymbol(math, bin, \"\\u2A43\", \"\\\\barcap\", true);\ndefineSymbol(math, bin, \"\\u2A42\", \"\\\\barcup\", true);\ndefineSymbol(math, bin, \"\\u2A48\", \"\\\\capbarcup\", true);\ndefineSymbol(math, bin, \"\\u2A40\", \"\\\\capdot\", true);\ndefineSymbol(math, bin, \"\\u2A47\", \"\\\\capovercup\", true);\ndefineSymbol(math, bin, \"\\u2A46\", \"\\\\cupovercap\", true);\ndefineSymbol(math, bin, \"\\u2A4D\", \"\\\\closedvarcap\", true);\ndefineSymbol(math, bin, \"\\u2A4C\", \"\\\\closedvarcup\", true);\ndefineSymbol(math, bin, \"\\u2A2A\", \"\\\\minusdot\", true);\ndefineSymbol(math, bin, \"\\u2A2B\", \"\\\\minusfdots\", true);\ndefineSymbol(math, bin, \"\\u2A2C\", \"\\\\minusrdots\", true);\ndefineSymbol(math, bin, \"\\u22BB\", \"\\\\Xor\", true);\ndefineSymbol(math, bin, \"\\u22BC\", \"\\\\Nand\", true);\ndefineSymbol(math, bin, \"\\u22BD\", \"\\\\Nor\", true);\ndefineSymbol(math, bin, \"\\u22BD\", \"\\\\barvee\");\ndefineSymbol(math, bin, \"\\u2AF4\", \"\\\\interleave\", true);\ndefineSymbol(math, bin, \"\\u29E2\", \"\\\\shuffle\", true);\ndefineSymbol(math, bin, \"\\u2AF6\", \"\\\\threedotcolon\", true);\ndefineSymbol(math, bin, \"\\u2982\", \"\\\\typecolon\", true);\ndefineSymbol(math, bin, \"\\u223E\", \"\\\\invlazys\", true);\ndefineSymbol(math, bin, \"\\u2A4B\", \"\\\\twocaps\", true);\ndefineSymbol(math, bin, \"\\u2A4A\", \"\\\\twocups\", true);\ndefineSymbol(math, bin, \"\\u2A4E\", \"\\\\Sqcap\", true);\ndefineSymbol(math, bin, \"\\u2A4F\", \"\\\\Sqcup\", true);\ndefineSymbol(math, bin, \"\\u2A56\", \"\\\\veeonvee\", true);\ndefineSymbol(math, bin, \"\\u2A55\", \"\\\\wedgeonwedge\", true);\ndefineSymbol(math, bin, \"\\u29D7\", \"\\\\blackhourglass\", true);\ndefineSymbol(math, bin, \"\\u29C6\", \"\\\\boxast\", true);\ndefineSymbol(math, bin, \"\\u29C8\", \"\\\\boxbox\", true);\ndefineSymbol(math, bin, \"\\u29C7\", \"\\\\boxcircle\", true);\ndefineSymbol(math, bin, \"\\u229C\", \"\\\\circledequal\", true);\ndefineSymbol(math, bin, \"\\u29B7\", \"\\\\circledparallel\", true);\ndefineSymbol(math, bin, \"\\u29B6\", \"\\\\circledvert\", true);\ndefineSymbol(math, bin, \"\\u29B5\", \"\\\\circlehbar\", true);\ndefineSymbol(math, bin, \"\\u27E1\", \"\\\\concavediamond\", true);\ndefineSymbol(math, bin, \"\\u27E2\", \"\\\\concavediamondtickleft\", true);\ndefineSymbol(math, bin, \"\\u27E3\", \"\\\\concavediamondtickright\", true);\ndefineSymbol(math, bin, \"\\u22C4\", \"\\\\diamond\", true);\ndefineSymbol(math, bin, \"\\u29D6\", \"\\\\hourglass\", true);\ndefineSymbol(math, bin, \"\\u27E0\", \"\\\\lozengeminus\", true);\ndefineSymbol(math, bin, \"\\u233D\", \"\\\\obar\", true);\ndefineSymbol(math, bin, \"\\u29B8\", \"\\\\obslash\", true);\ndefineSymbol(math, bin, \"\\u2A38\", \"\\\\odiv\", true);\ndefineSymbol(math, bin, \"\\u29C1\", \"\\\\ogreaterthan\", true);\ndefineSymbol(math, bin, \"\\u29C0\", \"\\\\olessthan\", true);\ndefineSymbol(math, bin, \"\\u29B9\", \"\\\\operp\", true);\ndefineSymbol(math, bin, \"\\u2A37\", \"\\\\Otimes\", true);\ndefineSymbol(math, bin, \"\\u2A36\", \"\\\\otimeshat\", true);\ndefineSymbol(math, bin, \"\\u22C6\", \"\\\\star\", true);\ndefineSymbol(math, bin, \"\\u25B3\", \"\\\\triangle\", true);\ndefineSymbol(math, bin, \"\\u2A3A\", \"\\\\triangleminus\", true);\ndefineSymbol(math, bin, \"\\u2A39\", \"\\\\triangleplus\", true);\ndefineSymbol(math, bin, \"\\u2A3B\", \"\\\\triangletimes\", true);\ndefineSymbol(math, bin, \"\\u27E4\", \"\\\\whitesquaretickleft\", true);\ndefineSymbol(math, bin, \"\\u27E5\", \"\\\\whitesquaretickright\", true);\ndefineSymbol(math, bin, \"\\u2A33\", \"\\\\smashtimes\", true);\n\n// AMS Arrows\n// Note: unicode-math maps \\u21e2 to their own function \\rightdasharrow.\n// We'll map it to AMS function \\dashrightarrow. It produces the same atom.\ndefineSymbol(math, rel, \"\\u21e2\", \"\\\\dashrightarrow\", true);\n// unicode-math maps \\u21e0 to \\leftdasharrow. We'll use the AMS synonym.\ndefineSymbol(math, rel, \"\\u21e0\", \"\\\\dashleftarrow\", true);\ndefineSymbol(math, rel, \"\\u21c7\", \"\\\\leftleftarrows\", true);\ndefineSymbol(math, rel, \"\\u21c6\", \"\\\\leftrightarrows\", true);\ndefineSymbol(math, rel, \"\\u21da\", \"\\\\Lleftarrow\", true);\ndefineSymbol(math, rel, \"\\u219e\", \"\\\\twoheadleftarrow\", true);\ndefineSymbol(math, rel, \"\\u21a2\", \"\\\\leftarrowtail\", true);\ndefineSymbol(math, rel, \"\\u21ab\", \"\\\\looparrowleft\", true);\ndefineSymbol(math, rel, \"\\u21cb\", \"\\\\leftrightharpoons\", true);\ndefineSymbol(math, rel, \"\\u21b6\", \"\\\\curvearrowleft\", true);\n// unicode-math maps \\u21ba to \\acwopencirclearrow. We'll use the AMS synonym.\ndefineSymbol(math, rel, \"\\u21ba\", \"\\\\circlearrowleft\", true);\ndefineSymbol(math, rel, \"\\u21b0\", \"\\\\Lsh\", true);\ndefineSymbol(math, rel, \"\\u21c8\", \"\\\\upuparrows\", true);\ndefineSymbol(math, rel, \"\\u21bf\", \"\\\\upharpoonleft\", true);\ndefineSymbol(math, rel, \"\\u21c3\", \"\\\\downharpoonleft\", true);\ndefineSymbol(math, rel, \"\\u22b6\", \"\\\\origof\", true);\ndefineSymbol(math, rel, \"\\u22b7\", \"\\\\imageof\", true);\ndefineSymbol(math, rel, \"\\u22b8\", \"\\\\multimap\", true);\ndefineSymbol(math, rel, \"\\u21ad\", \"\\\\leftrightsquigarrow\", true);\ndefineSymbol(math, rel, \"\\u21c9\", \"\\\\rightrightarrows\", true);\ndefineSymbol(math, rel, \"\\u21c4\", \"\\\\rightleftarrows\", true);\ndefineSymbol(math, rel, \"\\u21a0\", \"\\\\twoheadrightarrow\", true);\ndefineSymbol(math, rel, \"\\u21a3\", \"\\\\rightarrowtail\", true);\ndefineSymbol(math, rel, \"\\u21ac\", \"\\\\looparrowright\", true);\ndefineSymbol(math, rel, \"\\u21b7\", \"\\\\curvearrowright\", true);\n// unicode-math maps \\u21bb to \\cwopencirclearrow. We'll use the AMS synonym.\ndefineSymbol(math, rel, \"\\u21bb\", \"\\\\circlearrowright\", true);\ndefineSymbol(math, rel, \"\\u21b1\", \"\\\\Rsh\", true);\ndefineSymbol(math, rel, \"\\u21ca\", \"\\\\downdownarrows\", true);\ndefineSymbol(math, rel, \"\\u21be\", \"\\\\upharpoonright\", true);\ndefineSymbol(math, rel, \"\\u21c2\", \"\\\\downharpoonright\", true);\ndefineSymbol(math, rel, \"\\u21dd\", \"\\\\rightsquigarrow\", true);\ndefineSymbol(math, rel, \"\\u21dd\", \"\\\\leadsto\");\ndefineSymbol(math, rel, \"\\u21db\", \"\\\\Rrightarrow\", true);\ndefineSymbol(math, rel, \"\\u21be\", \"\\\\restriction\");\n\ndefineSymbol(math, textord, \"\\u2018\", \"`\");\ndefineSymbol(math, textord, \"$\", \"\\\\$\");\ndefineSymbol(text, textord, \"$\", \"\\\\$\");\ndefineSymbol(text, textord, \"$\", \"\\\\textdollar\");\ndefineSymbol(math, textord, \"¢\", \"\\\\cent\");\ndefineSymbol(text, textord, \"¢\", \"\\\\cent\");\ndefineSymbol(math, textord, \"%\", \"\\\\%\");\ndefineSymbol(text, textord, \"%\", \"\\\\%\");\ndefineSymbol(math, textord, \"_\", \"\\\\_\");\ndefineSymbol(text, textord, \"_\", \"\\\\_\");\ndefineSymbol(text, textord, \"_\", \"\\\\textunderscore\");\ndefineSymbol(text, textord, \"\\u2423\", \"\\\\textvisiblespace\", true);\ndefineSymbol(math, textord, \"\\u2220\", \"\\\\angle\", true);\ndefineSymbol(math, textord, \"\\u221e\", \"\\\\infty\", true);\ndefineSymbol(math, textord, \"\\u2032\", \"\\\\prime\");\ndefineSymbol(math, textord, \"\\u2033\", \"\\\\dprime\");\ndefineSymbol(math, textord, \"\\u2034\", \"\\\\trprime\");\ndefineSymbol(math, textord, \"\\u2057\", \"\\\\qprime\");\ndefineSymbol(math, textord, \"\\u25b3\", \"\\\\triangle\");\ndefineSymbol(text, textord, \"\\u0391\", \"\\\\Alpha\", true);\ndefineSymbol(text, textord, \"\\u0392\", \"\\\\Beta\", true);\ndefineSymbol(text, textord, \"\\u0393\", \"\\\\Gamma\", true);\ndefineSymbol(text, textord, \"\\u0394\", \"\\\\Delta\", true);\ndefineSymbol(text, textord, \"\\u0395\", \"\\\\Epsilon\", true);\ndefineSymbol(text, textord, \"\\u0396\", \"\\\\Zeta\", true);\ndefineSymbol(text, textord, \"\\u0397\", \"\\\\Eta\", true);\ndefineSymbol(text, textord, \"\\u0398\", \"\\\\Theta\", true);\ndefineSymbol(text, textord, \"\\u0399\", \"\\\\Iota\", true);\ndefineSymbol(text, textord, \"\\u039a\", \"\\\\Kappa\", true);\ndefineSymbol(text, textord, \"\\u039b\", \"\\\\Lambda\", true);\ndefineSymbol(text, textord, \"\\u039c\", \"\\\\Mu\", true);\ndefineSymbol(text, textord, \"\\u039d\", \"\\\\Nu\", true);\ndefineSymbol(text, textord, \"\\u039e\", \"\\\\Xi\", true);\ndefineSymbol(text, textord, \"\\u039f\", \"\\\\Omicron\", true);\ndefineSymbol(text, textord, \"\\u03a0\", \"\\\\Pi\", true);\ndefineSymbol(text, textord, \"\\u03a1\", \"\\\\Rho\", true);\ndefineSymbol(text, textord, \"\\u03a3\", \"\\\\Sigma\", true);\ndefineSymbol(text, textord, \"\\u03a4\", \"\\\\Tau\", true);\ndefineSymbol(text, textord, \"\\u03a5\", \"\\\\Upsilon\", true);\ndefineSymbol(text, textord, \"\\u03a6\", \"\\\\Phi\", true);\ndefineSymbol(text, textord, \"\\u03a7\", \"\\\\Chi\", true);\ndefineSymbol(text, textord, \"\\u03a8\", \"\\\\Psi\", true);\ndefineSymbol(text, textord, \"\\u03a9\", \"\\\\Omega\", true);\ndefineSymbol(math, mathord, \"\\u0391\", \"\\\\Alpha\", true);\ndefineSymbol(math, mathord, \"\\u0392\", \"\\\\Beta\", true);\ndefineSymbol(math, mathord, \"\\u0393\", \"\\\\Gamma\", true);\ndefineSymbol(math, mathord, \"\\u0394\", \"\\\\Delta\", true);\ndefineSymbol(math, mathord, \"\\u0395\", \"\\\\Epsilon\", true);\ndefineSymbol(math, mathord, \"\\u0396\", \"\\\\Zeta\", true);\ndefineSymbol(math, mathord, \"\\u0397\", \"\\\\Eta\", true);\ndefineSymbol(math, mathord, \"\\u0398\", \"\\\\Theta\", true);\ndefineSymbol(math, mathord, \"\\u0399\", \"\\\\Iota\", true);\ndefineSymbol(math, mathord, \"\\u039a\", \"\\\\Kappa\", true);\ndefineSymbol(math, mathord, \"\\u039b\", \"\\\\Lambda\", true);\ndefineSymbol(math, mathord, \"\\u039c\", \"\\\\Mu\", true);\ndefineSymbol(math, mathord, \"\\u039d\", \"\\\\Nu\", true);\ndefineSymbol(math, mathord, \"\\u039e\", \"\\\\Xi\", true);\ndefineSymbol(math, mathord, \"\\u039f\", \"\\\\Omicron\", true);\ndefineSymbol(math, mathord, \"\\u03a0\", \"\\\\Pi\", true);\ndefineSymbol(math, mathord, \"\\u03a1\", \"\\\\Rho\", true);\ndefineSymbol(math, mathord, \"\\u03a3\", \"\\\\Sigma\", true);\ndefineSymbol(math, mathord, \"\\u03a4\", \"\\\\Tau\", true);\ndefineSymbol(math, mathord, \"\\u03a5\", \"\\\\Upsilon\", true);\ndefineSymbol(math, mathord, \"\\u03a6\", \"\\\\Phi\", true);\ndefineSymbol(math, mathord, \"\\u03a7\", \"\\\\Chi\", true);\ndefineSymbol(math, mathord, \"\\u03a8\", \"\\\\Psi\", true);\ndefineSymbol(math, mathord, \"\\u03a9\", \"\\\\Omega\", true);\ndefineSymbol(math, open, \"\\u00ac\", \"\\\\neg\", true);\ndefineSymbol(math, open, \"\\u00ac\", \"\\\\lnot\");\ndefineSymbol(math, textord, \"\\u22a4\", \"\\\\top\");\ndefineSymbol(math, textord, \"\\u22a5\", \"\\\\bot\");\ndefineSymbol(math, textord, \"\\u2205\", \"\\\\emptyset\");\ndefineSymbol(math, textord, \"\\u2300\", \"\\\\varnothing\");\ndefineSymbol(math, mathord, \"\\u03b1\", \"\\\\alpha\", true);\ndefineSymbol(math, mathord, \"\\u03b2\", \"\\\\beta\", true);\ndefineSymbol(math, mathord, \"\\u03b3\", \"\\\\gamma\", true);\ndefineSymbol(math, mathord, \"\\u03b4\", \"\\\\delta\", true);\ndefineSymbol(math, mathord, \"\\u03f5\", \"\\\\epsilon\", true);\ndefineSymbol(math, mathord, \"\\u03b6\", \"\\\\zeta\", true);\ndefineSymbol(math, mathord, \"\\u03b7\", \"\\\\eta\", true);\ndefineSymbol(math, mathord, \"\\u03b8\", \"\\\\theta\", true);\ndefineSymbol(math, mathord, \"\\u03b9\", \"\\\\iota\", true);\ndefineSymbol(math, mathord, \"\\u03ba\", \"\\\\kappa\", true);\ndefineSymbol(math, mathord, \"\\u03bb\", \"\\\\lambda\", true);\ndefineSymbol(math, mathord, \"\\u03bc\", \"\\\\mu\", true);\ndefineSymbol(math, mathord, \"\\u03bd\", \"\\\\nu\", true);\ndefineSymbol(math, mathord, \"\\u03be\", \"\\\\xi\", true);\ndefineSymbol(math, mathord, \"\\u03bf\", \"\\\\omicron\", true);\ndefineSymbol(math, mathord, \"\\u03c0\", \"\\\\pi\", true);\ndefineSymbol(math, mathord, \"\\u03c1\", \"\\\\rho\", true);\ndefineSymbol(math, mathord, \"\\u03c3\", \"\\\\sigma\", true);\ndefineSymbol(math, mathord, \"\\u03c4\", \"\\\\tau\", true);\ndefineSymbol(math, mathord, \"\\u03c5\", \"\\\\upsilon\", true);\ndefineSymbol(math, mathord, \"\\u03d5\", \"\\\\phi\", true);\ndefineSymbol(math, mathord, \"\\u03c7\", \"\\\\chi\", true);\ndefineSymbol(math, mathord, \"\\u03c8\", \"\\\\psi\", true);\ndefineSymbol(math, mathord, \"\\u03c9\", \"\\\\omega\", true);\ndefineSymbol(math, mathord, \"\\u03b5\", \"\\\\varepsilon\", true);\ndefineSymbol(math, mathord, \"\\u03d1\", \"\\\\vartheta\", true);\ndefineSymbol(math, mathord, \"\\u03d6\", \"\\\\varpi\", true);\ndefineSymbol(math, mathord, \"\\u03f1\", \"\\\\varrho\", true);\ndefineSymbol(math, mathord, \"\\u03c2\", \"\\\\varsigma\", true);\ndefineSymbol(math, mathord, \"\\u03c6\", \"\\\\varphi\", true);\ndefineSymbol(math, mathord, \"\\u03d8\", \"\\\\Coppa\", true);\ndefineSymbol(math, mathord, \"\\u03d9\", \"\\\\coppa\", true);\ndefineSymbol(math, mathord, \"\\u03d9\", \"\\\\varcoppa\", true);\ndefineSymbol(math, mathord, \"\\u03de\", \"\\\\Koppa\", true);\ndefineSymbol(math, mathord, \"\\u03df\", \"\\\\koppa\", true);\ndefineSymbol(math, mathord, \"\\u03e0\", \"\\\\Sampi\", true);\ndefineSymbol(math, mathord, \"\\u03e1\", \"\\\\sampi\", true);\ndefineSymbol(math, mathord, \"\\u03da\", \"\\\\Stigma\", true);\ndefineSymbol(math, mathord, \"\\u03db\", \"\\\\stigma\", true);\ndefineSymbol(math, mathord, \"\\u2aeb\", \"\\\\Bot\");\n\n// unicode-math maps U+F0 to \\matheth. We map to AMS function \\eth\ndefineSymbol(math, textord, \"\\u00f0\", \"\\\\eth\", true); // ð\ndefineSymbol(text, textord, \"\\u00f0\", \"\\u00f0\");\n// Extended ASCII and non-ASCII Letters\ndefineSymbol(math, textord, \"\\u00C5\", \"\\\\AA\"); // Å\ndefineSymbol(text, textord, \"\\u00C5\", \"\\\\AA\", true);\ndefineSymbol(math, textord, \"\\u00C6\", \"\\\\AE\", true); // Æ\ndefineSymbol(text, textord, \"\\u00C6\", \"\\\\AE\", true);\ndefineSymbol(math, textord, \"\\u00D0\", \"\\\\DH\", true); // Ð\ndefineSymbol(text, textord, \"\\u00D0\", \"\\\\DH\", true);\ndefineSymbol(math, textord, \"\\u00DE\", \"\\\\TH\", true); // Þ\ndefineSymbol(text, textord, \"\\u00DE\", \"\\\\TH\", true);\ndefineSymbol(math, textord, \"\\u00DF\", \"\\\\ss\", true); // ß\ndefineSymbol(text, textord, \"\\u00DF\", \"\\\\ss\", true);\ndefineSymbol(math, textord, \"\\u00E5\", \"\\\\aa\"); // å\ndefineSymbol(text, textord, \"\\u00E5\", \"\\\\aa\", true);\ndefineSymbol(math, textord, \"\\u00E6\", \"\\\\ae\", true); // æ\ndefineSymbol(text, textord, \"\\u00E6\", \"\\\\ae\", true);\ndefineSymbol(math, textord, \"\\u00F0\", \"\\\\dh\"); // ð\ndefineSymbol(text, textord, \"\\u00F0\", \"\\\\dh\", true);\ndefineSymbol(math, textord, \"\\u00FE\", \"\\\\th\", true); // þ\ndefineSymbol(text, textord, \"\\u00FE\", \"\\\\th\", true);\ndefineSymbol(math, textord, \"\\u0110\", \"\\\\DJ\", true); // Đ\ndefineSymbol(text, textord, \"\\u0110\", \"\\\\DJ\", true);\ndefineSymbol(math, textord, \"\\u0111\", \"\\\\dj\", true); // đ\ndefineSymbol(text, textord, \"\\u0111\", \"\\\\dj\", true);\ndefineSymbol(math, textord, \"\\u0141\", \"\\\\L\", true); // Ł\ndefineSymbol(text, textord, \"\\u0141\", \"\\\\L\", true);\ndefineSymbol(math, textord, \"\\u0141\", \"\\\\l\", true); // ł\ndefineSymbol(text, textord, \"\\u0141\", \"\\\\l\", true);\ndefineSymbol(math, textord, \"\\u014A\", \"\\\\NG\", true); // Ŋ\ndefineSymbol(text, textord, \"\\u014A\", \"\\\\NG\", true);\ndefineSymbol(math, textord, \"\\u014B\", \"\\\\ng\", true); // ŋ\ndefineSymbol(text, textord, \"\\u014B\", \"\\\\ng\", true);\ndefineSymbol(math, textord, \"\\u0152\", \"\\\\OE\", true); // Œ\ndefineSymbol(text, textord, \"\\u0152\", \"\\\\OE\", true);\ndefineSymbol(math, textord, \"\\u0153\", \"\\\\oe\", true); // œ\ndefineSymbol(text, textord, \"\\u0153\", \"\\\\oe\", true);\n\ndefineSymbol(math, bin, \"\\u2217\", \"\\u2217\", true);\ndefineSymbol(math, bin, \"+\", \"+\");\ndefineSymbol(math, bin, \"\\u2217\", \"*\");\ndefineSymbol(math, bin, \"\\u2044\", \"/\", true);\ndefineSymbol(math, bin, \"\\u2044\", \"\\u2044\");\ndefineSymbol(math, bin, \"\\u2212\", \"-\", true);\ndefineSymbol(math, bin, \"\\u22c5\", \"\\\\cdot\", true);\ndefineSymbol(math, bin, \"\\u2218\", \"\\\\circ\", true);\ndefineSymbol(math, bin, \"\\u00f7\", \"\\\\div\", true);\ndefineSymbol(math, bin, \"\\u00b1\", \"\\\\pm\", true);\ndefineSymbol(math, bin, \"\\u00d7\", \"\\\\times\", true);\ndefineSymbol(math, bin, \"\\u2229\", \"\\\\cap\", true);\ndefineSymbol(math, bin, \"\\u222a\", \"\\\\cup\", true);\ndefineSymbol(math, bin, \"\\u2216\", \"\\\\setminus\", true);\ndefineSymbol(math, bin, \"\\u2227\", \"\\\\land\");\ndefineSymbol(math, bin, \"\\u2228\", \"\\\\lor\");\ndefineSymbol(math, bin, \"\\u2227\", \"\\\\wedge\", true);\ndefineSymbol(math, bin, \"\\u2228\", \"\\\\vee\", true);\ndefineSymbol(math, open, \"\\u27e6\", \"\\\\llbracket\", true); // stmaryrd/semantic packages\ndefineSymbol(math, close, \"\\u27e7\", \"\\\\rrbracket\", true);\ndefineSymbol(math, open, \"\\u27e8\", \"\\\\langle\", true);\ndefineSymbol(math, open, \"\\u27ea\", \"\\\\lAngle\", true);\ndefineSymbol(math, open, \"\\u2989\", \"\\\\llangle\", true);\ndefineSymbol(math, open, \"|\", \"\\\\lvert\");\ndefineSymbol(math, open, \"\\u2016\", \"\\\\lVert\", true);\ndefineSymbol(math, textord, \"!\", \"\\\\oc\"); // cmll package\ndefineSymbol(math, textord, \"?\", \"\\\\wn\");\ndefineSymbol(math, textord, \"\\u2193\", \"\\\\shpos\");\ndefineSymbol(math, textord, \"\\u2195\", \"\\\\shift\");\ndefineSymbol(math, textord, \"\\u2191\", \"\\\\shneg\");\ndefineSymbol(math, close, \"?\", \"?\");\ndefineSymbol(math, close, \"!\", \"!\");\ndefineSymbol(math, close, \"‼\", \"‼\");\ndefineSymbol(math, close, \"\\u27e9\", \"\\\\rangle\", true);\ndefineSymbol(math, close, \"\\u27eb\", \"\\\\rAngle\", true);\ndefineSymbol(math, close, \"\\u298a\", \"\\\\rrangle\", true);\ndefineSymbol(math, close, \"|\", \"\\\\rvert\");\ndefineSymbol(math, close, \"\\u2016\", \"\\\\rVert\");\ndefineSymbol(math, open, \"\\u2983\", \"\\\\lBrace\", true); // stmaryrd/semantic packages\ndefineSymbol(math, close, \"\\u2984\", \"\\\\rBrace\", true);\ndefineSymbol(math, rel, \"=\", \"\\\\equal\", true);\ndefineSymbol(math, rel, \":\", \":\");\ndefineSymbol(math, rel, \"\\u2248\", \"\\\\approx\", true);\ndefineSymbol(math, rel, \"\\u2245\", \"\\\\cong\", true);\ndefineSymbol(math, rel, \"\\u2265\", \"\\\\ge\");\ndefineSymbol(math, rel, \"\\u2265\", \"\\\\geq\", true);\ndefineSymbol(math, rel, \"\\u2190\", \"\\\\gets\");\ndefineSymbol(math, rel, \">\", \"\\\\gt\", true);\ndefineSymbol(math, rel, \"\\u2208\", \"\\\\in\", true);\ndefineSymbol(math, rel, \"\\u2209\", \"\\\\notin\", true);\ndefineSymbol(math, rel, \"\\ue020\", \"\\\\@not\");\ndefineSymbol(math, rel, \"\\u2282\", \"\\\\subset\", true);\ndefineSymbol(math, rel, \"\\u2283\", \"\\\\supset\", true);\ndefineSymbol(math, rel, \"\\u2286\", \"\\\\subseteq\", true);\ndefineSymbol(math, rel, \"\\u2287\", \"\\\\supseteq\", true);\ndefineSymbol(math, rel, \"\\u2288\", \"\\\\nsubseteq\", true);\ndefineSymbol(math, rel, \"\\u2288\", \"\\\\nsubseteqq\");\ndefineSymbol(math, rel, \"\\u2289\", \"\\\\nsupseteq\", true);\ndefineSymbol(math, rel, \"\\u2289\", \"\\\\nsupseteqq\");\ndefineSymbol(math, rel, \"\\u22a8\", \"\\\\models\");\ndefineSymbol(math, rel, \"\\u2190\", \"\\\\leftarrow\", true);\ndefineSymbol(math, rel, \"\\u2264\", \"\\\\le\");\ndefineSymbol(math, rel, \"\\u2264\", \"\\\\leq\", true);\ndefineSymbol(math, rel, \"<\", \"\\\\lt\", true);\ndefineSymbol(math, rel, \"\\u2192\", \"\\\\rightarrow\", true);\ndefineSymbol(math, rel, \"\\u2192\", \"\\\\to\");\ndefineSymbol(math, rel, \"\\u2271\", \"\\\\ngeq\", true);\ndefineSymbol(math, rel, \"\\u2271\", \"\\\\ngeqq\");\ndefineSymbol(math, rel, \"\\u2271\", \"\\\\ngeqslant\");\ndefineSymbol(math, rel, \"\\u2270\", \"\\\\nleq\", true);\ndefineSymbol(math, rel, \"\\u2270\", \"\\\\nleqq\");\ndefineSymbol(math, rel, \"\\u2270\", \"\\\\nleqslant\");\ndefineSymbol(math, rel, \"\\u2aeb\", \"\\\\Perp\", true); //cmll package\ndefineSymbol(math, spacing, \"\\u00a0\", \"\\\\ \");\ndefineSymbol(math, spacing, \"\\u00a0\", \"\\\\space\");\n// Ref: LaTeX Source 2e: \\DeclareRobustCommand{\\nobreakspace}{%\ndefineSymbol(math, spacing, \"\\u00a0\", \"\\\\nobreakspace\");\ndefineSymbol(text, spacing, \"\\u00a0\", \"\\\\ \");\ndefineSymbol(text, spacing, \"\\u00a0\", \" \");\ndefineSymbol(text, spacing, \"\\u00a0\", \"\\\\space\");\ndefineSymbol(text, spacing, \"\\u00a0\", \"\\\\nobreakspace\");\ndefineSymbol(math, spacing, null, \"\\\\nobreak\");\ndefineSymbol(math, spacing, null, \"\\\\allowbreak\");\ndefineSymbol(math, punct, \",\", \",\");\ndefineSymbol(text, punct, \":\", \":\");\ndefineSymbol(math, punct, \";\", \";\");\ndefineSymbol(math, bin, \"\\u22bc\", \"\\\\barwedge\");\ndefineSymbol(math, bin, \"\\u22bb\", \"\\\\veebar\");\ndefineSymbol(math, bin, \"\\u2299\", \"\\\\odot\", true);\n// Firefox turns ⊕ into an emoji. So append \\uFE0E. Define Unicode character in macros, not here.\ndefineSymbol(math, bin, \"\\u2295\\uFE0E\", \"\\\\oplus\");\ndefineSymbol(math, bin, \"\\u2297\", \"\\\\otimes\", true);\ndefineSymbol(math, textord, \"\\u2202\", \"\\\\partial\", true);\ndefineSymbol(math, bin, \"\\u2298\", \"\\\\oslash\", true);\ndefineSymbol(math, bin, \"\\u229a\", \"\\\\circledcirc\", true);\ndefineSymbol(math, bin, \"\\u22a1\", \"\\\\boxdot\", true);\ndefineSymbol(math, bin, \"\\u25b3\", \"\\\\bigtriangleup\");\ndefineSymbol(math, bin, \"\\u25bd\", \"\\\\bigtriangledown\");\ndefineSymbol(math, bin, \"\\u2020\", \"\\\\dagger\");\ndefineSymbol(math, bin, \"\\u22c4\", \"\\\\diamond\");\ndefineSymbol(math, bin, \"\\u25c3\", \"\\\\triangleleft\");\ndefineSymbol(math, bin, \"\\u25b9\", \"\\\\triangleright\");\ndefineSymbol(math, open, \"{\", \"\\\\{\");\ndefineSymbol(text, textord, \"{\", \"\\\\{\");\ndefineSymbol(text, textord, \"{\", \"\\\\textbraceleft\");\ndefineSymbol(math, close, \"}\", \"\\\\}\");\ndefineSymbol(text, textord, \"}\", \"\\\\}\");\ndefineSymbol(text, textord, \"}\", \"\\\\textbraceright\");\ndefineSymbol(math, open, \"{\", \"\\\\lbrace\");\ndefineSymbol(math, close, \"}\", \"\\\\rbrace\");\ndefineSymbol(math, open, \"[\", \"\\\\lbrack\", true);\ndefineSymbol(text, textord, \"[\", \"\\\\lbrack\", true);\ndefineSymbol(math, close, \"]\", \"\\\\rbrack\", true);\ndefineSymbol(text, textord, \"]\", \"\\\\rbrack\", true);\ndefineSymbol(math, open, \"(\", \"\\\\lparen\", true);\ndefineSymbol(math, close, \")\", \"\\\\rparen\", true);\ndefineSymbol(math, open, \"⦇\", \"\\\\llparenthesis\", true);\ndefineSymbol(math, close, \"⦈\", \"\\\\rrparenthesis\", true);\ndefineSymbol(text, textord, \"<\", \"\\\\textless\", true); // in T1 fontenc\ndefineSymbol(text, textord, \">\", \"\\\\textgreater\", true); // in T1 fontenc\ndefineSymbol(math, open, \"\\u230a\", \"\\\\lfloor\", true);\ndefineSymbol(math, close, \"\\u230b\", \"\\\\rfloor\", true);\ndefineSymbol(math, open, \"\\u2308\", \"\\\\lceil\", true);\ndefineSymbol(math, close, \"\\u2309\", \"\\\\rceil\", true);\ndefineSymbol(math, textord, \"\\\\\", \"\\\\backslash\");\ndefineSymbol(math, textord, \"|\", \"|\");\ndefineSymbol(math, textord, \"|\", \"\\\\vert\");\ndefineSymbol(text, textord, \"|\", \"\\\\textbar\", true); // in T1 fontenc\ndefineSymbol(math, textord, \"\\u2016\", \"\\\\|\");\ndefineSymbol(math, textord, \"\\u2016\", \"\\\\Vert\");\ndefineSymbol(text, textord, \"\\u2016\", \"\\\\textbardbl\");\ndefineSymbol(text, textord, \"~\", \"\\\\textasciitilde\");\ndefineSymbol(text, textord, \"\\\\\", \"\\\\textbackslash\");\ndefineSymbol(text, textord, \"^\", \"\\\\textasciicircum\");\ndefineSymbol(math, rel, \"\\u2191\", \"\\\\uparrow\", true);\ndefineSymbol(math, rel, \"\\u21d1\", \"\\\\Uparrow\", true);\ndefineSymbol(math, rel, \"\\u2193\", \"\\\\downarrow\", true);\ndefineSymbol(math, rel, \"\\u21d3\", \"\\\\Downarrow\", true);\ndefineSymbol(math, rel, \"\\u2195\", \"\\\\updownarrow\", true);\ndefineSymbol(math, rel, \"\\u21d5\", \"\\\\Updownarrow\", true);\ndefineSymbol(math, op, \"\\u2210\", \"\\\\coprod\");\ndefineSymbol(math, op, \"\\u22c1\", \"\\\\bigvee\");\ndefineSymbol(math, op, \"\\u22c0\", \"\\\\bigwedge\");\ndefineSymbol(math, op, \"\\u2a04\", \"\\\\biguplus\");\ndefineSymbol(math, op, \"\\u2a04\", \"\\\\bigcupplus\");\ndefineSymbol(math, op, \"\\u2a03\", \"\\\\bigcupdot\");\ndefineSymbol(math, op, \"\\u2a07\", \"\\\\bigdoublevee\");\ndefineSymbol(math, op, \"\\u2a08\", \"\\\\bigdoublewedge\");\ndefineSymbol(math, op, \"\\u22c2\", \"\\\\bigcap\");\ndefineSymbol(math, op, \"\\u22c3\", \"\\\\bigcup\");\ndefineSymbol(math, op, \"\\u222b\", \"\\\\int\");\ndefineSymbol(math, op, \"\\u222b\", \"\\\\intop\");\ndefineSymbol(math, op, \"\\u222c\", \"\\\\iint\");\ndefineSymbol(math, op, \"\\u222d\", \"\\\\iiint\");\ndefineSymbol(math, op, \"\\u220f\", \"\\\\prod\");\ndefineSymbol(math, op, \"\\u2211\", \"\\\\sum\");\ndefineSymbol(math, op, \"\\u2a02\", \"\\\\bigotimes\");\ndefineSymbol(math, op, \"\\u2a01\", \"\\\\bigoplus\");\ndefineSymbol(math, op, \"\\u2a00\", \"\\\\bigodot\");\ndefineSymbol(math, op, \"\\u2a09\", \"\\\\bigtimes\");\ndefineSymbol(math, op, \"\\u222e\", \"\\\\oint\");\ndefineSymbol(math, op, \"\\u222f\", \"\\\\oiint\");\ndefineSymbol(math, op, \"\\u2230\", \"\\\\oiiint\");\ndefineSymbol(math, op, \"\\u2231\", \"\\\\intclockwise\");\ndefineSymbol(math, op, \"\\u2232\", \"\\\\varointclockwise\");\ndefineSymbol(math, op, \"\\u2a0c\", \"\\\\iiiint\");\ndefineSymbol(math, op, \"\\u2a0d\", \"\\\\intbar\");\ndefineSymbol(math, op, \"\\u2a0e\", \"\\\\intBar\");\ndefineSymbol(math, op, \"\\u2a0f\", \"\\\\fint\");\ndefineSymbol(math, op, \"\\u2a12\", \"\\\\rppolint\");\ndefineSymbol(math, op, \"\\u2a13\", \"\\\\scpolint\");\ndefineSymbol(math, op, \"\\u2a15\", \"\\\\pointint\");\ndefineSymbol(math, op, \"\\u2a16\", \"\\\\sqint\");\ndefineSymbol(math, op, \"\\u2a17\", \"\\\\intlarhk\");\ndefineSymbol(math, op, \"\\u2a18\", \"\\\\intx\");\ndefineSymbol(math, op, \"\\u2a19\", \"\\\\intcap\");\ndefineSymbol(math, op, \"\\u2a1a\", \"\\\\intcup\");\ndefineSymbol(math, op, \"\\u2a05\", \"\\\\bigsqcap\");\ndefineSymbol(math, op, \"\\u2a06\", \"\\\\bigsqcup\");\ndefineSymbol(math, op, \"\\u222b\", \"\\\\smallint\");\ndefineSymbol(text, inner, \"\\u2026\", \"\\\\textellipsis\");\ndefineSymbol(math, inner, \"\\u2026\", \"\\\\mathellipsis\");\ndefineSymbol(text, inner, \"\\u2026\", \"\\\\ldots\", true);\ndefineSymbol(math, inner, \"\\u2026\", \"\\\\ldots\", true);\ndefineSymbol(math, inner, \"\\u22f0\", \"\\\\iddots\", true);\ndefineSymbol(math, inner, \"\\u22ef\", \"\\\\@cdots\", true);\ndefineSymbol(math, inner, \"\\u22f1\", \"\\\\ddots\", true);\ndefineSymbol(math, textord, \"\\u22ee\", \"\\\\varvdots\"); // \\vdots is a macro\ndefineSymbol(text, textord, \"\\u22ee\", \"\\\\varvdots\");\ndefineSymbol(math, accent, \"\\u00b4\", \"\\\\acute\");\ndefineSymbol(math, accent, \"\\u0060\", \"\\\\grave\");\ndefineSymbol(math, accent, \"\\u00a8\", \"\\\\ddot\");\ndefineSymbol(math, accent, \"\\u2026\", \"\\\\dddot\");\ndefineSymbol(math, accent, \"\\u2026\\u002e\", \"\\\\ddddot\");\ndefineSymbol(math, accent, \"\\u007e\", \"\\\\tilde\");\ndefineSymbol(math, accent, \"\\u203e\", \"\\\\bar\");\ndefineSymbol(math, accent, \"\\u02d8\", \"\\\\breve\");\ndefineSymbol(math, accent, \"\\u02c7\", \"\\\\check\");\ndefineSymbol(math, accent, \"\\u005e\", \"\\\\hat\");\ndefineSymbol(math, accent, \"\\u2192\", \"\\\\vec\");\ndefineSymbol(math, accent, \"\\u02d9\", \"\\\\dot\");\ndefineSymbol(math, accent, \"\\u02da\", \"\\\\mathring\");\ndefineSymbol(math, mathord, \"\\u0131\", \"\\\\imath\", true);\ndefineSymbol(math, mathord, \"\\u0237\", \"\\\\jmath\", true);\ndefineSymbol(math, textord, \"\\u0131\", \"\\u0131\");\ndefineSymbol(math, textord, \"\\u0237\", \"\\u0237\");\ndefineSymbol(text, textord, \"\\u0131\", \"\\\\i\", true);\ndefineSymbol(text, textord, \"\\u0237\", \"\\\\j\", true);\ndefineSymbol(text, textord, \"\\u00f8\", \"\\\\o\", true);\ndefineSymbol(math, mathord, \"\\u00f8\", \"\\\\o\", true);\ndefineSymbol(text, textord, \"\\u00d8\", \"\\\\O\", true);\ndefineSymbol(math, mathord, \"\\u00d8\", \"\\\\O\", true);\ndefineSymbol(text, accent, \"\\u02ca\", \"\\\\'\"); // acute\ndefineSymbol(text, accent, \"\\u02cb\", \"\\\\`\"); // grave\ndefineSymbol(text, accent, \"\\u02c6\", \"\\\\^\"); // circumflex\ndefineSymbol(text, accent, \"\\u007e\", \"\\\\~\"); // tilde\ndefineSymbol(text, accent, \"\\u02c9\", \"\\\\=\"); // macron\ndefineSymbol(text, accent, \"\\u02d8\", \"\\\\u\"); // breve\ndefineSymbol(text, accent, \"\\u02d9\", \"\\\\.\"); // dot above\ndefineSymbol(text, accent, \"\\u00b8\", \"\\\\c\"); // cedilla\ndefineSymbol(text, accent, \"\\u02da\", \"\\\\r\"); // ring above\ndefineSymbol(text, accent, \"\\u02c7\", \"\\\\v\"); // caron\ndefineSymbol(text, accent, \"\\u00a8\", '\\\\\"'); // diaeresis\ndefineSymbol(text, accent, \"\\u02dd\", \"\\\\H\"); // double acute\ndefineSymbol(math, accent, \"\\u02ca\", \"\\\\'\"); // acute\ndefineSymbol(math, accent, \"\\u02cb\", \"\\\\`\"); // grave\ndefineSymbol(math, accent, \"\\u02c6\", \"\\\\^\"); // circumflex\ndefineSymbol(math, accent, \"\\u007e\", \"\\\\~\"); // tilde\ndefineSymbol(math, accent, \"\\u02c9\", \"\\\\=\"); // macron\ndefineSymbol(math, accent, \"\\u02d8\", \"\\\\u\"); // breve\ndefineSymbol(math, accent, \"\\u02d9\", \"\\\\.\"); // dot above\ndefineSymbol(math, accent, \"\\u00b8\", \"\\\\c\"); // cedilla\ndefineSymbol(math, accent, \"\\u02da\", \"\\\\r\"); // ring above\ndefineSymbol(math, accent, \"\\u02c7\", \"\\\\v\"); // caron\ndefineSymbol(math, accent, \"\\u00a8\", '\\\\\"'); // diaeresis\ndefineSymbol(math, accent, \"\\u02dd\", \"\\\\H\"); // double acute\n\n// These ligatures are detected and created in Parser.js's `formLigatures`.\nconst ligatures = {\n \"--\": true,\n \"---\": true,\n \"``\": true,\n \"''\": true\n};\n\ndefineSymbol(text, textord, \"\\u2013\", \"--\", true);\ndefineSymbol(text, textord, \"\\u2013\", \"\\\\textendash\");\ndefineSymbol(text, textord, \"\\u2014\", \"---\", true);\ndefineSymbol(text, textord, \"\\u2014\", \"\\\\textemdash\");\ndefineSymbol(text, textord, \"\\u2018\", \"`\", true);\ndefineSymbol(text, textord, \"\\u2018\", \"\\\\textquoteleft\");\ndefineSymbol(text, textord, \"\\u2019\", \"'\", true);\ndefineSymbol(text, textord, \"\\u2019\", \"\\\\textquoteright\");\ndefineSymbol(text, textord, \"\\u201c\", \"``\", true);\ndefineSymbol(text, textord, \"\\u201c\", \"\\\\textquotedblleft\");\ndefineSymbol(text, textord, \"\\u201d\", \"''\", true);\ndefineSymbol(text, textord, \"\\u201d\", \"\\\\textquotedblright\");\n// \\degree from gensymb package\ndefineSymbol(math, textord, \"\\u00b0\", \"\\\\degree\", true);\ndefineSymbol(text, textord, \"\\u00b0\", \"\\\\degree\");\n// \\textdegree from inputenc package\ndefineSymbol(text, textord, \"\\u00b0\", \"\\\\textdegree\", true);\n// TODO: In LaTeX, \\pounds can generate a different character in text and math\n// mode, but among our fonts, only Main-Regular defines this character \"163\".\ndefineSymbol(math, textord, \"\\u00a3\", \"\\\\pounds\");\ndefineSymbol(math, textord, \"\\u00a3\", \"\\\\mathsterling\", true);\ndefineSymbol(text, textord, \"\\u00a3\", \"\\\\pounds\");\ndefineSymbol(text, textord, \"\\u00a3\", \"\\\\textsterling\", true);\ndefineSymbol(math, textord, \"\\u2720\", \"\\\\maltese\");\ndefineSymbol(text, textord, \"\\u2720\", \"\\\\maltese\");\ndefineSymbol(math, textord, \"\\u20ac\", \"\\\\euro\", true);\ndefineSymbol(text, textord, \"\\u20ac\", \"\\\\euro\", true);\ndefineSymbol(text, textord, \"\\u20ac\", \"\\\\texteuro\");\ndefineSymbol(math, textord, \"\\u00a9\", \"\\\\copyright\", true);\ndefineSymbol(text, textord, \"\\u00a9\", \"\\\\textcopyright\");\ndefineSymbol(math, textord, \"\\u2300\", \"\\\\diameter\", true);\ndefineSymbol(text, textord, \"\\u2300\", \"\\\\diameter\");\n\n// Italic Greek\ndefineSymbol(math, textord, \"𝛤\", \"\\\\varGamma\");\ndefineSymbol(math, textord, \"𝛥\", \"\\\\varDelta\");\ndefineSymbol(math, textord, \"𝛩\", \"\\\\varTheta\");\ndefineSymbol(math, textord, \"𝛬\", \"\\\\varLambda\");\ndefineSymbol(math, textord, \"𝛯\", \"\\\\varXi\");\ndefineSymbol(math, textord, \"𝛱\", \"\\\\varPi\");\ndefineSymbol(math, textord, \"𝛴\", \"\\\\varSigma\");\ndefineSymbol(math, textord, \"𝛶\", \"\\\\varUpsilon\");\ndefineSymbol(math, textord, \"𝛷\", \"\\\\varPhi\");\ndefineSymbol(math, textord, \"𝛹\", \"\\\\varPsi\");\ndefineSymbol(math, textord, \"𝛺\", \"\\\\varOmega\");\ndefineSymbol(text, textord, \"𝛤\", \"\\\\varGamma\");\ndefineSymbol(text, textord, \"𝛥\", \"\\\\varDelta\");\ndefineSymbol(text, textord, \"𝛩\", \"\\\\varTheta\");\ndefineSymbol(text, textord, \"𝛬\", \"\\\\varLambda\");\ndefineSymbol(text, textord, \"𝛯\", \"\\\\varXi\");\ndefineSymbol(text, textord, \"𝛱\", \"\\\\varPi\");\ndefineSymbol(text, textord, \"𝛴\", \"\\\\varSigma\");\ndefineSymbol(text, textord, \"𝛶\", \"\\\\varUpsilon\");\ndefineSymbol(text, textord, \"𝛷\", \"\\\\varPhi\");\ndefineSymbol(text, textord, \"𝛹\", \"\\\\varPsi\");\ndefineSymbol(text, textord, \"𝛺\", \"\\\\varOmega\");\n\n\n// There are lots of symbols which are the same, so we add them in afterwards.\n// All of these are textords in math mode\nconst mathTextSymbols = '0123456789/@.\"';\nfor (let i = 0; i < mathTextSymbols.length; i++) {\n const ch = mathTextSymbols.charAt(i);\n defineSymbol(math, textord, ch, ch);\n}\n\n// All of these are textords in text mode\nconst textSymbols = '0123456789!@*()-=+\";:?/.,';\nfor (let i = 0; i < textSymbols.length; i++) {\n const ch = textSymbols.charAt(i);\n defineSymbol(text, textord, ch, ch);\n}\n\n// All of these are textords in text mode, and mathords in math mode\nconst letters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\nfor (let i = 0; i < letters.length; i++) {\n const ch = letters.charAt(i);\n defineSymbol(math, mathord, ch, ch);\n defineSymbol(text, textord, ch, ch);\n}\n\n// Some more letters in Unicode Basic Multilingual Plane.\nconst narrow = \"ÇÐÞçþℂℍℕℙℚℝℤℎℏℊℋℌℐℑℒℓ℘ℛℜℬℰℱℳℭℨ\";\nfor (let i = 0; i < narrow.length; i++) {\n const ch = narrow.charAt(i);\n defineSymbol(math, mathord, ch, ch);\n defineSymbol(text, textord, ch, ch);\n}\n\n// The next loop loads wide (surrogate pair) characters.\n// We support some letters in the Unicode range U+1D400 to U+1D7FF,\n// Mathematical Alphanumeric Symbols.\nlet wideChar = \"\";\nfor (let i = 0; i < letters.length; i++) {\n // The hex numbers in the next line are a surrogate pair.\n // 0xD835 is the high surrogate for all letters in the range we support.\n // 0xDC00 is the low surrogate for bold A.\n wideChar = String.fromCharCode(0xd835, 0xdc00 + i); // A-Z a-z bold\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n wideChar = String.fromCharCode(0xd835, 0xdc34 + i); // A-Z a-z italic\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n wideChar = String.fromCharCode(0xd835, 0xdc68 + i); // A-Z a-z bold italic\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n wideChar = String.fromCharCode(0xd835, 0xdd04 + i); // A-Z a-z Fractur\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n wideChar = String.fromCharCode(0xd835, 0xdda0 + i); // A-Z a-z sans-serif\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n wideChar = String.fromCharCode(0xd835, 0xddd4 + i); // A-Z a-z sans bold\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n wideChar = String.fromCharCode(0xd835, 0xde08 + i); // A-Z a-z sans italic\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n wideChar = String.fromCharCode(0xd835, 0xde70 + i); // A-Z a-z monospace\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n wideChar = String.fromCharCode(0xd835, 0xdd38 + i); // A-Z a-z double struck\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n const ch = letters.charAt(i);\n wideChar = String.fromCharCode(0xd835, 0xdc9c + i); // A-Z a-z calligraphic\n defineSymbol(math, mathord, ch, wideChar);\n defineSymbol(text, textord, ch, wideChar);\n}\n\n// Next, some wide character numerals\nfor (let i = 0; i < 10; i++) {\n wideChar = String.fromCharCode(0xd835, 0xdfce + i); // 0-9 bold\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n wideChar = String.fromCharCode(0xd835, 0xdfe2 + i); // 0-9 sans serif\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n wideChar = String.fromCharCode(0xd835, 0xdfec + i); // 0-9 bold sans\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n\n wideChar = String.fromCharCode(0xd835, 0xdff6 + i); // 0-9 monospace\n defineSymbol(math, mathord, wideChar, wideChar);\n defineSymbol(text, textord, wideChar, wideChar);\n}\n\n/*\n * Neither Firefox nor Chrome support hard line breaks or soft line breaks.\n * (Despite https://www.w3.org/Math/draft-spec/mathml.html#chapter3_presm.lbattrs)\n * So Temml has work-arounds for both hard and soft breaks.\n * The work-arounds sadly do not work simultaneously. Any top-level hard\n * break makes soft line breaks impossible.\n *\n * Hard breaks are simulated by creating a and putting each line in its own .\n *\n * To create soft line breaks, Temml avoids using the and tags.\n * Then the top level of a