From 11011d7c373c655830053b155eeaf632c2658ac7 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 24 Jun 2021 17:50:34 +1000 Subject: Updated. - added mathjax (freed) - added rss.py - updated publish.el - etc. --- js/mathjax/extensions/a11y/accessibility-menu.js | 186 +++ js/mathjax/extensions/a11y/auto-collapse.js | 500 ++++++ js/mathjax/extensions/a11y/collapsible.js | 743 +++++++++ js/mathjax/extensions/a11y/explorer.js | 827 ++++++++++ js/mathjax/extensions/a11y/invalid_keypress.mp3 | Bin 0 -> 9030 bytes js/mathjax/extensions/a11y/invalid_keypress.ogg | Bin 0 -> 5353 bytes js/mathjax/extensions/a11y/mathjax-sre.js | 1633 ++++++++++++++++++++ js/mathjax/extensions/a11y/mathmaps/de.js | 104 ++ js/mathjax/extensions/a11y/mathmaps/en.js | 110 ++ js/mathjax/extensions/a11y/mathmaps/es.js | 104 ++ js/mathjax/extensions/a11y/mathmaps/fr.js | 104 ++ js/mathjax/extensions/a11y/mathmaps/mathmaps_ie.js | 518 +++++++ js/mathjax/extensions/a11y/mathmaps/nemeth.js | 104 ++ js/mathjax/extensions/a11y/semantic-enrich.js | 208 +++ js/mathjax/extensions/a11y/wgxpath.install.js | 77 + 15 files changed, 5218 insertions(+) create mode 100644 js/mathjax/extensions/a11y/accessibility-menu.js create mode 100644 js/mathjax/extensions/a11y/auto-collapse.js create mode 100644 js/mathjax/extensions/a11y/collapsible.js create mode 100644 js/mathjax/extensions/a11y/explorer.js create mode 100644 js/mathjax/extensions/a11y/invalid_keypress.mp3 create mode 100644 js/mathjax/extensions/a11y/invalid_keypress.ogg create mode 100644 js/mathjax/extensions/a11y/mathjax-sre.js create mode 100644 js/mathjax/extensions/a11y/mathmaps/de.js create mode 100644 js/mathjax/extensions/a11y/mathmaps/en.js create mode 100644 js/mathjax/extensions/a11y/mathmaps/es.js create mode 100644 js/mathjax/extensions/a11y/mathmaps/fr.js create mode 100644 js/mathjax/extensions/a11y/mathmaps/mathmaps_ie.js create mode 100644 js/mathjax/extensions/a11y/mathmaps/nemeth.js create mode 100644 js/mathjax/extensions/a11y/semantic-enrich.js create mode 100644 js/mathjax/extensions/a11y/wgxpath.install.js (limited to 'js/mathjax/extensions/a11y') diff --git a/js/mathjax/extensions/a11y/accessibility-menu.js b/js/mathjax/extensions/a11y/accessibility-menu.js new file mode 100644 index 0000000..7262c22 --- /dev/null +++ b/js/mathjax/extensions/a11y/accessibility-menu.js @@ -0,0 +1,186 @@ +// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0 +/************************************************************* + * + * [Contrib]/a11y/accessibility-menu.js + * + * A thin extension to add opt-in menu items for the accessibility + * extensions in the a11y contributed directory. + * + * --------------------------------------------------------------------- + * + * Copyright (c) 2016-2017 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(HUB,EXTENSIONS) { + var SETTINGS = HUB.config.menuSettings; + var ITEM, MENU; // filled in when MathMenu extension loads + + var BIND = (Function.prototype.bind ? function (f,t) {return f.bind(t)} : + function (f,t) {return function () {f.apply(t,arguments)}}); + var KEYS = Object.keys || function (obj) { + var keys = []; + for (var id in obj) {if (obj.hasOwnProperty(id)) keys.push(id)} + return keys; + }; + + // + // Set up the a11y path,if it isn't already in place + // + var PATH = MathJax.Ajax.config.path; + if (!PATH.a11y) PATH.a11y = HUB.config.root + "/extensions/a11y"; + + var Accessibility = EXTENSIONS["accessibility-menu"] = { + version: '1.6.0', + prefix: '', //'Accessibility-', + defaults: {}, + modules: [], + MakeOption: function(name) { + return Accessibility.prefix + name; + }, + GetOption: function(option) { + return SETTINGS[Accessibility.MakeOption(option)]; + }, + AddDefaults: function() { + var keys = KEYS(Accessibility.defaults); + for (var i = 0, key; key = keys[i]; i++) { + var option = Accessibility.MakeOption(key); + if (typeof(SETTINGS[option]) === 'undefined') { + SETTINGS[option] = Accessibility.defaults[key]; + } + } + }, + // Attaches the menu items; + AddMenu: function() { + var items = Array(this.modules.length); + for (var i = 0, module; module = this.modules[i]; i++) items[i] = module.placeHolder; + var menu = MENU.FindId('Accessibility'); + if (menu) { + items.unshift(ITEM.RULE()); + menu.submenu.items.push.apply(menu.submenu.items,items); + } else { + var renderer = (MENU.FindId("Settings","Renderer")||{}).submenu; + if (renderer) { + // move AssitiveMML and InTabOrder from Renderer to Accessibility menu + items.unshift(ITEM.RULE()); + items.unshift(renderer.items.pop()); + items.unshift(renderer.items.pop()); + } + items.unshift("Accessibility"); + var menu = ITEM.SUBMENU.apply(ITEM.SUBMENU,items); + var locale = MENU.IndexOfId('Locale'); + if (locale) { + MENU.items.splice(locale,0,menu); + } else { + MENU.items.push(ITEM.RULE(), menu); + } + } + }, + Register: function(module) { + Accessibility.defaults[module.option] = false; + Accessibility.modules.push(module); + }, + Startup: function() { + ITEM = MathJax.Menu.ITEM; + MENU = MathJax.Menu.menu; + for (var i = 0, module; module = this.modules[i]; i++) module.CreateMenu(); + this.AddMenu(); + }, + LoadExtensions: function () { + var extensions = []; + for (var i = 0, module; module = this.modules[i]; i++) { + if (SETTINGS[module.option]) extensions.push(module.module); + } + return (extensions.length ? HUB.Startup.loadArray(extensions) : null); + } + }; + + var ModuleLoader = MathJax.Extension.ModuleLoader = MathJax.Object.Subclass({ + option: '', + name: ['',''], + module: '', + placeHolder: null, + submenu: false, + extension: null, + Init: function(option, name, module, extension, submenu) { + this.option = option; + this.name = [name.replace(/ /g,''),name]; + this.module = module; + this.extension = extension; + this.submenu = (submenu || false); + }, + CreateMenu: function() { + var load = BIND(this.Load,this); + if (this.submenu) { + this.placeHolder = + ITEM.SUBMENU(this.name, + ITEM.CHECKBOX(["Activate","Activate"], + Accessibility.MakeOption(this.option), {action: load}), + ITEM.RULE(), + ITEM.COMMAND(["OptionsWhenActive","(Options when Active)"],null,{disabled:true}) + ); + } else { + this.placeHolder = ITEM.CHECKBOX( + this.name, Accessibility.MakeOption(this.option), {action: load} + ); + } + }, + Load: function() { + HUB.Queue(["Require",MathJax.Ajax,this.module,["Enable",this]]); + }, + Enable: function(menu) { + var extension = MathJax.Extension[this.extension]; + if (extension) { + extension.Enable(true,true); + MathJax.Menu.saveCookie(); + } + } + }); + + Accessibility.Register( + ModuleLoader( + 'collapsible', 'Collapsible Math', '[a11y]/collapsible.js', 'collapsible' + ) + ); + Accessibility.Register( + ModuleLoader( + 'autocollapse', 'Auto Collapse', '[a11y]/auto-collapse.js', 'auto-collapse' + ) + ); + Accessibility.Register( + ModuleLoader( + 'explorer', 'Explorer', '[a11y]/explorer.js', 'explorer', true + ) + ); + + Accessibility.AddDefaults(); + + HUB.Register.StartupHook('End Extensions', function () { + HUB.Register.StartupHook('MathMenu Ready', function () { + Accessibility.Startup(); + HUB.Startup.signal.Post('Accessibility Menu Ready'); + },5); // run before other extensions' menu hooks even if they are loaded first + },5); + + MathJax.Hub.Register.StartupHook("End Cookie", function () { + MathJax.Callback.Queue( + ["LoadExtensions",Accessibility], + ["loadComplete",MathJax.Ajax,"[a11y]/accessibility-menu.js"] + ); + }); + +})(MathJax.Hub,MathJax.Extension); + + +// @license-end diff --git a/js/mathjax/extensions/a11y/auto-collapse.js b/js/mathjax/extensions/a11y/auto-collapse.js new file mode 100644 index 0000000..d18eca9 --- /dev/null +++ b/js/mathjax/extensions/a11y/auto-collapse.js @@ -0,0 +1,500 @@ +// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0 +/************************************************************* + * + * [Contrib]/a11y/auto-collapse.js + * + * Implements the ability to have long expressions collapse + * automatically on screen size changes. + * + * --------------------------------------------------------------------- + * + * Copyright (c) 2016-2017 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function (HUB) { + var SETTINGS = HUB.config.menuSettings; + var COOKIE = {}; // replaced when menu is available + + // + // Set up the a11y path,if it isn't already in place + // + var PATH = MathJax.Ajax.config.path; + if (!PATH.a11y) PATH.a11y = HUB.config.root + "/extensions/a11y"; + + var Collapse = MathJax.Extension["auto-collapse"] = { + version: "1.6.0", + config: HUB.CombineConfig("auto-collapse",{ + disabled: false + }), + dependents: [], // the extensions that depend on this one + + /*****************************************************************/ + + Enable: function (update,menu) { + SETTINGS.autocollapse = true; + if (menu) COOKIE.autocollapse = true + this.config.disabled = false; + MathJax.Extension.collapsible.Enable(false,menu); + if (update) { + HUB.Queue( + ["Reprocess",HUB], + ["CollapseWideMath",this] + ); + } + }, + Disable: function (update,menu) { + SETTINGS.autocollapse = false; + if (menu) COOKIE.autocollapse = false; + this.config.disabled = true; + for (var i = this.dependents.length-1; i >= 0; i--) { + var dependent = this.dependents[i]; + if (dependent.Disable) dependent.Disable(false,menu); + } + if (update) HUB.Queue(["Rerender",HUB]); + }, + + // + // Register a dependent + // + Dependent: function (extension) { + this.dependents.push(extension); + }, + + Startup: function () { + // + // Inform collapsible extension that we are a dependent + // + var Collapsible = MathJax.Extension.collapsible; + if (Collapsible) Collapsible.Dependent(this); + // + // Add the filter into the post-input hooks (priority 150, so other + // hooks run first, in particular, the enrichment and complexity hooks). + // + HUB.postInputHooks.Add(["Filter",Collapse],150); + // + // Add the auto-collapsing + // + HUB.Queue(function () {return Collapse.CollapseWideMath()}); + // + // Add a resize handler to check for math that needs + // to be collapsed or expanded. + // + if (window.addEventListener) window.addEventListener("resize",Collapse.resizeHandler,false); + else if (window.attachEvent) window.attachEvent("onresize",Collapse.resizeHandler); + else window.onresize = Collapse.resizeHandler; + }, + + // + // If the math is block-level (or in an element "by itself"), then + // add the SRE actions for this element. + // + Filter: function (jax,id,script) { + if (!jax.enriched || this.config.disabled) return; + if (jax.root.Get("display") === "block" || + script.parentNode.childNodes.length <= 3) { + jax.root.SRE = {action: this.Actions(jax.root)}; + } + }, + // + // Produce an array of collapsible actions + // sorted by depth and complexity + // + Actions: function (node) { + var actions = []; + this.getActions(node,0,actions); + return this.sortActions(actions); + }, + getActions: function (node,depth,actions) { + if (node.isToken || !node.data) return; + depth++; + for (var i = 0, m = node.data.length; i < m; i++) { + if (node.data[i]) { + var child = node.data[i]; + if (child.collapsible) { + if (!actions[depth]) actions[depth] = []; + actions[depth].push(child); + this.getActions(child.data[1],depth,actions); + } else { + this.getActions(child,depth,actions); + } + } + } + }, + sortActions: function (actions) { + var ACTIONS = []; + for (var i = 0, m = actions.length; i < m; i++) { + if (actions[i]) ACTIONS = ACTIONS.concat(actions[i].sort(this.sortActionsBy)); + } + return ACTIONS; + }, + sortActionsBy: function (a,b) { + a = a.data[1].complexity; b = b.data[1].complexity; + return (a < b ? -1 : a > b ? 1 : 0); + }, + + /*****************************************************************/ + /* + * These routines implement the automatic collapsing of equations + * based on container widths. + */ + + // + // Find math that is too wide and collapse it. + // + CollapseWideMath: function (element) { + if (this.config.disabled) return; + this.GetContainerWidths(element); + var jax = HUB.getAllJax(element); + var state = {collapse: [], jax: jax, m: jax.length, i: 0, changed:false}; + return this.collapseState(state); + }, + collapseState: function (state) { + var collapse = state.collapse; + while (state.i < state.m) { + var jax = state.jax[state.i]; + var SRE = jax.root.SRE; state.changed = false; + if (SRE && SRE.action.length) { + if (SRE.cwidth < SRE.m || SRE.cwidth > SRE.M) { + var restart = this.getActionWidths(jax,state); if (restart) return restart; + this.collapseActions(SRE,state); + if (state.changed) collapse.push(jax.SourceElement()); + } + } + state.i++; + } + if (collapse.length === 0) return; + if (collapse.length === 1) collapse = collapse[0]; + return HUB.Rerender(collapse); + }, + + // + // Find the actions that need to be collapsed to acheive + // the correct width, and retain the sizes that would cause + // the equation to be expanded or collapsed further. + // + collapseActions: function (SRE,state) { + var w = SRE.width, m = w, M = 1000000; + for (var j = SRE.action.length-1; j >= 0; j--) { + var action = SRE.action[j], selection = action.selection; + if (w > SRE.cwidth) { + action.selection = 1; + m = action.SREwidth; M = w; + } else { + action.selection = 2; + } + w = action.SREwidth; + if (SRE.DOMupdate) { + document.getElementById(action.id).setAttribute("selection",action.selection); + } else if (action.selection !== selection) { + state.changed = true; + } + } + SRE.m = m; SRE.M = M; + }, + + // + // Get the widths of the different collapsings, + // trapping any restarts, and restarting the process + // when the event has occurred. + // + getActionWidths: function (jax,state) { + if (!jax.root.SRE.actionWidths) { + MathJax.OutputJax[jax.outputJax].getMetrics(jax); + try {this.computeActionWidths(jax)} catch (err) { + if (!err.restart) throw err; + return MathJax.Callback.After(["collapseState",this,state],err.restart); + } + state.changed = true; + } + return null; + }, + // + // Compute the action widths by collapsing each maction, + // and recording the width of the complete equation. + // + computeActionWidths: function (jax) { + var SRE = jax.root.SRE, actions = SRE.action, j, state = {}; + SRE.width = jax.sreGetRootWidth(state); + for (j = actions.length-1; j >= 0; j--) actions[j].selection = 2; + for (j = actions.length-1; j >= 0; j--) { + var action = actions[j]; + if (action.SREwidth == null) { + action.selection = 1; + action.SREwidth = jax.sreGetActionWidth(state,action); + } + } + SRE.actionWidths = true; + }, + + // + // Get the widths of the containers of tall the math elements + // that can be collapsed (so we can tell which ones NEED to be + // collapsed). Do this in a way that only causes two reflows. + // + GetContainerWidths: function (element) { + var JAX = HUB.getAllJax(element); + var i, m, script, span = MathJax.HTML.Element("span",{style:{display:"block"}}); + var math = [], jax, root; + for (i = 0, m = JAX.length; i < m; i++) { + jax = JAX[i], root = jax.root, SRE = root.SRE; + if (SRE && SRE.action.length) { + if (SRE.width == null) { + jax.sreGetMetrics(); + SRE.m = SRE.width; SRE.M = 1000000; + } + script = jax.SourceElement(); + script.previousSibling.style.display = "none"; + script.parentNode.insertBefore(span.cloneNode(false),script); + math.push([jax,script]); + } + } + for (i = 0, m = math.length; i < m; i++) { + jax = math[i][0], script = math[i][1]; + if (script.previousSibling.offsetWidth) + jax.root.SRE.cwidth = script.previousSibling.offsetWidth * jax.root.SRE.em; + } + for (i = 0, m = math.length; i < m; i++) { + jax = math[i][0], script = math[i][1]; + script.parentNode.removeChild(script.previousSibling); + script.previousSibling.style.display = ""; + } + }, + + /*****************************************************************/ + + // + // A resize handler that can be tied to the window resize event + // to collapse math automatically on resize. + // + + timer: null, + running: false, + retry: false, + saved_delay: 0, + + resizeHandler: function (event) { + if (Collapse.config.disabled) return; + if (Collapse.running) {Collapse.retry = true; return} + if (Collapse.timer) clearTimeout(Collapse.timer); + Collapse.timer = setTimeout(Collapse.resizeAction, 100); + }, + resizeAction: function () { + Collapse.timer = null; + Collapse.running = true; + HUB.Queue( + function () { + // + // Prevent flicker between input and output phases. + // + Collapse.saved_delay = HUB.processSectionDelay; + HUB.processSectionDelay = 0; + }, + ["CollapseWideMath",Collapse], + ["resizeCheck",Collapse] + ); + }, + resizeCheck: function () { + Collapse.running = false; + HUB.processSectionDelay = Collapse.saved_delay; + if (Collapse.retry) { + Collapse.retry = false; + setTimeout(Collapse.resizeHandler,0); + } + } + + }; + + HUB.Register.StartupHook("End Extensions", function () { + if (SETTINGS.autocollapse == null) { + SETTINGS.autocollapse = !Collapse.config.disabled; + } else { + Collapse.config.disabled = !SETTINGS.autocollapse; + } + HUB.Register.StartupHook("MathMenu Ready", function () { + COOKIE = MathJax.Menu.cookie; + var Switch = function(menu) { + Collapse[SETTINGS.autocollapse ? "Enable" : "Disable"](true,true); + MathJax.Menu.saveCookie(); + }; + var ITEM = MathJax.Menu.ITEM, + MENU = MathJax.Menu.menu; + var menu = ITEM.CHECKBOX( + ['AutoCollapse','Auto Collapse'], 'autocollapse', {action: Switch} + ); + var submenu = (MENU.FindId('Accessibility')||{}).submenu, index; + if (submenu) { + index = submenu.IndexOfId('AutoCollapse'); + if (index !== null) { + submenu.items[index] = menu; + } else { + index = submenu.IndexOfId('CollapsibleMath'); + submenu.items.splice(index+1,0,menu); + } + } else { + index = MENU.IndexOfId('CollapsibleMath'); + MENU.items.splice(index+1,0,menu); + } + var init = function () {Collapse[SETTINGS.autocollapse ? "Enable" : "Disable"]()}; + if (MathJax.Extension.collapse) init(); + else MathJax.Hub.Register.StartupHook("Auto Collapse Ready", init); + },25); // after Assistive-Explore + },25); + +})(MathJax.Hub); + + +/*****************************************************************/ +/* + * Add methods to the ElementJax and OutputJax to get the + * widths of the collapsed elements. + */ + +// +// Add SRE methods to ElementJax. +// +MathJax.ElementJax.Augment({ + sreGetMetrics: function () { + MathJax.OutputJax[this.outputJax].sreGetMetrics(this,this.root.SRE); + }, + sreGetRootWidth: function (state) { + return MathJax.OutputJax[this.outputJax].sreGetRootWidth(this,state); + }, + sreGetActionWidth: function (state,action) { + return MathJax.OutputJax[this.outputJax].sreGetActionWidth(this,state,action); + } +}); + +// +// Add default methods to base OutputJax class. +// +MathJax.OutputJax.Augment({ + getMetrics: function () {}, // make sure it is defined + sreGetMetrics: function (jax,SRE) {SRE.cwidth = 1000000; SRE.width = 0; SRE.em = 12}, + sreGetRootWidth: function (jax,state) {return 0}, + sreGetActionWidth: function (jax,state,action) {return 0} +}); + +// +// Specific implementations for HTML-CSS output. +// +MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { + MathJax.OutputJax["HTML-CSS"].Augment({ + sreGetMetrics: function (jax,SRE) { + SRE.width = jax.root.data[0].HTMLspanElement().parentNode.bbox.w; + SRE.em = 1 / jax.HTMLCSS.em / jax.HTMLCSS.scale; + }, + sreGetRootWidth: function (jax,state) { + var html = jax.root.data[0].HTMLspanElement(); + state.box = html.parentNode; + return state.box.bbox.w; + }, + sreGetActionWidth: function (jax,state,action) { + return jax.root.data[0].toHTML(state.box).bbox.w; + } + }); +}); + +// +// Specific implementations for SVG output. +// +MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { + MathJax.OutputJax.SVG.Augment({ + getMetrics: function (jax) { + this.em = MathJax.ElementJax.mml.mbase.prototype.em = jax.SVG.em; this.ex = jax.SVG.ex; + this.linebreakWidth = jax.SVG.lineWidth; this.cwidth = jax.SVG.cwidth; + }, + sreGetMetrics: function (jax,SRE) { + SRE.width = jax.root.SVGdata.w/1000; + SRE.em = 1/jax.SVG.em; + }, + sreGetRootWidth: function (jax,state) { + state.span = document.getElementById(jax.inputID+"-Frame"); + return jax.root.SVGdata.w/1000; + }, + sreGetActionWidth: function (jax,state,action) { + this.mathDiv = state.span; + state.span.appendChild(this.textSVG); + try {var svg = jax.root.data[0].toSVG()} catch(err) {var error = err} + state.span.removeChild(this.textSVG); + if (error) throw error; // can happen when a restart is needed + return jax.root.data[0].SVGdata.w/1000; + } + }); +}); + +// +// Specific implementations for CommonHTML output. +// +MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () { + MathJax.OutputJax.CommonHTML.Augment({ + sreGetMetrics: function (jax,SRE) { + SRE.width = jax.root.CHTML.w; + SRE.em = 1 / jax.CHTML.em / jax.CHTML.scale; + }, + sreGetRootWidth: function (jax,state) { + state.span = document.getElementById(jax.inputID+"-Frame").firstChild; + state.tmp = document.createElement("span"); + state.tmp.className = state.span.className; + return jax.root.CHTML.w / jax.CHTML.scale; + }, + sreGetActionWidth: function (jax,state,action) { + state.span.parentNode.replaceChild(state.tmp,state.span); + MathJax.OutputJax.CommonHTML.CHTMLnode = state.tmp; + try {jax.root.data[0].toCommonHTML(state.tmp)} catch (err) {var error = err} + state.tmp.parentNode.replaceChild(state.span,state.tmp); + if (error) throw error; // can happen when a restart is needed + return jax.root.data[0].CHTML.w / jax.CHTML.scale; + } + }); +}); + +// +// Specific implementations for NativeMML output. +// +MathJax.Hub.Register.StartupHook("NativeMML Jax Ready",function () { + MathJax.OutputJax.NativeMML.Augment({ + sreGetMetrics: function (jax,SRE) { + var span = document.getElementById(jax.inputID+"-Frame"); + SRE.width = span.offsetWidth; + SRE.em = 1; SRE.DOMupdate = true; + }, + sreGetRootWidth: function (jax,state) { + state.span = document.getElementById(jax.inputID+"-Frame").firstChild; + return state.span.offsetWidth; + }, + sreGetActionWidth: function (jax,state,action) { + var maction = document.getElementById(action.id); + maction.setAttribute("selection",1); + var w = state.span.offsetWidth; + return w; + } + }); +}); + + +/*****************************************************************/ + +// +// Load the collapsible extension and +// signal the start up when that has loaded. +// +MathJax.Ajax.Require("[a11y]/collapsible.js"); +MathJax.Hub.Register.StartupHook("Collapsible Ready", function () { + MathJax.Extension["auto-collapse"].Startup(); // Initialize the collapsing process + MathJax.Hub.Startup.signal.Post("Auto Collapse Ready"); + MathJax.Ajax.loadComplete("[a11y]/auto-collapse.js"); +}); + +// @license-end diff --git a/js/mathjax/extensions/a11y/collapsible.js b/js/mathjax/extensions/a11y/collapsible.js new file mode 100644 index 0000000..cc396f6 --- /dev/null +++ b/js/mathjax/extensions/a11y/collapsible.js @@ -0,0 +1,743 @@ +// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0 +/************************************************************* + * + * [Contrib]/a11y/collapsible.js + * + * A filter to add maction elements to the enriched MathML for parts that + * can be collapsed. We determine this based on a "complexity" value and + * collapse those terms that exceed a given complexity. + * + * The parameters controlling the complexity measure still need work. + * + * --------------------------------------------------------------------- + * + * Copyright (c) 2016-2017 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function (HUB) { + var MML; + + var SETTINGS = HUB.config.menuSettings; + var COOKIE = {}; // replaced when menu is available + + var NOCOLLAPSE = 10000000; // really big complexity + var COMPLEXATTR = "data-semantic-complexity"; + + // + // Set up the a11y path,if it isn't already in place + // + var PATH = MathJax.Ajax.config.path; + if (!PATH.a11y) PATH.a11y = HUB.config.root + "/extensions/a11y"; + + var Collapsible = MathJax.Extension.collapsible = { + version: "1.6.0", + config: HUB.CombineConfig("collapsible",{ + disabled: false + }), + dependents: [], // the extensions that depend on this one + COMPLEXATTR: COMPLEXATTR, // attribute name for the complexity value + + /*****************************************************************/ + + // + // Complexity values to use for different structures + // + COMPLEXITY: { + TEXT: .5, // each character of a token element adds this to complexity + TOKEN: .5, // each toekn element gets this additional complexity + CHILD: 1, // child nodes add this to their parent node's complexity + + SCRIPT: .8, // script elements reduce their complexity by this factor + SQRT: 2, // sqrt adds this extra complexity + SUBSUP: 2, // sub-sup adds this extra complexity + UNDEROVER: 2, // under-over adds this extra complexity + FRACTION: 2, // fractions add this extra complexity + ACTION: 2, // maction adds this extra complexity + PHANTOM: 0, // mphantom makes complexity 0? + XML: 2, // Can't really measure complexity of annotation-xml, so punt + GLYPH: 2 // Can't really measure complexity of mglyph, to punt + }, + // + // These are the cut-off complexity values for when + // the structure should collapse + // + COLLAPSE: { + identifier: 3, + number: 3, + text: 10, + infixop: 15, + relseq: 15, + multirel: 15, + fenced: 18, + bigop: 20, + integral: 20, + fraction: 12, + sqrt: 9, + root: 12, + vector: 15, + matrix: 15, + cases: 15, + superscript: 9, + subscript: 9, + subsup: 9, + punctuated: { + endpunct: NOCOLLAPSE, + startpunct: NOCOLLAPSE, + value: 12 + } + }, + // + // These are the characters to use for the various collapsed elements + // (if an object, then semantic-role is used to get the character + // from the object) + // + MARKER: { + identifier: "x", + number: "#", + text: "...", + appl: { + "limit function": "lim", + value: "f()" + }, + fraction: "/", + sqrt: "\u221A", + root: "\u221A", + superscript: "\u25FD\u02D9", + subscript: "\u25FD.", + subsup:"\u25FD:", + vector: { + binomial: "(:)", + determinant: "|:|", + value: "\u27E8:\u27E9" + }, + matrix: { + squarematrix: "[::]", + rowvector: "\u27E8\u22EF\u27E9", + columnvector: "\u27E8\u22EE\u27E9", + determinant: "|::|", + value: "(::)" + }, + cases: "{:", + infixop: { + addition: "+", + subtraction: "\u2212", + multiplication: "\u22C5", + implicit: "\u22C5", + value: "+" + }, + punctuated: { + text: "...", + value: "," + } + }, + + /*****************************************************************/ + + Enable: function (update,menu) { + SETTINGS.collapsible = true; + if (menu) COOKIE.collapsible = true; + this.config.disabled = false; + MathJax.Extension["semantic-enrich"].Enable(false,menu); + if (update) HUB.Queue(["Reprocess",HUB]); + }, + Disable: function (update,menu) { + SETTINGS.collapsible = false; + if (menu) COOKIE.collapsible = false; + this.config.disabled = true; + for (var i = this.dependents.length-1; i >= 0; i--) { + var dependent = this.dependents[i]; + if (dependent.Disable) dependent.Disable(false,menu); + } + if (update) HUB.Queue(["Reprocess",HUB]); + }, + + // + // Register a dependent + // + Dependent: function (extension) { + this.dependents.push(extension); + }, + + Startup: function () { + MML = MathJax.ElementJax.mml; + // + // Inform semantic-enrich extension that we are a dependent + // + var Enrich = MathJax.Extension["semantic-enrich"]; + if (Enrich) Enrich.Dependent(this); + // + // Add the filter into the post-input hooks (priority 100, so other + // hooks run first, in particular, the enrichment hook). + // + HUB.postInputHooks.Add(["Filter",Collapsible],100); + }, + + // + // The main filter: add mactions for collapsing the math. + // + Filter: function (jax,id,script) { + if (!jax.enriched || this.config.disabled) return; + jax.root = jax.root.Collapse(); + jax.root.inputID = script.id; + }, + + /*****************************************************************/ + + // + // Create a marker from a given string of characters + // (several possibilities are commented out) + // +// Marker: function (c) {return MML.mtext("\u25C3"+c+"\u25B9").With({mathcolor:"blue",attr:{},attrNames:[]})}, +// Marker: function (c) {return MML.mtext("\u25B9"+c+"\u25C3").With({mathcolor:"blue",attr:{},attrNames:[]})}, + Marker: function (c) {return MML.mtext("\u25C2"+c+"\u25B8").With({mathcolor:"blue",attr:{},attrNames:[]})}, +// Marker: function (c) {return MML.mtext("\u25B8"+c+"\u25C2").With({mathcolor:"blue",attr:{},attrNames:[]})}, +// Marker: function (c) {return MML.mtext("\u27EA"+c+"\u27EB").With({mathcolor:"blue",attr:{},attrNames:[]})}, + + + + /*****************************************************************/ + + // + // Make a collapsible element using maction that contains + // an appropriate marker, and the expanded MathML. + // If the MathML is a node, make an mrow to use instead, + // and move the semantic data to it (I guess it would have been + // easier to have had that done initially, oh well). + // + MakeAction: function (collapse,mml) { + var maction = MML.maction(collapse).With({ + id:this.getActionID(), actiontype:"toggle", + complexity:collapse.getComplexity(), collapsible:true, + attrNames:["id","actiontype","selection",COMPLEXATTR], attr:{}, selection:2 + }); + maction.attr[COMPLEXATTR] = maction.complexity; + if (mml.type === "math") { + var mrow = MML.mrow().With({ + complexity: mml.complexity, + attrNames: [], attr: {} + }); + mrow.Append.apply(mrow,mml.data[0].data); mml.data[0].data = []; + for (var i = mml.attrNames.length-1, name; name = mml.attrNames[i]; i--) { + if (name.substr(0,14) === "data-semantic-") { + mrow.attr[name] = mml.attr[name]; + mrow.attrNames.push(name); + delete mml.attr[name]; + mml.attrNames.splice(i,1); + } + } + mrow.complexity = mml.complexity; + maction.Append(mrow); mml.Append(maction); + mml.complexity = maction.complexity; maction = mml; + } else { + maction.Append(mml); + } + return maction; + }, + + actionID: 1, + getActionID: function () {return "MJX-Collapse-"+this.actionID++}, + + /*****************************************************************/ + + // + // If there is a specific routine for the type, do that, otherwise + // check if there is a complexity cut-off and marker for this type. + // If so, check if the complexity exceeds the cut off, and + // collapse using the appropriate marker for the type + // Return the (possibly modified) MathML + // + Collapse: function (mml) { + mml.getComplexity(); + var type = (mml.attr||{})["data-semantic-type"]; + if (type) { + if (this["Collapse_"+type]) mml = (this["Collapse_"+type])(mml); + else if (this.COLLAPSE[type] && this.MARKER[type]) { + var role = mml.attr["data-semantic-role"]; + var complexity = this.COLLAPSE[type]; + if (typeof(complexity) !== "number") complexity = complexity[role] || complexity.value; + if (mml.complexity > complexity) { + var marker = this.MARKER[type]; + if (typeof(marker) !== "string") marker = marker[role] || marker.value; + mml = this.MakeAction(this.Marker(marker),mml); + } + } + } + return mml; + }, + + // + // If a parent is going to be collapsible, if can call this + // to put back a collapsed child (rather than have too many + // nested collapsings) + // + UncollapseChild: function (mml,n,m) { + if (m == null) m = 1; + if (this.SplitAttribute(mml,"children").length === m) { + var child = (mml.data.length === 1 && mml.data[0].inferred ? mml.data[0] : mml); + if (child && child.data[n] && child.data[n].collapsible) { + child.SetData(n,child.data[n].data[1]); + mml.complexity = child.complexity = null; mml.getComplexity(); + return 1; + } + } + return 0; + }, + + // + // Locate child node and return its text + // + FindChildText: function (mml,id) { + var child = this.FindChild(mml,id); + return (child ? (child.CoreMO()||child).data.join("") : "?"); + }, + FindChild: function (mml,id) { + if (mml) { + if (mml.attr && mml.attr["data-semantic-id"] === id) return mml; + if (!mml.isToken) { + for (var i = 0, m = mml.data.length; i < m; i++) { + var child = this.FindChild(mml.data[i],id); + if (child) return child; + } + } + } + return null; + }, + + // + // Split a data attribute at commas + // + SplitAttribute: function (mml,id) { + return (mml.attr["data-semantic-"+id]||"").split(/,/); + }, + + /*****************************************************************/ + /* + * These routines implement the collapsing of the various semantic types + */ + + // + // For fenced elements, if the contents are collapsed, + // collapse the fence instead. + // + Collapse_fenced: function (mml) { + this.UncollapseChild(mml,1); + if (mml.complexity > this.COLLAPSE.fenced) { + if (mml.attr["data-semantic-role"] === "leftright") { + var marker = mml.data[0].data.join("") + mml.data[mml.data.length-1].data.join(""); + mml = this.MakeAction(this.Marker(marker),mml); + } + } + return mml; + }, + + // + // Collapse function applications if the argument is collapsed + // (Handle role="limit function" a bit better?) + // + Collapse_appl: function (mml) { + if (this.UncollapseChild(mml,2,2)) { + var marker = this.MARKER.appl; + marker = marker[mml.attr["data-semantic-role"]] || marker.value; + mml = this.MakeAction(this.Marker(marker),mml); + } + return mml; + }, + + // + // For sqrt elements, if the contents are collapsed, + // collapse the sqrt instead. + // + Collapse_sqrt: function (mml) { + this.UncollapseChild(mml,0); + if (mml.complexity > this.COLLAPSE.sqrt) + mml = this.MakeAction(this.Marker(this.MARKER.sqrt),mml); + return mml; + }, + Collapse_root: function (mml) { + this.UncollapseChild(mml,0); + if (mml.complexity > this.COLLAPSE.sqrt) + mml = this.MakeAction(this.Marker(this.MARKER.sqrt),mml); + return mml; + }, + + // + // For enclose, include enclosure in collapsed child, if any + // + Collapse_enclose: function (mml) { + if (this.SplitAttribute(mml,"children").length === 1) { + var child = (mml.data.length === 1 && mml.data[0].inferred ? mml.data[0] : mml); + if (child.data[0] && child.data[0].collapsible) { + // + // Move menclose into the maction element + // + var maction = child.data[0]; + child.SetData(0,maction.data[1]); + maction.SetData(1,mml); + mml = maction; + } + } + return mml; + }, + + // + // For bigops, get the character to use from the largeop at its core. + // + Collapse_bigop: function (mml) { + if (mml.complexity > this.COLLAPSE.bigop || mml.data[0].type !== "mo") { + var id = this.SplitAttribute(mml,"content").pop(); + var op = Collapsible.FindChildText(mml,id); + mml = this.MakeAction(this.Marker(op),mml); + } + return mml; + }, + Collapse_integral: function (mml) { + if (mml.complexity > this.COLLAPSE.integral || mml.data[0].type !== "mo") { + var id = this.SplitAttribute(mml,"content")[0]; + var op = Collapsible.FindChildText(mml,id); + mml = this.MakeAction(this.Marker(op),mml); + } + return mml; + }, + + // + // For multirel and relseq, use proper symbol + // + Collapse_relseq: function (mml) { + if (mml.complexity > this.COLLAPSE.relseq) { + var content = this.SplitAttribute(mml,"content"); + var marker = Collapsible.FindChildText(mml,content[0]); + if (content.length > 1) marker += "\u22EF"; + mml = this.MakeAction(this.Marker(marker),mml); + } + return mml; + }, + Collapse_multirel: function (mml) { + if (mml.complexity > this.COLLAPSE.multirel) { + var content = this.SplitAttribute(mml,"content"); + var marker = Collapsible.FindChildText(mml,content[0]) + "\u22EF"; + mml = this.MakeAction(this.Marker(marker),mml); + } + return mml; + }, + + // + // Include super- and subscripts into a collapsed base + // + Collapse_superscript: function (mml) { + this.UncollapseChild(mml,0,2); + if (mml.complexity > this.COLLAPSE.superscript) + mml = this.MakeAction(this.Marker(this.MARKER.superscript),mml); + return mml; + }, + Collapse_subscript: function (mml) { + this.UncollapseChild(mml,0,2); + if (mml.complexity > this.COLLAPSE.subscript) + mml = this.MakeAction(this.Marker(this.MARKER.subscript),mml); + return mml; + }, + Collapse_subsup: function (mml) { + this.UncollapseChild(mml,0,3); + if (mml.complexity > this.COLLAPSE.subsup) + mml = this.MakeAction(this.Marker(this.MARKER.subsup),mml); + return mml; + } + }; + + HUB.Register.StartupHook("End Extensions", function () { + if (SETTINGS.collapsible == null) { + SETTINGS.collapsible = !Collapsible.config.disabled; + } else { + Collapsible.config.disabled = !SETTINGS.collapsible; + } + HUB.Register.StartupHook("MathMenu Ready", function () { + COOKIE = MathJax.Menu.cookie; + var Switch = function(menu) { + Collapsible[SETTINGS.collapsible ? "Enable" : "Disable"](true,true); + MathJax.Menu.saveCookie(); + }; + var ITEM = MathJax.Menu.ITEM, + MENU = MathJax.Menu.menu; + var menu = ITEM.CHECKBOX( + ['CollapsibleMath','Collapsible Math'], 'collapsible', {action: Switch} + ); + var submenu = (MENU.FindId('Accessibility')||{}).submenu, index; + if (submenu) { + index = submenu.IndexOfId('CollapsibleMath'); + if (index !== null) { + submenu.items[index] = menu; + } else { + submenu.items.push(ITEM.RULE(),menu); + } + } else { + index = MENU.IndexOfId('About'); + MENU.items.splice(index,0,menu,ITEM.RULE()); + } + },15); // before explorer extension + },15); + +})(MathJax.Hub); + + +/*****************************************************************/ +/* + * Add Collapse() and getComplexity() methods to the internal + * MathML elements, and override these in the elements that need + * special handling. + */ + +MathJax.Ajax.Require("[a11y]/semantic-enrich.js"); +MathJax.Hub.Register.StartupHook("Semantic Enrich Ready", function () { + var MML = MathJax.ElementJax.mml, + Collapsible = MathJax.Extension.collapsible, + COMPLEXITY = Collapsible.COMPLEXITY, + COMPLEXATTR = Collapsible.COMPLEXATTR; + + Collapsible.Startup(); // Initialize the collapsing process + + MML.mbase.Augment({ + // + // Just call the Collapse() method from the extension by default + // (but can be overridden) + // + Collapse: function () {return Collapsible.Collapse(this)}, + // + // If we don't have a cached complexity value, + // For token elements, just use the data length, + // Otherwise + // Add up the complexities of the (collapsed) children + // and add the child complexity based on the number of children + // Cache the complexity result + // return the complexity + // + getComplexity: function () { + if (this.complexity == null) { + var complexity = 0; + if (this.isToken) { + complexity = COMPLEXITY.TEXT * this.data.join("").length + COMPLEXITY.TOKEN; + } else { + for (var i = 0, m = this.data.length; i < m; i++) { + if (this.data[i]) { + this.SetData(i,this.data[i].Collapse()); + complexity += this.data[i].complexity; + } + } + if (m > 1) complexity += m * COMPLEXITY.CHILD; + } + if (this.attrNames && !("complexity" in this)) this.attrNames.push(COMPLEXATTR); + if (this.attr) this.attr[COMPLEXATTR] = complexity; + this.complexity = complexity; + } + return this.complexity; + }, + reportComplexity: function () { + if (this.attr && this.attrNames && !(COMPLEXATTR in this.attr)) { + this.attrNames.push(COMPLEXATTR); + this.attr[COMPLEXATTR] = this.complexity; + } + } + }); + + // + // For fractions, scale the complexity of the parts, and add + // a complexity for fractions. + // + MML.mfrac.Augment({ + getComplexity: function () { + if (this.complexity == null) { + this.SUPER(arguments).getComplexity.call(this); + this.complexity *= COMPLEXITY.SCRIPT; + this.complexity += COMPLEXITY.FRACTION; + this.attr[COMPLEXATTR] = this.complexity; + } + return this.complexity; + } + }); + + // + // Square roots add extra complexity + // + MML.msqrt.Augment({ + getComplexity: function () { + if (this.complexity == null) { + this.SUPER(arguments).getComplexity.call(this); + this.complexity += COMPLEXITY.SQRT; + this.attr[COMPLEXATTR] = this.complexity; + } + return this.complexity; + } + }); + MML.mroot.Augment({ + getComplexity: function () { + if (this.complexity == null) { + this.SUPER(arguments).getComplexity.call(this); + this.complexity -= (1-COMPLEXITY.SCRIPT) * this.data[1].getComplexity(); + this.complexity += COMPLEXITY.SQRT; + this.attr[COMPLEXATTR] = this.complexity; + } + return this.complexity; + } + }); + + // + // For msubsup, use the script complexity factor, + // take the maximum of the scripts, + // and add the sub-sup complexity + // + MML.msubsup.Augment({ + getComplexity: function () { + if (this.complexity == null) { + var C = 0; + if (this.data[this.sub]) C = this.data[this.sub].getComplexity() + COMPLEXITY.CHILD; + if (this.data[this.sup]) C = Math.max(this.data[this.sup].getComplexity(),C); + C *= COMPLEXITY.SCRIPT; + if (this.data[this.sub]) C += COMPLEXITY.CHILD; + if (this.data[this.sup]) C += COMPLEXITY.CHILD; + if (this.data[this.base]) C += this.data[this.base].getComplexity() + COMPLEXITY.CHILD; + this.complexity = C + COMPLEXITY.SUBSUP; + this.reportComplexity(); + } + return this.complexity; + } + }); + + // + // For munderover, use the script complexity factor, + // take the maximum of the scripts and the base, + // and add the under-over complexity + // + MML.munderover.Augment({ + getComplexity: function () { + if (this.complexity == null) { + var C = 0; + if (this.data[this.sub]) C = this.data[this.sub].getComplexity() + COMPLEXITY.CHILD; + if (this.data[this.sup]) C = Math.max(this.data[this.sup].getComplexity(),C); + C *= COMPLEXITY.SCRIPT; + if (this.data[this.base]) C = Math.max(this.data[this.base].getComplexity(),C); + if (this.data[this.sub]) C += COMPLEXITY.CHILD; + if (this.data[this.sup]) C += COMPLEXITY.CHILD; + if (this.data[this.base]) C += COMPLEXITY.CHILD; + this.complexity = C + COMPLEXITY.UNDEROVER; + this.reportComplexity(); + } + return this.complexity; + } + }); + + // + // For mphantom, complexity is 0? + // + MML.mphantom.Augment({ + getComplexity: function () { + this.complexity = COMPLEXITY.PHANTOM; + this.reportComplexity(); + return this.complexity; + } + }); + + // + // For ms, add width of quotes. Don't cache the result, since + // mstyle above it could affect the result. + // + MML.ms.Augment({ + getComplexity: function () { + this.SUPER(arguments).getComplexity.call(this); + this.complexity += this.Get("lquote").length * COMPLEXITY.TEXT; + this.complexity += this.Get("rquote").length * COMPLEXITY.TEXT; + this.attr[COMPLEXATTR] = this.complexity; + return this.complexity; + } + }); + +// ### FIXME: getComplexity special cases: +// mtable, mfenced, mmultiscript + + // + // For menclose, complexity goes up by a fixed amount + // + MML.menclose.Augment({ + getComplexity: function () { + if (this.complexity == null) { + this.SUPER(arguments).getComplexity.call(this); + this.complexity += COMPLEXITY.ACTION; + this.attr[COMPLEXATTR] = this.complexity; + } + return this.complexity; + } + }); + + // + // For maction, complexity is complexity of selected element + // + MML.maction.Augment({ + getComplexity: function () { + // + // Don't cache it, since selection can change. + // + this.complexity = (this.collapsible ? this.data[0] : this.selected()).getComplexity(); + this.reportComplexity(); + return this.complexity; + } + }); + + // + // For semantics, complexity is complexity of first child + // + MML.semantics.Augment({ + getComplexity: function () { + if (this.complexity == null) { + this.complexity = (this.data[0] ? this.data[0].getComplexity() : 0); + this.reportComplexity(); + } + return this.complexity; + } + }); + + // + // Use fixed complexity, since we can't really measure it + // + MML["annotation-xml"].Augment({ + getComplexity: function () { + this.complexity = COMPLEXITY.XML; + this.reportComplexity(); + return this.complexity; + } + }); + MML.annotation.Augment({ + getComplexity: function () { + this.complexity = COMPLEXITY.XML; + this.reportComplexity(); + return this.complexity; + } + }); + + // + // Use fixed complexity, since we can't really measure it + // + MML.mglyph.Augment({ + getComplexity: function () { + this.complexity = COMPLEXITY.GLYPH; + this.reportComplexity(); + return this.complexity; + } + }); + + // + // Signal that we are ready + // + MathJax.Hub.Startup.signal.Post("Collapsible Ready"); + MathJax.Ajax.loadComplete("[a11y]/collapsible.js"); +}); + +// @license-end diff --git a/js/mathjax/extensions/a11y/explorer.js b/js/mathjax/extensions/a11y/explorer.js new file mode 100644 index 0000000..bba3edd --- /dev/null +++ b/js/mathjax/extensions/a11y/explorer.js @@ -0,0 +1,827 @@ +// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0 +/************************************************************* + * + * [Contrib]/a11y/explorer.js + * + * Implements expression exploration via the SRE explorer. + * + * --------------------------------------------------------------------- + * + * Copyright (c) 2016-2017 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Hub.Register.StartupHook('Sre Ready', function() { + var FALSE, KEY; + var SETTINGS = MathJax.Hub.config.menuSettings; + var COOKIE = {}; // replaced when menu is available + + MathJax.Hub.Register.StartupHook('MathEvents Ready', function() { + FALSE = MathJax.Extension.MathEvents.Event.False; + KEY = MathJax.Extension.MathEvents.Event.KEY; + }); + + var Assistive = MathJax.Extension.explorer = { + version: '1.6.0', + dependents: [], // the extensions that depend on this one + // + // Default configurations. + // + defaults: { + walker: 'table', + highlight: 'none', + background: 'blue', + foreground: 'black', + speech: true, + generation: 'lazy', + subtitle: false, + ruleset: 'mathspeak-default' + }, + eagerComplexity: 80, + prefix: 'Assistive-', + hook: null, + locHook: null, + oldrules: null, + addMenuOption: function(key, value) { + SETTINGS[Assistive.prefix + key] = value; + }, + + addDefaults: function() { + var defaults = MathJax.Hub.CombineConfig('explorer', Assistive.defaults); + var keys = Object.keys(defaults); + for (var i = 0, key; key = keys[i]; i++) { + if (typeof(SETTINGS[Assistive.prefix + key]) === 'undefined') { + Assistive.addMenuOption(key, defaults[key]); + } + } + Assistive.setSpeechOption(); + Explorer.Reset(); + }, + + setOption: function(key, value) { + if (SETTINGS[Assistive.prefix + key] === value) return; + Assistive.addMenuOption(key, value); + Explorer.Reset(); + }, + + getOption: function(key) { + return SETTINGS[Assistive.prefix + key]; + }, + + speechOption: function(msg) { + if (Assistive.oldrules === msg.value) return; + Assistive.setSpeechOption(); + Explorer.Regenerate(); + }, + + setSpeechOption: function() { + var ruleset = SETTINGS[Assistive.prefix + 'ruleset']; + var cstr = ruleset.split('-'); + sre.System.getInstance().setupEngine({ + locale: MathJax.Localization.locale, + domain: Assistive.Domain(cstr[0]), + style: cstr[1] + }); + Assistive.oldrules = ruleset; + }, + + Domain: function(domain) { + switch (domain) { + case 'chromevox': + return 'default'; + case 'clearspeak': + return 'clearspeak'; + case 'mathspeak': + default: + return 'mathspeak'; + } + }, + + hook: null, + locHook: null, + Enable: function(update, menu) { + SETTINGS.explorer = true; + if (menu) COOKIE.explorer = true; + MathJax.Extension.collapsible.Enable(false, menu); + if (MathJax.Extension.AssistiveMML) { + MathJax.Extension.AssistiveMML.config.disabled = true; + SETTINGS.assistiveMML = false; + if (menu) COOKIE.assistiveMML = false; + } + this.DisableMenus(false); + if (!this.hook) { + this.hook = MathJax.Hub.Register.MessageHook( + 'New Math', ['Register', this.Explorer]); + } + if (!this.locHook) { + this.locHook = MathJax.Hub.Register.MessageHook( + 'Locale Reset', ['RemoveSpeech', this.Explorer]); + } + if (update) MathJax.Hub.Queue(['Reprocess', MathJax.Hub]); + }, + Disable: function(update, menu) { + SETTINGS.explorer = false; + if (menu) COOKIE.explorer = false; + this.DisableMenus(true); + if (this.hook) { + MathJax.Hub.UnRegister.MessageHook(this.hook); + this.hook = null; + } + for (var i = this.dependents.length - 1; i >= 0; i--) { + var dependent = this.dependents[i]; + if (dependent.Disable) dependent.Disable(false, menu); + } + // Reprocess on update? I don't think it is necessary + // (now that we check for being enabled in the event handlers) + }, + DisableMenus: function(state) { + if (MathJax.Menu) { + var menu = MathJax.Menu.menu.FindId('Accessibility', 'Explorer'); + if (menu) { + menu = menu.submenu; + var items = menu.items; + for (var i = 2, item; item = items[i]; i++) item.disabled = state; + if (!state && menu.FindId('SpeechOutput') && !SETTINGS[Assistive.prefix + 'speech']) { + menu.FindId('Subtitles').disabled = true; + } + } + } + }, + // + // Register a dependent + // + Dependent: function(extension) { + this.dependents.push(extension); + } + }; + + var LiveRegion = MathJax.Object.Subclass({ + div: null, + inner: null, + Init: function() { + this.div = LiveRegion.Create('assertive'); + this.inner = MathJax.HTML.addElement(this.div, 'div'); + }, + // + // Adds the speech div. + // + Add: function() { + if (LiveRegion.added) return; + document.body.appendChild(this.div); + LiveRegion.added = true; + }, + // + // Shows the live region as a subtitle of a node. + // + Show: function(node, highlighter) { + this.div.classList.add('MJX_LiveRegion_Show'); + var rect = node.getBoundingClientRect(); + var bot = rect.bottom + 10 + window.pageYOffset; + var left = rect.left + window.pageXOffset; + this.div.style.top = bot + 'px'; + this.div.style.left = left + 'px'; + var color = highlighter.colorString(); + this.inner.style.backgroundColor = color.background; + this.inner.style.color = color.foreground; + }, + // + // Takes the live region out of the page flow. + // + Hide: function(node) { + this.div.classList.remove('MJX_LiveRegion_Show'); + }, + // + // Clears the speech div. + // + Clear: function() { + this.Update(''); + this.inner.style.top = ''; + this.inner.style.backgroundColor = ''; + }, + // + // Speaks a string by poking it into the speech div. + // + Update: function(speech) { + if (Assistive.getOption('speech')) { + LiveRegion.Update(this.inner, speech); + } + } + }, { + ANNOUNCE: 'Navigatable Math in page. Explore with enter or shift space and arrow' + + ' keys. Expand or collapse elements hitting enter.', + announced: false, + added: false, + styles: {'.MJX_LiveRegion': + { + position: 'absolute', top: '0', height: '1px', width: '1px', + padding: '1px', overflow: 'hidden' + }, + '.MJX_LiveRegion_Show': + { + top: '0', position: 'absolute', width: 'auto', height: 'auto', + padding: '0px 0px', opacity: 1, 'z-index': '202', + left: 0, right: 0, 'margin': '0 auto', + 'background-color': 'white', 'box-shadow': '0px 10px 20px #888', + border: '2px solid #CCCCCC' + } + }, + // + // Creates a live region with a particular type. + // + Create: function(type) { + var element = MathJax.HTML.Element( + 'div', {className: 'MJX_LiveRegion'}); + element.setAttribute('aria-live', type); + return element; + }, + // + // Updates a live region's text content. + // + Update: MathJax.Hub.Browser.isPC ? + function(div, speech) { + div.textContent = ''; + setTimeout(function() {div.textContent = speech;}, 100); + } : function(div, speech) { + div.textContent = ''; + div.textContent = speech; + }, + // + // Speaks the announce string. + // + Announce: function() { + if (!Assistive.getOption('speech')) return; + LiveRegion.announced = true; + MathJax.Ajax.Styles(LiveRegion.styles); + var div = LiveRegion.Create('polite'); + document.body.appendChild(div); + LiveRegion.Update(div, LiveRegion.ANNOUNCE); + setTimeout(function() {document.body.removeChild(div);}, 1000); + } + }); + MathJax.Extension.explorer.LiveRegion = LiveRegion; + + var A11Y_PATH = MathJax.Ajax.fileURL(MathJax.Ajax.config.path.a11y); + + var Explorer = MathJax.Extension.explorer.Explorer = { + liveRegion: LiveRegion(), + walker: null, + highlighter: null, + hoverer: null, + flamer: null, + speechDiv: null, + earconFile: A11Y_PATH + '/invalid_keypress' + + (['Firefox', 'Chrome', 'Opera'].indexOf(MathJax.Hub.Browser.name) !== -1 ? + '.ogg' : '.mp3'), + expanded: false, + focusoutEvent: MathJax.Hub.Browser.isFirefox ? 'blur' : 'focusout', + focusinEvent: 'focus', + ignoreFocusOut: false, + jaxCache: {}, + messageID: null, + // + // Resets the explorer, rerunning methods not triggered by events. + // + Reset: function() { + Explorer.FlameEnriched(); + }, + // + // Registers new Maths and adds a key event if it is enriched. + // + Register: function(msg) { + if (!Assistive.hook) return; + var script = document.getElementById(msg[1]); + if (script && script.id) { + var jax = MathJax.Hub.getJaxFor(script.id); + if (jax && jax.enriched) { + Explorer.StateChange(script.id, jax); + Explorer.liveRegion.Add(); + Explorer.AddEvent(script); + } + } + }, + StateChange: function(id, jax) { + Explorer.GetHighlighter(.2); + var oldJax = Explorer.jaxCache[id]; + if (oldJax && oldJax === jax.root) return; + if (oldJax) { + sre.Walker.resetState(id + '-Frame'); + } + Explorer.jaxCache[id] = jax.root; + }, + // + // Adds Aria attributes. + // + AddAria: function(math) { + math.setAttribute('role', 'application'); + math.setAttribute('aria-label', 'Math'); + }, + // + // Add hook to run at End Math to restart walking on an expansion element. + // + AddHook: function(jax) { + Explorer.RemoveHook(); + Explorer.hook = MathJax.Hub.Register.MessageHook( + 'End Math', function(message) { + var newid = message[1].id + '-Frame'; + var math = document.getElementById(newid); + if (jax && newid === Explorer.expanded) { + Explorer.ActivateWalker(math, jax); + math.focus(); + Explorer.expanded = false; + } + }); + }, + // + // Remove and unregister the explorer hook. + // + RemoveHook: function() { + if (Explorer.hook) { + MathJax.Hub.UnRegister.MessageHook(Explorer.hook); + Explorer.hook = null; + } + }, + AddMessage: function() { + return MathJax.Message.Set('Generating Speech Output'); + }, + RemoveMessage: function(id) { + if (id) MathJax.Message.Clear(id); + }, + // + // Adds a key event to an enriched jax. + // + AddEvent: function(script) { + var id = script.id + '-Frame'; + var sibling = script.previousSibling; + if (!sibling) return; + var math = sibling.id !== id ? sibling.firstElementChild : sibling; + Explorer.AddAria(math); + Explorer.AddMouseEvents(math); + if (math.className === 'MathJax_MathML') { + math = math.firstElementChild; + } + if (!math) return; + math.onkeydown = Explorer.Keydown; + Explorer.Flame(math); + math.addEventListener( + Explorer.focusinEvent, + function(event) { + if (!Assistive.hook) return; + if (!LiveRegion.announced) LiveRegion.Announce(); + }); + math.addEventListener( + Explorer.focusoutEvent, + function(event) { + if (!Assistive.hook) return; + // A fix for Edge. + if (Explorer.ignoreFocusOut) { + Explorer.ignoreFocusOut = false; + if (Explorer.walker.moved === 'enter') { + event.target.focus(); + return; + } + } + if (Explorer.walker) Explorer.DeactivateWalker(); + }); + // + if (Assistive.getOption('speech')) { + Explorer.AddSpeech(math); + } + // + }, + // + // Add speech output. + // + AddSpeech: function(math) { + var id = math.id; + var jax = MathJax.Hub.getJaxFor(id); + var mathml = jax.root.toMathML(); + if (!math.getAttribute('haslabel')) { + Explorer.AddMathLabel(mathml, id); + } + if (math.getAttribute('hasspeech')) return; + switch (MathJax.Hub.config.explorer.generation) { + case 'eager': + Explorer.AddSpeechEager(mathml, id); + break; + case 'mixed': + var complexity = math.querySelectorAll('[data-semantic-complexity]'); + if (complexity.length >= Assistive.eagerComplexity) { + Explorer.AddSpeechEager(mathml, id); + } + break; + case 'lazy': + default: + break; + } + }, + AddSpeechLazy: function(math) { + var generator = new sre.TreeSpeechGenerator(); + generator.setRebuilt(Explorer.walker.getRebuilt()); + generator.getSpeech(Explorer.walker.rootNode, Explorer.walker.getXml()); + math.setAttribute('hasspeech', 'true'); + }, + // + // + // Adds speech strings to the node using a web worker. + // + AddSpeechEager: function(mathml, id) { + Explorer.MakeSpeechTask( + mathml, id, sre.TreeSpeechGenerator, + function(math, speech) {math.setAttribute('hasspeech', 'true');}, 5); + }, + // + // Attaches the Math expression as an aria label. + // + AddMathLabel: function(mathml, id) { + Explorer.MakeSpeechTask( + mathml, id, sre.SummarySpeechGenerator, + function(math, speech) { + math.setAttribute('haslabel', 'true'); + math.setAttribute('aria-label', speech);}, + 5); + }, + // + // The actual speech task generator. + // + MakeSpeechTask: function(mathml, id, constructor, onSpeech, time) { + var messageID = Explorer.AddMessage(); + setTimeout(function() { + var speechGenerator = new constructor(); + var math = document.getElementById(id); + var dummy = new sre.DummyWalker( + math, speechGenerator, Explorer.highlighter, mathml); + var speech = dummy.speech(); + if (speech) { + onSpeech(math, speech); + } + Explorer.RemoveMessage(messageID); + }, time); + }, + // + // Event execution on keydown. Subsumes the same method of MathEvents. + // + Keydown: function(event) { + var code = event.keyCode; + if (code === KEY.ESCAPE) { + if (!Explorer.walker) return; + Explorer.RemoveHook(); + Explorer.DeactivateWalker(); + FALSE(event); + return; + } + // If walker is active we redirect there. + if (Explorer.walker && Explorer.walker.isActive()) { + // Maps the return key to dash for SRE v3. + code = code === KEY.RETURN ? KEY.DASH : code; + if (typeof(Explorer.walker.modifier) !== 'undefined') { + Explorer.walker.modifier = event.shiftKey; + } + var move = Explorer.walker.move(code); + if (move === null) return; + if (move) { + if (Explorer.walker.moved === 'expand') { + Explorer.expanded = Explorer.walker.node.id; + // This sometimes blurs in Edge and sometimes it does not. + if (MathJax.Hub.Browser.isEdge) { + Explorer.ignoreFocusOut = true; + Explorer.DeactivateWalker(); + return; + } + // This does not blur in FF, IE. + if (MathJax.Hub.Browser.isFirefox || MathJax.Hub.Browser.isMSIE) { + Explorer.DeactivateWalker(); + return; + } + } + Explorer.liveRegion.Update(Explorer.walker.speech()); + Explorer.Highlight(); + } else { + Explorer.PlayEarcon(); + } + FALSE(event); + return; + } + var math = event.target; + if (code === KEY.SPACE && !event.shiftKey) { + MathJax.Extension.MathEvents.Event.ContextMenu(event, math); + FALSE(event); + return; + } + if (Assistive.hook && (code === KEY.RETURN || + (code === KEY.SPACE && event.shiftKey))) { + var jax = MathJax.Hub.getJaxFor(math); + Explorer.ActivateWalker(math, jax); + Explorer.AddHook(jax); + FALSE(event); + return; + } + }, + GetHighlighter: function(alpha) { + Explorer.highlighter = sre.HighlighterFactory.highlighter( + {color: Assistive.getOption('background'), alpha: alpha}, + {color: Assistive.getOption('foreground'), alpha: 1}, + {renderer: MathJax.Hub.outputJax['jax/mml'][0].id, + browser: MathJax.Hub.Browser.name} + ); + }, + // + // Adds mouse events to maction items in an enriched jax. + // + AddMouseEvents: function(node) { + sre.HighlighterFactory.addEvents( + node, + {'mouseover': Explorer.MouseOver, + 'mouseout': Explorer.MouseOut}, + {renderer: MathJax.Hub.outputJax['jax/mml'][0].id, + browser: MathJax.Hub.Browser.name} + ); + }, + MouseOver: function(event) { + if (Assistive.getOption('highlight') === 'none') return; + if (Assistive.getOption('highlight') === 'hover') { + var frame = event.currentTarget; + Explorer.GetHighlighter(.1); + Explorer.highlighter.highlight([frame]); + Explorer.hoverer = true; + } + FALSE(event); + }, + MouseOut: function(event) { + if (Explorer.hoverer) { + Explorer.highlighter.unhighlight(); + Explorer.hoverer = false; + } + return FALSE(event); + }, + // + // Activates Flaming + // + Flame: function(node) { + if (Assistive.getOption('highlight') === 'flame') { + Explorer.GetHighlighter(.05); + Explorer.highlighter.highlightAll(node); + Explorer.flamer = true; + return; + } + }, + UnFlame: function() { + if (Explorer.flamer) { + Explorer.highlighter.unhighlightAll(); + Explorer.flamer = null; + } + }, + FlameEnriched: function() { + Explorer.UnFlame(); + for (var i = 0, all = MathJax.Hub.getAllJax(), jax; jax = all[i]; i++) { + Explorer.Flame(jax.SourceElement().previousSibling); + } + }, + // + // Activates the walker. + // + Walkers: { + 'syntactic': sre.SyntaxWalker, + 'table': sre.TableWalker, + 'semantic': sre.SemanticWalker, + 'none': sre.DummyWalker + }, + ActivateWalker: function(math, jax) { + var speechOn = Assistive.getOption('speech'); + var constructor = Assistive.getOption('walker') ? + Explorer.Walkers[MathJax.Hub.config.explorer.walker] : + Explorer.Walkers['none']; + var speechGenerator = speechOn ? new sre.DirectSpeechGenerator() : + new sre.DummySpeechGenerator(); + var options = sre.System.getInstance().engineSetup(); + speechGenerator.setOptions({ + locale: options.locale, domain: options.domain, + style: options.style, modality: 'speech'}); + Explorer.GetHighlighter(.2); + Explorer.walker = new constructor( + math, speechGenerator, Explorer.highlighter, jax.root.toMathML()); + if (speechOn && !math.getAttribute('hasspeech')) { + Explorer.AddSpeechLazy(math); + } + Explorer.walker.activate(); + if (speechOn) { + if (Assistive.getOption('subtitle')) { + Explorer.liveRegion.Show(math, Explorer.highlighter); + } + Explorer.liveRegion.Update(Explorer.walker.speech()); + } + Explorer.Highlight(); + // A fix for Edge. + if (Explorer.ignoreFocusOut) { + setTimeout(function() {Explorer.ignoreFocusOut = false;}, 500); + } + }, + // + // Deactivates the walker. + // + DeactivateWalker: function() { + var setup = sre.System.getInstance().engineSetup(); + var domain = setup.domain; + var style = domain === 'clearspeak' ? 'default' : setup.style; + Assistive.setOption('ruleset', setup.domain + '-' + style); + Explorer.liveRegion.Clear(); + Explorer.liveRegion.Hide(); + Explorer.Unhighlight(); + Explorer.currentHighlight = null; + Explorer.walker.deactivate(); + Explorer.walker = null; + }, + // + // Highlights the focused nodes. + // + Highlight: function() { + Explorer.Unhighlight(); + Explorer.highlighter.highlight(Explorer.walker.getFocus().getNodes()); + }, + // + // Unhighlights the old nodes. + // + Unhighlight: function() { + Explorer.highlighter.unhighlight(); + }, + // + // Plays the earcon. + // + // Every time we make new Audio element, as some browsers do not allow to + // play audio elements more than once (e.g., Safari). + // + PlayEarcon: function() { + var audio = new Audio(Explorer.earconFile); + audio.play(); + }, + // + // Toggle speech output. + // + SpeechOutput: function() { + Explorer.Reset(); + var speechItems = ['Subtitles']; + speechItems.forEach( + function(x) { + var item = MathJax.Menu.menu.FindId('Accessibility', 'Explorer', x); + if (item) { + item.disabled = !item.disabled; + }}); + Explorer.Regenerate(); + }, + // + // Remove speech and resets SRE options. + // + RemoveSpeech: function() { + Assistive.setSpeechOption(); + for (var i = 0, all = MathJax.Hub.getAllJax(), jax; jax = all[i]; i++) { + var math = document.getElementById(jax.inputID + '-Frame'); + if (math) { + math.removeAttribute('hasspeech'); + math.removeAttribute('haslabel'); + } + } + }, + // + // Regenerates speech. + // + Regenerate: function() { + for (var i = 0, all = MathJax.Hub.getAllJax(), jax; jax = all[i]; i++) { + var math = document.getElementById(jax.inputID + '-Frame'); + if (math) { + math.removeAttribute('hasspeech'); + Explorer.AddSpeech(math); + } + } + }, + Startup: function() { + var Collapsible = MathJax.Extension.collapsible; + if (Collapsible) Collapsible.Dependent(Assistive); + Assistive.addDefaults(); + } + }; + + MathJax.Hub.Register.StartupHook('End Extensions', function() { + Assistive[SETTINGS.explorer === false ? 'Disable' : 'Enable'](); + MathJax.Hub.Startup.signal.Post('Explorer Ready'); + MathJax.Hub.Register.StartupHook('MathMenu Ready', function() { + COOKIE = MathJax.Menu.cookie; + var Switch = function(menu) { + Assistive[SETTINGS.explorer ? 'Enable' : 'Disable'](true, true); + MathJax.Menu.saveCookie(); + }; + var ITEM = MathJax.Menu.ITEM, + MENU = MathJax.Menu.menu; + var reset = {action: Explorer.Reset}; + var speech = {action: Assistive.speechOption}; + var explorerMenu = + ITEM.SUBMENU(['Explorer', 'Explorer'], + ITEM.CHECKBOX(['Active', 'Active'], 'explorer', {action: Switch}), + ITEM.RULE(), + ITEM.CHECKBOX(['Walker', 'Walker'], 'Assistive-walker'), + ITEM.SUBMENU(['Highlight', 'Highlight'], + ITEM.RADIO(['none', 'None'], 'Assistive-highlight', reset), + ITEM.RADIO(['hover', 'Hover'], 'Assistive-highlight', reset), + ITEM.RADIO(['flame', 'Flame'], 'Assistive-highlight', reset) + ), + ITEM.SUBMENU(['Background', 'Background'], + ITEM.RADIO(['blue', 'Blue'], 'Assistive-background', reset), + ITEM.RADIO(['red', 'Red'], 'Assistive-background', reset), + ITEM.RADIO(['green', 'Green'], 'Assistive-background', reset), + ITEM.RADIO(['yellow', 'Yellow'], 'Assistive-background', reset), + ITEM.RADIO(['cyan', 'Cyan'], 'Assistive-background', reset), + ITEM.RADIO(['magenta', 'Magenta'], 'Assistive-background', reset), + ITEM.RADIO(['white', 'White'], 'Assistive-background', reset), + ITEM.RADIO(['black', 'Black'], 'Assistive-background', reset) + ), + ITEM.SUBMENU(['Foreground', 'Foreground'], + ITEM.RADIO(['black', 'Black'], 'Assistive-foreground', reset), + ITEM.RADIO(['white', 'White'], 'Assistive-foreground', reset), + ITEM.RADIO(['magenta', 'Magenta'], 'Assistive-foreground', reset), + ITEM.RADIO(['cyan', 'Cyan'], 'Assistive-foreground', reset), + ITEM.RADIO(['yellow', 'Yellow'], 'Assistive-foreground', reset), + ITEM.RADIO(['green', 'Green'], 'Assistive-foreground', reset), + ITEM.RADIO(['red', 'Red'], 'Assistive-foreground', reset), + ITEM.RADIO(['blue', 'Blue'], 'Assistive-foreground', reset) + ), + ITEM.RULE(), + ITEM.CHECKBOX(['SpeechOutput', 'Speech Output'], + 'Assistive-speech', {action: Explorer.SpeechOutput}), + ITEM.CHECKBOX(['Subtitles', 'Subtitles'], 'Assistive-subtitle', + {disabled: !SETTINGS['Assistive-speech']}), + ITEM.RULE(), + ITEM.SUBMENU(['Mathspeak', 'Mathspeak Rules'], + ITEM.RADIO(['mathspeak-default', 'Verbose'], + 'Assistive-ruleset', speech), + ITEM.RADIO(['mathspeak-brief', 'Brief'], 'Assistive-ruleset', speech), + ITEM.RADIO(['mathspeak-sbrief', 'Superbrief'], + 'Assistive-ruleset', speech) + ), + ITEM.RADIO(['clearspeak-default', 'Clearspeak Rules'], + 'Assistive-ruleset', speech), + ITEM.SUBMENU(['Chromevox', 'ChromeVox Rules'], + ITEM.RADIO(['chromevox-default', 'Verbose'], + 'Assistive-ruleset', speech), + ITEM.RADIO(['chromevox-alternative', 'Alternative'], + 'Assistive-ruleset', speech) + ) + ); + var submenu = (MENU.FindId('Accessibility') || {}).submenu, index; + if (submenu) { + index = submenu.IndexOfId('Explorer'); + if (index !== null) { + submenu.items[index] = explorerMenu; + } else { + index = submenu.IndexOfId('CollapsibleMath'); + submenu.items.splice(index + 1, 0, explorerMenu); + } + } else { + index = MENU.IndexOfId('CollapsibleMath'); + MENU.items.splice(index + 1, 0, explorerMenu); + } + if (!SETTINGS.explorer) Assistive.DisableMenus(true); + },20); // Between collapsible and auto-collapse extensions + },20); + +}); + +// +// Patch problem with SVG getJaxForMath when used from explorer +// (can be removed after the next release of MathJax). +// +MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { + MathJax.Hub.Config({SVG: {addMMLclasses: true}}); + var SVG = MathJax.OutputJax.SVG; + if (parseFloat(SVG.version) < 2.7) { + var JAXFROMMATH = SVG.getJaxFromMath; + SVG.Augment({ + getJaxFromMath: function (math) { + if (math.parentNode.className.match(/MathJax_SVG_Display/)) math = math.parentNode; + return JAXFROMMATH.call(this,math); + } + }); + } +}); + +// +// Set up the a11y path,if it isn't already in place +// +if (!MathJax.Ajax.config.path.a11y) { + MathJax.Ajax.config.path.a11y = MathJax.Hub.config.root + "/extensions/a11y"; +} + +MathJax.Ajax.Require('[a11y]/collapsible.js'); +MathJax.Hub.Register.StartupHook('Collapsible Ready', function() { + MathJax.Extension.explorer.Explorer.Startup(); + MathJax.Ajax.loadComplete('[a11y]/explorer.js'); +}); +// @license-end diff --git a/js/mathjax/extensions/a11y/invalid_keypress.mp3 b/js/mathjax/extensions/a11y/invalid_keypress.mp3 new file mode 100644 index 0000000..cba44de Binary files /dev/null and b/js/mathjax/extensions/a11y/invalid_keypress.mp3 differ diff --git a/js/mathjax/extensions/a11y/invalid_keypress.ogg b/js/mathjax/extensions/a11y/invalid_keypress.ogg new file mode 100644 index 0000000..292cefd Binary files /dev/null and b/js/mathjax/extensions/a11y/invalid_keypress.ogg differ diff --git a/js/mathjax/extensions/a11y/mathjax-sre.js b/js/mathjax/extensions/a11y/mathjax-sre.js new file mode 100644 index 0000000..6984f72 --- /dev/null +++ b/js/mathjax/extensions/a11y/mathjax-sre.js @@ -0,0 +1,1633 @@ +// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7dn=apache-2.0.txt Apache-2.0 +// Copyright 2014-2019 Volker Sorge +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +/* + + Copyright The Closure Library Authors. + SPDX-License-Identifier: Apache-2.0 +*/ +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return bb||1342177279>>=1)c+=c;return d}},"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=this||self; +goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b}; +goog.define=function(a,b){if(!COMPILED){var c=goog.global.CLOSURE_UNCOMPILED_DEFINES,d=goog.global.CLOSURE_DEFINES;c&&void 0===c.nodeType&&Object.prototype.hasOwnProperty.call(c,a)?b=c[a]:d&&void 0===d.nodeType&&Object.prototype.hasOwnProperty.call(d,a)&&(b=d[a])}return b};goog.FEATURESET_YEAR=2012;goog.DEBUG=!0;goog.LOCALE="en";goog.TRUSTED_SITE=!0;goog.STRICT_MODE_COMPATIBLE=!1;goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG;goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1; +goog.provide=function(a){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");if(!COMPILED&&goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');goog.constructNamespace_(a)};goog.constructNamespace_=function(a,b){if(!COMPILED){delete goog.implicitNamespaces_[a];for(var c=a;(c=c.substring(0,c.lastIndexOf(".")))&&!goog.getObjectByName(c);)goog.implicitNamespaces_[c]=!0}goog.exportPath_(a,b)}; +goog.getScriptNonce=function(a){if(a&&a!=goog.global)return goog.getScriptNonce_(a.document);null===goog.cspNonce_&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document));return goog.cspNonce_};goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/;goog.cspNonce_=null;goog.getScriptNonce_=function(a){return(a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(a)?a:""};goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/; +goog.module=function(a){if("string"!==typeof a||!a||-1==a.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+a+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide."); +if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=a;if(!COMPILED){if(goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');delete goog.implicitNamespaces_[a]}};goog.module.get=function(a){return goog.module.getInternal_(a)}; +goog.module.getInternal_=function(a){if(!COMPILED){if(a in goog.loadedModules_)return goog.loadedModules_[a].exports;if(!goog.implicitNamespaces_[a])return a=goog.getObjectByName(a),null!=a?a:null}return null};goog.ModuleType={ES6:"es6",GOOG:"goog"};goog.moduleLoaderState_=null;goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()};goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG}; +goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var a=goog.global.$jscomp;return a?"function"!=typeof a.getCurrentModulePath?!1:!!a.getCurrentModulePath():!1}; +goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInGoogModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0}; +goog.declareModuleId=function(a){if(!COMPILED){if(!goog.isInEs6ModuleLoader_())throw Error("goog.declareModuleId may only be called from within an ES6 module");if(goog.moduleLoaderState_&&goog.moduleLoaderState_.moduleName)throw Error("goog.declareModuleId may only be called once per module.");if(a in goog.loadedModules_)throw Error('Module with namespace "'+a+'" already exists.');}if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=a;else{var b=goog.global.$jscomp;if(!b||"function"!=typeof b.getCurrentModulePath)throw Error('Module with namespace "'+ +a+'" has been loaded incorrectly.');b=b.require(b.getCurrentModulePath());goog.loadedModules_[a]={exports:b,type:goog.ModuleType.ES6,moduleId:a}}};goog.setTestOnly=function(a){if(goog.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error("Importing test-only code into non-debug environment"+(a?": "+a:"."));};goog.forwardDeclare=function(a){};COMPILED||(goog.isProvided_=function(a){return a in goog.loadedModules_||!goog.implicitNamespaces_[a]&&null!=goog.getObjectByName(a)},goog.implicitNamespaces_={"goog.module":!0}); +goog.getObjectByName=function(a,b){a=a.split(".");b=b||goog.global;for(var c=0;c>>0);goog.uidCounter_=0;goog.getHashCode=goog.getUid;goog.removeHashCode=goog.removeUid; +goog.cloneObject=function(a){var b=goog.typeOf(a);if("object"==b||"array"==b){if("function"===typeof a.clone)return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=goog.cloneObject(a[c]);return b}return a};goog.bindNative_=function(a,b,c){return a.call.apply(a.bind,arguments)}; +goog.bindJs_=function(a,b,c){if(!a)throw Error();if(2{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')}); +a("es7",function(){return b("2 ** 2 == 4")});a("es8",function(){return b("async () => 1, true")});a("es9",function(){return b("({...rest} = {}), true")});a("es_next",function(){return!1});return{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(a,b){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var c=this.createRequiresTranspilation_();this.requiresTranspilation_=c.map;this.transpilationTarget_=this.transpilationTarget_|| +c.target}if(a in this.requiresTranspilation_)return this.requiresTranspilation_[a]?!0:!goog.inHtmlDocument_()||"es6"!=b||"noModule"in goog.global.document.createElement("script")?!1:!0;throw Error("Unknown language mode: "+a);},goog.Transpiler.prototype.transpile=function(a,b){return goog.transpile_(a,b,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(a){return a.replace(/<\/(SCRIPT)/ig,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={}; +this.idToPath_={};this.written_={};this.loadingDeps_=[];this.depsToLoad_=[];this.paused_=!1;this.factory_=new goog.DependencyFactory(goog.transpiler_);this.deferredCallbacks_={};this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(a,b){function c(){d&&(goog.global.setTimeout(d,0),d=null)}var d=b;if(a.length){b=[];for(var e=0;e\x3c/script>";b.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(d):d)}else{var e=b.createElement("script");e.defer=goog.Dependency.defer_;e.async=!1;e.type="text/javascript";(d=goog.getScriptNonce())&&e.setAttribute("nonce",d);goog.DebugLoader_.IS_OLD_IE_? +(a.pause(),e.onreadystatechange=function(){if("loaded"==e.readyState||"complete"==e.readyState)a.loaded(),a.resume()}):e.onload=function(){e.onload=null;a.loaded()};e.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path;b.head.appendChild(e)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."), +a.loaded()):a.pause()},goog.Es6ModuleDependency=function(a,b,c,d,e){goog.Dependency.call(this,a,b,c,d,e)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(a){function b(l,m){l=m?'");return a};sre.ColorPicker=function(a,b){this.foreground=sre.ColorPicker.getChannelColor_(b,sre.ColorPicker.DEFAULT_FOREGROUND_);this.background=sre.ColorPicker.getChannelColor_(a,sre.ColorPicker.DEFAULT_BACKGROUND_)};sre.ColorPicker.DEFAULT_BACKGROUND_="blue";sre.ColorPicker.DEFAULT_FOREGROUND_="black"; +sre.ColorPicker.namedColors_={red:{red:255,green:0,blue:0},green:{red:0,green:255,blue:0},blue:{red:0,green:0,blue:255},yellow:{red:255,green:255,blue:0},cyan:{red:0,green:255,blue:255},magenta:{red:255,green:0,blue:255},white:{red:255,green:255,blue:255},black:{red:0,green:0,blue:0}};sre.ColorPicker.getChannelColor_=function(a,b){a=a||{color:b};var c=a.color?sre.ColorPicker.namedColors_[a.color]:a;c||(c=sre.ColorPicker.namedColors_[b]);c.alpha=a.hasOwnProperty("alpha")?a.alpha:1;return sre.ColorPicker.normalizeColor_(c)}; +sre.ColorPicker.normalizeColor_=function(a){var b=function(c){c=Math.max(c,0);c=Math.min(255,c);return Math.round(c)};a.red=b(a.red);a.green=b(a.green);a.blue=b(a.blue);a.alpha=Math.max(a.alpha,0);a.alpha=Math.min(1,a.alpha);return a};sre.ColorPicker.prototype.rgba=function(){var a=function(b){return"rgba("+b.red+","+b.green+","+b.blue+","+b.alpha+")"};return{background:a(this.background),foreground:a(this.foreground)}}; +sre.ColorPicker.prototype.rgb=function(){var a=function(b){return"rgb("+b.red+","+b.green+","+b.blue+")"};return{background:a(this.background),alphaback:this.background.alpha.toString(),foreground:a(this.foreground),alphafore:this.foreground.alpha.toString()}}; +sre.ColorPicker.prototype.hex=function(){var a=function(b){return"#"+sre.ColorPicker.toHex_(b.red)+sre.ColorPicker.toHex_(b.green)+sre.ColorPicker.toHex_(b.blue)};return{background:a(this.background),alphaback:this.background.alpha.toString(),foreground:a(this.foreground),alphafore:this.foreground.alpha.toString()}};sre.ColorPicker.toHex_=function(a){a=a.toString(16);return 1===a.length?"0"+a:a};sre.ContrastPicker=function(){this.hue=10;this.sat=100;this.incr=this.light=50}; +sre.ContrastPicker.prototype.generate=function(){return sre.ColorPicker.RGB2hex_(sre.ColorPicker.rgb2RGB_(sre.ColorPicker.hsl2rgb_(this.hue,this.sat,this.light)))};sre.ContrastPicker.prototype.increment=function(){this.hue=(this.hue+this.incr)%360}; +sre.ColorPicker.hsl2rgb_=function(a,b,c){c=1a?(a=$jscomp.makeIterator([d,e,0]),b=a.next().value,f=a.next().value,g=a.next().value):60<=a&&120>a?(a=$jscomp.makeIterator([e,d,0]),b=a.next().value,f=a.next().value,g=a.next().value):120<=a&&180>a?(a=$jscomp.makeIterator([0,d,e]),b=a.next().value,f=a.next().value,g=a.next().value):180<=a&&240>a?(a=$jscomp.makeIterator([0,e,d]),b=a.next().value,f= +a.next().value,g=a.next().value):240<=a&&300>a?(a=$jscomp.makeIterator([e,0,d]),b=a.next().value,f=a.next().value,g=a.next().value):300<=a&&360>a&&(a=$jscomp.makeIterator([d,0,e]),b=a.next().value,f=a.next().value,g=a.next().value);return{red:b+c,green:f+c,blue:g+c}};sre.ColorPicker.rgb2RGB_=function(a){return{red:Math.round(255*a.red),green:Math.round(255*a.green),blue:Math.round(255*a.blue)}};sre.ColorPicker.RGB2hex_=function(a){return"rgb("+a.red+","+a.green+","+a.blue+")"};sre.Highlighter=function(){};sre.Highlighter.prototype.highlight=function(a){};sre.Highlighter.prototype.unhighlight=function(){};sre.Highlighter.prototype.highlightAll=function(a){};sre.Highlighter.prototype.unhighlightAll=function(){};sre.Highlighter.prototype.setColor=function(a){};sre.Highlighter.prototype.addEvents=function(a,b){};sre.AbstractHighlighter=function(){this.currentHighlights_=[];this.color=null;this.mactionName=""};sre.AbstractHighlighter.ATTR="sre-highlight";sre.AbstractHighlighter.prototype.highlight=function(a){this.currentHighlights_.push(a.map(goog.bind(function(b){var c=this.highlightNode(b);this.setHighlighted(b);return c},this)))};sre.AbstractHighlighter.prototype.highlightNode=goog.abstractMethod;sre.AbstractHighlighter.prototype.highlightAll=function(a){a=this.getMactionNodes(a);for(var b=0,c;c=a[b];b++)this.highlight([c])}; +sre.AbstractHighlighter.prototype.unhighlight=function(){var a=this.currentHighlights_.pop();a&&a.forEach(goog.bind(function(b){this.isHighlighted(b.node)&&(this.unhighlightNode(b),this.unsetHighlighted(b.node))},this))};sre.AbstractHighlighter.prototype.unhighlightNode=goog.abstractMethod;sre.AbstractHighlighter.prototype.unhighlightAll=function(){for(;0=a.length)return a;for(var c=[],d=0,e;e=b[d],a.length;d++)e.close&&e.close.length&&e.close.forEach(function(f){var g=a.indexOf(f);-1!==g&&(c.unshift(f),a.splice(g,1))});return c};sre.AudioUtil.PersonalityRanges_={};sre.AudioUtil.LastOpen_=[]; +sre.AudioUtil.personalityMarkup=function(a){sre.AudioUtil.PersonalityRanges_={};sre.AudioUtil.LastOpen_=[];for(var b=[],c={},d=0,e;e=a[d];d++){var f=null,g=e.descriptionSpan(),h=e.personality;e=h[sre.Engine.personalityProps.JOIN];delete h[sre.Engine.personalityProps.JOIN];"undefined"!==typeof h[sre.Engine.personalityProps.PAUSE]&&(f={},f[sre.Engine.personalityProps.PAUSE]=h[sre.Engine.personalityProps.PAUSE],delete h[sre.Engine.personalityProps.PAUSE]);h=sre.AudioUtil.personalityDiff_(h,c);sre.AudioUtil.appendMarkup_(b, +g,h,e,f,!0)}b=b.concat(sre.AudioUtil.finaliseMarkup_());return b=sre.AudioUtil.simplifyMarkup_(b)}; +sre.AudioUtil.appendElement_=function(a,b){var c=a[a.length-1];if(c)if(sre.AudioUtil.isSpanElement(b)&&sre.AudioUtil.isSpanElement(c))if("undefined"===typeof c.join)c.span=c.span.concat(b.span);else{a=c.span.pop();var d=b.span.shift();c.span.push(a+c.join+d);c.span=c.span.concat(b.span);c.join=b.join}else sre.AudioUtil.isPauseElement(b)&&sre.AudioUtil.isPauseElement(c)?c.pause=sre.AudioUtil.mergePause_(c.pause,b.pause):a.push(b);else a.push(b)}; +sre.AudioUtil.simplifyMarkup_=function(a){for(var b={},c=[],d=0,e;e=a[d];d++)if(sre.AudioUtil.isMarkupElement(e))if(!e.close||1!==e.close.length||e.open.length)sre.AudioUtil.copyValues_(e,b),c.push(e);else{var f=a[d+1];if(!f||sre.AudioUtil.isSpanElement(f))sre.AudioUtil.copyValues_(e,b),c.push(e);else{var g=sre.AudioUtil.isPauseElement(f)?f:null;g&&(f=a[d+2]);f&&sre.AudioUtil.isMarkupElement(f)&&f.open[0]===e.close[0]&&!f.close.length&&f[f.open[0]]===b[f.open[0]]?g?(sre.AudioUtil.appendElement_(c, +g),d+=2):d+=1:(sre.AudioUtil.copyValues_(e,b),c.push(e))}}else sre.AudioUtil.appendElement_(c,e);return c};sre.AudioUtil.copyValues_=function(a,b){a.rate&&(b.rate=a.rate);a.pitch&&(b.pitch=a.pitch);a.volume&&(b.volume=a.volume)};sre.AudioUtil.finaliseMarkup_=function(){for(var a=[],b=sre.AudioUtil.LastOpen_.length-1;0<=b;b--){var c=sre.AudioUtil.LastOpen_[b];if(c.length){for(var d={open:[],close:[]},e=0;e=a?"short":500>=a?"medium":"long":a]||""};sre.XmlRenderer=function(){sre.MarkupRenderer.call(this)};goog.inherits(sre.XmlRenderer,sre.MarkupRenderer); +sre.XmlRenderer.prototype.markup=function(a){this.setScaleFunction(-2,2,-100,100,2);a=sre.AudioUtil.personalityMarkup(a);for(var b=[],c=[],d=0,e;e=a[d];d++)if(e.span)b.push(this.merge(e.span));else if(sre.AudioUtil.isPauseElement(e))b.push(this.pause(e));else{if(e.close.length)for(var f=0;f'+this.getSeparator()+a+this.getSeparator()+""};sre.SableRenderer.prototype.pause=function(a){return''}; +sre.SableRenderer.prototype.prosodyElement=function(a,b){b=this.applyScaleFunction(b);switch(a){case sre.Engine.personalityProps.PITCH:return'';case sre.Engine.personalityProps.RATE:return'';case sre.Engine.personalityProps.VOLUME:return'';default:return"<"+a.toUpperCase()+' VALUE="'+b+'">'}};sre.SableRenderer.prototype.closeTag=function(a){return""};sre.SsmlRenderer=function(){sre.XmlRenderer.call(this)};goog.inherits(sre.SsmlRenderer,sre.XmlRenderer);sre.SsmlRenderer.prototype.finalize=function(a){return''+this.getSeparator()+a+this.getSeparator()+""};sre.SsmlRenderer.prototype.pause=function(a){return''}; +sre.SsmlRenderer.prototype.prosodyElement=function(a,b){b=Math.floor(this.applyScaleFunction(b));b=0>b?b.toString():"+"+b.toString();return"":'%">')};sre.SsmlRenderer.prototype.closeTag=function(a){return""};sre.SsmlStepRenderer=function(){sre.SsmlRenderer.call(this)};goog.inherits(sre.SsmlStepRenderer,sre.SsmlRenderer);sre.SsmlStepRenderer.prototype.markup=function(a){sre.SsmlStepRenderer.MARKS={};return sre.SsmlStepRenderer.superClass_.markup.call(this,a)};sre.SsmlStepRenderer.CHARACTER_ATTR_="character";sre.SsmlStepRenderer.MARKS={}; +sre.SsmlStepRenderer.prototype.merge=function(a){for(var b=[],c=0;c'),sre.SsmlStepRenderer.MARKS[e]=!0);1===d.string.length&&d.string.match(/[a-zA-Z]/)?b.push(''+d.string+""):b.push(d.string)}return b.join(this.getSeparator())};sre.StringRenderer=function(){sre.AbstractAudioRenderer.call(this)};goog.inherits(sre.StringRenderer,sre.AbstractAudioRenderer);sre.StringRenderer.prototype.markup=function(a){var b="";a=a.filter(function(g){return g.descriptionString()});if(!a.length)return b;for(var c=0;c "+this.action.toString()};sre.SpeechRule.Type={NODE:"NODE",MULTI:"MULTI",TEXT:"TEXT",PERSONALITY:"PERSONALITY"}; +sre.SpeechRule.Type.fromString=function(a){switch(a){case "[n]":return sre.SpeechRule.Type.NODE;case "[m]":return sre.SpeechRule.Type.MULTI;case "[t]":return sre.SpeechRule.Type.TEXT;case "[p]":return sre.SpeechRule.Type.PERSONALITY;default:throw"Parse error: "+a;}}; +sre.SpeechRule.Type.toString=function(a){switch(a){case sre.SpeechRule.Type.NODE:return"[n]";case sre.SpeechRule.Type.MULTI:return"[m]";case sre.SpeechRule.Type.TEXT:return"[t]";case sre.SpeechRule.Type.PERSONALITY:return"[p]";default:throw"Unknown type error: "+a;}};sre.SpeechRule.Component=function(a){this.type=a.type;this.content=a.content;this.attributes=a.attributes;this.grammar=a.grammar}; +sre.SpeechRule.Component.fromString=function(a){var b={};b.type=sre.SpeechRule.Type.fromString(a.substring(0,3));a=a.slice(3).trim();if(!a)throw new sre.SpeechRule.OutputError("Missing content.");switch(b.type){case sre.SpeechRule.Type.TEXT:if('"'==a[0]){var c=sre.SpeechRule.splitString_(a,"\\(")[0].trim();if('"'!=c.slice(-1))throw new sre.SpeechRule.OutputError("Invalid string syntax.");b.content=c;a=a.slice(c.length).trim();-1==a.indexOf("(")&&(a="");break}case sre.SpeechRule.Type.NODE:case sre.SpeechRule.Type.MULTI:c= +a.indexOf(" ("),-1==c?(b.content=a.trim(),a=""):(b.content=a.substring(0,c).trim(),a=a.slice(c).trim())}a&&(a=sre.SpeechRule.Component.attributesFromString(a),a.grammar&&(b.grammar=a.grammar,delete a.grammar),Object.keys(a).length&&(b.attributes=a));return b=new sre.SpeechRule.Component(b)};sre.SpeechRule.Component.prototype.toString=function(){var a=""+sre.SpeechRule.Type.toString(this.type);a+=this.content?" "+this.content:"";var b=this.attributesToString();return a+(b?" "+b:"")}; +sre.SpeechRule.Component.grammarFromString=function(a){return sre.Grammar.parseInput(a)};sre.SpeechRule.Component.prototype.grammarToString=function(){return this.getGrammar().join(":")};sre.SpeechRule.Component.prototype.getGrammar=function(){var a=[],b;for(b in this.grammar)!0===this.grammar[b]?a.push(b):!1===this.grammar[b]?a.push("!"+b):a.push(b+"="+this.grammar[b]);return a}; +sre.SpeechRule.Component.attributesFromString=function(a){if("("!=a[0]||")"!=a.slice(-1))throw new sre.SpeechRule.OutputError("Invalid attribute expression: "+a);var b={};a=sre.SpeechRule.splitString_(a.slice(1,-1),",");for(var c=0,d=a.length;c "+this.getRule().action:this.constraint};sre.TrieNodeFactory={};sre.TrieNodeFactory.getNode=function(a,b,c){switch(a){case sre.TrieNode.Kind.ROOT:return new sre.RootTrieNode;case sre.TrieNode.Kind.DYNAMIC:return new sre.DynamicTrieNode(b);case sre.TrieNode.Kind.QUERY:return new sre.QueryTrieNode(b,c);case sre.TrieNode.Kind.BOOLEAN:return new sre.BooleanTrieNode(b,c);default:return null}};sre.RootTrieNode=function(){sre.AbstractTrieNode.call(this,"",function(){return!0});this.kind=sre.TrieNode.Kind.ROOT};goog.inherits(sre.RootTrieNode,sre.AbstractTrieNode); +sre.DynamicTrieNode=function(a){sre.AbstractTrieNode.call(this,a,function(b){return b===a});this.kind=sre.TrieNode.Kind.DYNAMIC};goog.inherits(sre.DynamicTrieNode,sre.AbstractTrieNode); +sre.TrieNodeFactory.constraintTest_=function(a){if(a.match(/^self::\*$/))return function(f){return!0};if(a.match(/^self::\w+$/)){var b=a.slice(6).toUpperCase();return function(f){return f.tagName&&sre.DomUtil.tagName(f)===b}}if(a.match(/^self::\w+:\w+$/)){a=a.split(":");var c=sre.XpathUtil.resolveNameSpace(a[2]);if(!c)return null;b=a[3].toUpperCase();return function(f){return f.localName&&f.localName.toUpperCase()===b&&f.namespaceURI===c}}if(a.match(/^@\w+$/)){var d=a.slice(1);return function(f){return f.hasAttribute&& +f.hasAttribute(d)}}if(a.match(/^@\w+="[\w\d ]+"$/)){a=a.split("=");d=a[0].slice(1);var e=a[1].slice(1,-1);return function(f){return f.hasAttribute&&f.hasAttribute(d)&&f.getAttribute(d)===e}}return a.match(/^@\w+!="[\w\d ]+"$/)?(a=a.split("!="),d=a[0].slice(1),e=a[1].slice(1,-1),function(f){return!f.hasAttribute||!f.hasAttribute(d)||f.getAttribute(d)!==e}):a.match(/^contains\(\s*@grammar\s*,\s*"[\w\d ]+"\s*\)$/)?(a=a.split('"'),e=a[1],function(f){return sre.Grammar.getInstance().getParameter(e)}): +a.match(/^not\(\s*contains\(\s*@grammar\s*,\s*"[\w\d ]+"\s*\)\s*\)$/)?(a=a.split('"'),e=a[1],function(f){return!sre.Grammar.getInstance().getParameter(e)}):null};sre.QueryTrieNode=function(a,b){this.context_=b;sre.StaticTrieNode.call(this,a,sre.TrieNodeFactory.constraintTest_(a));this.kind=sre.TrieNode.Kind.QUERY};goog.inherits(sre.QueryTrieNode,sre.StaticTrieNode);sre.QueryTrieNode.prototype.applyTest=function(a){return this.test?this.test(a):this.context_.applyQuery(a,this.constraint)===a}; +sre.BooleanTrieNode=function(a,b){this.context_=b;sre.StaticTrieNode.call(this,a,sre.TrieNodeFactory.constraintTest_(a));this.kind=sre.TrieNode.Kind.BOOLEAN};goog.inherits(sre.BooleanTrieNode,sre.StaticTrieNode);sre.BooleanTrieNode.prototype.applyTest=function(a){return this.test?this.test(a):this.context_.applyConstraint(a,this.constraint)};sre.Trie=function(a){this.store=a;this.root=sre.TrieNodeFactory.getNode(sre.TrieNode.Kind.ROOT,"",this.store.context)};sre.Trie.prototype.addRule=function(a){for(var b=this.root,c=a.context,d=a.dynamicCstr.getValues(),e=0,f=d.length;e=c&&1=d&&1b?-1:aa)return String.fromCharCode(a);a-=65536;return String.fromCharCode((a>>10)+55296,(a&1023)+56320)};sre.MathMap=function(){this.store=sre.MathCompoundStore.getInstance();this.loaded_=[];this.addRules={functions:goog.bind(this.store.addFunctionRules,this.store),symbols:goog.bind(this.store.addSymbolRules,this.store),units:goog.bind(this.store.addUnitRules,this.store)}};goog.addSingletonGetter(sre.MathMap);sre.MathMap.oldInst_=sre.MathMap.getInstance;sre.MathMap.getInstance=function(){var a=sre.MathMap.oldInst_();a.loadLocale();return a}; +sre.MathMap.prototype.loadLocale=function(){var a=sre.Engine.getInstance().locale;if(-1===this.loaded_.indexOf(a)){var b=sre.Engine.getInstance().mode===sre.Engine.Mode.ASYNC;b&&(sre.Engine.getInstance().mode=sre.Engine.Mode.SYNC);this.loaded_.push(a);this.retrieveMaps(a);b&&(sre.Engine.getInstance().mode=sre.Engine.Mode.ASYNC)}};sre.MathMap.toFetch_=0;sre.Engine.registerTest(function(){return sre.MathMap.getInstance()&&!sre.MathMap.toFetch_}); +sre.MathMap.prototype.retrieveFiles=function(a){a=sre.BaseUtil.makePath(sre.SystemExternal.jsonPath)+a+".js";switch(sre.Engine.getInstance().mode){case sre.Engine.Mode.ASYNC:sre.MathMap.toFetch_++;var b=goog.bind(this.parseMaps,this);sre.MathMap.fromFile_(a,function(c,d){sre.MathMap.toFetch_--;c||b(d)});break;case sre.Engine.Mode.HTTP:sre.MathMap.toFetch_++;this.getJsonAjax_(a);break;default:a=sre.MathMap.loadFile(a),this.parseMaps(a)}}; +sre.MathMap.prototype.parseMaps=function(a){a=JSON.parse(a);this.addMaps(a)};sre.MathMap.prototype.addMaps=function(a,b){for(var c=0,d;d=Object.keys(a)[c];c++){var e=d.split("/");b&&b!==e[0]||a[d].forEach(this.addRules[e[1]])}};sre.MathMap.prototype.retrieveMaps=function(a){sre.AlphabetGenerator.generate(a,this.store);sre.Engine.getInstance().isIE&&sre.Engine.getInstance().mode===sre.Engine.Mode.HTTP?this.getJsonIE_(a):this.retrieveFiles(a)}; +sre.MathMap.prototype.getJsonIE_=function(a,b){var c=b||1;sre.BrowserUtil.mapsForIE?this.addMaps(sre.BrowserUtil.mapsForIE,a):5>=c&&setTimeout(goog.bind(function(){this.getJsonIE_(a,c++)},this),300)};sre.MathMap.fromFile_=function(a,b){return sre.SystemExternal.fs.readFile(a,"utf8",b)};sre.MathMap.loadFile=function(a){try{return sre.MathMap.readJSON_(a)}catch(b){console.error("Unable to load file: "+a+"\n"+b)}return"{}"};sre.MathMap.readJSON_=function(a){return sre.SystemExternal.fs.readFileSync(a)}; +sre.MathMap.prototype.getJsonAjax_=function(a){var b=new XMLHttpRequest,c=goog.bind(this.parseMaps,this);b.onreadystatechange=function(){4===b.readyState&&(sre.MathMap.toFetch_--,200===b.status&&c(b.responseText))};b.open("GET",a,!0);b.send()};sre.StoreUtil={};sre.StoreUtil.nodeCounter=function(a,b){var c=a.length,d=0,e=b;b||(e="");return function(){db&&0a}; +sre.ClearspeakUtil.hasPreference=function(a){return sre.Engine.getInstance().style===a};sre.ClearspeakUtil.simpleExpression=function(){return new sre.SemanticAnnotator("clearspeak",function(a){return sre.ClearspeakUtil.isSimpleExpression(a)?"simple":""})};sre.ClearspeakUtil.simpleNode=function(a){if(!a.hasAttribute("annotation"))return!1;a=a.getAttribute("annotation");return!!/clearspeak:simple$|clearspeak:simple;/.exec(a)}; +sre.ClearspeakUtil.simpleCell_=function(a){if(sre.ClearspeakUtil.simpleNode(a))return!0;if(a.tagName!==sre.SemanticAttr.Type.SUBSCRIPT)return!1;a=a.childNodes[0].childNodes;var b=a[1];return a[0].tagName===sre.SemanticAttr.Type.IDENTIFIER&&(sre.ClearspeakUtil.isInteger_(b)||b.tagName===sre.SemanticAttr.Type.INFIXOP&&b.hasAttribute("role")&&b.getAttribute("role")===sre.SemanticAttr.Role.IMPLICIT&&sre.ClearspeakUtil.allIndices_(b))}; +sre.ClearspeakUtil.isInteger_=function(a){return a.tagName===sre.SemanticAttr.Type.NUMBER&&a.hasAttribute("role")&&a.getAttribute("role")===sre.SemanticAttr.Role.INTEGER};sre.ClearspeakUtil.allIndices_=function(a){return sre.XpathUtil.evalXPath("children/*",a).every(function(b){return sre.ClearspeakUtil.isInteger_(b)||b.tagName===sre.SemanticAttr.Type.IDENTIFIER})}; +sre.ClearspeakUtil.allCellsSimple=function(a){return sre.XpathUtil.evalXPath(a.tagName===sre.SemanticAttr.Type.MATRIX?"children/row/children/cell/children/*":"children/line/children/*",a).every(sre.ClearspeakUtil.simpleCell_)?[a]:[]};sre.ClearspeakUtil.isSmallVulgarFraction=function(a){return sre.NumbersUtil.vulgarFractionSmall(a,20,11)?[a]:[]}; +sre.ClearspeakUtil.isUnitExpression=function(a){return a.type===sre.SemanticAttr.Type.TEXT||a.type===sre.SemanticAttr.Type.PUNCTUATED&&a.role===sre.SemanticAttr.Role.TEXT&&sre.ClearspeakUtil.isNumber_(a.childNodes[0])&&sre.ClearspeakUtil.allTextLastContent_(a.childNodes.slice(1))||a.type===sre.SemanticAttr.Type.IDENTIFIER&&a.role===sre.SemanticAttr.Role.UNIT||a.type===sre.SemanticAttr.Type.INFIXOP&&(a.role===sre.SemanticAttr.Role.IMPLICIT||a.role===sre.SemanticAttr.Role.UNIT)}; +sre.ClearspeakUtil.allTextLastContent_=function(a){for(var b=0;b2],self::infixop,@role="unit",name(children/*[1])="number",children/*[1][text()=1]'.split(","),'Rule,unit-divide,default,[n] children/*[1]; [t] "per"; [n] children/*[2] (grammar:singularUnit),self::fraction,@role="unit"'.split(","),'Rule{currency{default{[m] children/*[position()>1]; [n] children/*[1];{self::infixop{contains(@annotation, "clearspeak:unit"){children/*[1][@role="unit"]{CQFfirstCurrency'.split("{"), +'Rule;currency;Currency_Position;[m] children/*;self::infixop;contains(@annotation, "clearspeak:unit")'.split(";"),["SpecializedRule","currency","Currency_Position","Currency_Prefix"],'Rule{currency{Currency_Prefix{[n] children/*[last()]; [m] children/*[position()2{./children/punctuation[@role="ellipsis"]'.split("{"), +'Rule{multi-equality{default{[t] "equation sequence"; [m] children/* (context:"part",ctxtFunc:CTXFnodeCounter,sepFunc:CTXFcontentIterator){self::relseq[@role="equality"]{count(./children/*)>2'.split("{"),'Rule,equality,default,[t] "equation"; [t] "left hand side"; [n] children/*[1];[p] (pause:200); [n] content/*[1] (pause:200);[t] "right hand side"; [n] children/*[2],self::relseq[@role="equality"],count(./children/*)=2'.split(","),'Rule,simple-equality,default,[n] children/*[1]; [p] (pause:200); [n] content/*[1] (pause:200);[n] children/*[2],self::relseq[@role="equality"],count(./children/*)=2,./children/identifier or ./children/number'.split(","), +'Rule,simple-equality2,default,[n] children/*[1]; [p] (pause:200); [n] content/*[1] (pause:200);[n] children/*[2],self::relseq[@role="equality"],count(./children/*)=2,./children/function or ./children/appl'.split(","),["Rule","relseq","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq"],'Rule;implicit;default;[m] children/*;self::infixop;@role="implicit";children/*[1][@role="latinletter"] or children/*[1][@role="greekletter"] or children/*[1][@role="otherletter"] or name(children/*[1])="number";children/*[2][@role="latinletter"] or children/*[2][@role="greekletter"] or children/*[2][@role="otherletter"] or name(children/*[2])="number"'.split(";"), +["Rule","binary-operation","default","[p] (pause:100); [m] children/* (sepFunc:CTXFcontentIterator); [p] (pause:100);","self::infixop"],'Rule,variable-addition,default,[t] "sum with variable number of summands";[p] (pause:400); [m] children/* (sepFunc:CTXFcontentIterator),self::infixop[@role="addition"],count(children/*)>2,children/punctuation[@role="ellipsis"]'.split(","),["Rule","prefix","default",'[t] "prefix"; [n] text(); [t] "of" (pause 150);[n] children/*[1]',"self::prefixop"],'Rule,negative,default,[t] "negative"; [n] children/*[1],self::prefixop,self::prefixop[@role="negative"]'.split(","), +["Rule","postfix","default",'[n] children/*[1]; [t] "postfix"; [n] text() (pause 300)',"self::postfixop"],["Rule","identifier","default","[n] text()","self::identifier"],["Rule","number","default","[n] text()","self::number"],'Rule{font{default{[t] @font; [n] . (grammar:ignoreFont=@font){self::*{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"'.split("{"),'Rule{font-identifier-short{default{[t] @font; [n] CQFhideFont; [t] CSFshowFont{self::identifier{string-length(text())=1{@font{@font="normal"{""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", ""){@role!="unit"'.split("{"), +'Rule{font-identifier{default{[t] @font; [n] . (grammar:ignoreFont=@font){self::identifier{string-length(text())=1{@font{@font="normal"{not(contains(@grammar, "ignoreFont")){@role!="unit"'.split("{"),'Rule;omit-font;default;[n] . (grammar:ignoreFont=@font);self::identifier;string-length(text())=1;@font;not(contains(@grammar, "ignoreFont"));@font="italic"'.split(";"),'Rule,simple-fraction,default,[p] (pause:100); [n] children/*[1] (rate:0.35); [t] "over"; [n] children/*[2] (rate:0.35); [p] (pause:100),self::fraction,name(children/*[1])="number" or name(children/*[1])="identifier",name(children/*[2])="number" or name(children/*[2])="identifier"'.split(","), +'Rule;vulgar-fraction;default;[t] CSFvulgarFraction;self::fraction;@role="vulgar";CQFvulgarFractionSmall'.split(";"),["Rule","fraction","default",'[p] (pause:250); [n] children/*[1] (rate:0.35); [p] (pause:250); [t] "divided by"; [p] (pause:250); [n] children/*[2] (rate:0.35); [p] (pause:250)',"self::fraction"],["Rule","superscript","default",'[n] children/*[1]; [t] "super"; [n] children/*[2] (pitch:0.35);[p] (pause:300)',"self::superscript"],["Rule","subscript","default",'[n] children/*[1]; [t] "sub"; [n] children/*[2] (pitch:-0.35);[p] (pause:300)', +"self::subscript"],'Rule,ellipsis,default,[p] (pause:200); [t] "ellipsis"; [p] (pause:300),self::punctuation,self::punctuation[@role="ellipsis"]'.split(","),'Rule;fence-single;default;[n] text();self::punctuation;self::punctuation[@role="openfence"]'.split(";"),["Alias","fence-single","self::punctuation",'self::punctuation[@role="closefence"]'],["Alias","fence-single","self::punctuation",'self::punctuation[@role="vbar"]'],["Alias","fence-single","self::punctuation",'self::punctuation[@role="application"]'], +["Rule","omit-empty","default","[p] (pause:100)","self::empty"],'Rule,fences-open-close,default,[p] (pause:200); [n] children/*[1] (rate:0.35); [p] (pause:200),self::fenced,@role="leftright"'.split(","),'Rule,fences-open-close-in-appl,default,[p] (pause:200); [n] children/*[1]; [p] (pause:200);,self::fenced[@role="leftright"],./parent::children/parent::appl'.split(","),'Rule,fences-neutral,default,[p] (pause:100); [t] "absolute value of"; [n] children/*[1];[p] (pause:350);,self::fenced,self::fenced[@role="neutral"]'.split(","), +["Rule","omit-fences","default","[p] (pause:500); [n] children/*[1]; [p] (pause:200);","self::fenced"],["Rule","matrix","default",'[t] "matrix"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:100)',"self::matrix"],["Rule","matrix-row","default",'[m] children/* (ctxtFunc:CTXFnodeCounter,context:"column",pause:100)','self::row[@role="matrix"]'],["Rule","matrix-cell","default","[n] children/*[1]",'self::cell[@role="matrix"]'],["Rule","vector","default",'[t] "vector"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"element",pause:100)', +"self::vector"],["Rule","cases","default",'[t] "case statement"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"case",pause:100)',"self::cases"],["Rule","cases-row","default","[m] children/*",'self::row[@role="cases"]'],["Rule","cases-cell","default","[n] children/*[1]",'self::cell[@role="cases"]'],["Rule","row","default",'[m] ./* (ctxtFunc:CTXFnodeCounter,context:"column",pause:100)',"self::row"],'Rule{cases-end{default{[t] "case statement"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"case",pause:100);[t] "end cases"{self::cases{following-sibling::*'.split("{"), +["Rule","multiline","default",'[t] "multiline equation";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"line",pause:100)',"self::multiline"],["Rule","line","default","[m] children/*","self::line"],["Rule","table","default",'[t] "multiline equation";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:200)',"self::table"],["Rule","table-row","default","[m] children/* (pause:100)",'self::row[@role="table"]'],["Alias","cases-cell",'self::cell[@role="table"]'],'Rule,end-punct,default,[m] children/*; [p] (pause:300),self::punctuated,@role="endpunct"'.split(","), +'Rule,start-punct,default,[n] content/*[1]; [p] (pause:200); [m] children/*[position()>1],self::punctuated,@role="startpunct"'.split(","),'Rule,integral-punct,default,[n] children/*[1] (rate:0.2); [n] children/*[3] (rate:0.2),self::punctuated,@role="integral"'.split(","),["Rule","punctuated","default","[m] children/* (pause:100)","self::punctuated"],["Rule","function","default","[n] text()","self::function"],["Rule","appl","default","[n] children/*[1]; [n] content/*[1]; [n] children/*[2]","self::appl"], +'Rule,sum-only,default,[n] children/*[1]; [t] "from"; [n] children/*[2]; [t] "to";[n] children/*[3],self::limboth,@role="sum" or @role="integral"'.split(","),["Rule","limboth","default",'[n] children/*[1]; [p] (pause 100); [t] "over"; [n] children/*[2];[t] "under"; [n] children/*[3]; [p] (pause 250);',"self::limboth"],["Rule","limlower","default",'[n] children/*[1]; [t] "over"; [n] children/*[2];',"self::limlower"],["Rule","limupper","default",'[n] children/*[1]; [t] "under"; [n] children/*[2];', +"self::limupper"],["Rule","largeop","default","[n] text()","self::largeop"],["Rule","bigop","default",'[n] children/*[1]; [p] (pause 100); [t] "over"; [n] children/*[2];[p] (pause 250);',"self::bigop"],["Rule","integral","default","[n] children/*[1]; [p] (pause 100); [n] children/*[2];[p] (pause 200); [n] children/*[3] (rate:0.35);","self::integral"],["Rule","sqrt","default",'[t] "Square root of"; [n] children/*[1] (rate:0.35); [p] (pause:400)',"self::sqrt"],'Rule,square,default,[n] children/*[1]; [t] "squared" (pitch:0.35); [p] (pause:200),self::superscript,children/*[2][text()=2],name(./children/*[1])!="text"'.split(","), +'Rule,cube,default,[n] children/*[1]; [t] "cubed" (pitch:0.35); [p] (pause:200),self::superscript,children/*[2][text()=3],name(./children/*[1])!="text"'.split(","),["Rule","root","default",'[t] "root of order"; [n] children/*[1];[t] "over"; [n] children/*[1] (rate:0.35); [p] (pause:400)',"self::root"],"Rule,text-no-mult,default,[n] children/*[1]; [p] (pause:200); [n] children/*[2],self::infixop,children/text".split(","),["Rule","text","default","[n] text(); [p] (pause:200)","self::text"],'Rule;unit;default;[t] text() (annotation:unit, preprocess);self::identifier;@role="unit"'.split(";"), +'Rule,unit-square,default,[t] "square"; [n] children/*[1],self::superscript,@role="unit",children/*[2][text()=2],name(children/*[1])="identifier"'.split(","),'Rule,unit-cubic,default,[t] "cubic"; [n] children/*[1],self::superscript,@role="unit",children/*[2][text()=3],name(children/*[1])="identifier"'.split(","),'Rule,reciprocal,default,[t] "reciprocal"; [n] children/*[1],self::superscript,@role="unit",name(children/*[1])="identifier",name(children/*[2])="prefixop",children/*[2][@role="negative"],children/*[2]/children/*[1][text()=1],count(preceding-sibling::*)=0 or preceding-sibling::*[@role!="unit"]'.split(","), +'Rule,reciprocal,default,[t] "per"; [n] children/*[1],self::superscript,@role="unit",name(children/*[1])="identifier",name(children/*[2])="prefixop",children/*[2][@role="negative"],children/*[2]/children/*[1][text()=1],preceding-sibling::*[@role="unit"]'.split(","),'Rule;unit-combine;default;[m] children/*;self::infixop;@role="unit"'.split(";"),'Rule,unit-divide,default,[n] children/*[1] (pitch:0.3); [t] "per"; [n] children/*[2] (pitch:-0.3),self::fraction,@role="unit"'.split(",")]};sre.MathspeakFrenchUtil={};sre.MathspeakFrenchUtil.smallRoot=function(a){if(!a.childNodes||0===a.childNodes.length||!a.childNodes[0].childNodes)return[];var b=a.childNodes[0].childNodes[0].textContent;if(!/^\d+$/.test(b))return[];b=parseInt(b,10);return 1=b?[a]:[]};sre.MathspeakFrenchUtil.baselineVerbose=function(a){return sre.MathspeakUtil.baselineVerbose(a).replace(/\-$/,"")};sre.MathspeakFrenchUtil.baselineBrief=function(a){return sre.MathspeakUtil.baselineBrief(a).replace(/\-$/,"")}; +sre.MathspeakFrenchUtil.leftSuperscriptVerbose=function(a){return sre.MathspeakUtil.superscriptVerbose(a).replace(/^exposant/,"exposant gauche")};sre.MathspeakFrenchUtil.leftSubscriptVerbose=function(a){return sre.MathspeakUtil.subscriptVerbose(a).replace(/^indice/,"indice gauche")};sre.MathspeakFrenchUtil.leftSuperscriptBrief=function(a){return sre.MathspeakUtil.superscriptBrief(a).replace(/^sup/,"sup gauche")}; +sre.MathspeakFrenchUtil.leftSubscriptBrief=function(a){return sre.MathspeakUtil.subscriptBrief(a).replace(/^sub/,"sub gauche")};sre.MathspeakFrench={locale:"fr",domain:"mathspeak",functions:[["CQF","CQFspaceoutNumber",sre.MathspeakUtil.spaceoutNumber],["CQF","CQFspaceoutIdentifier",sre.MathspeakUtil.spaceoutIdentifier],["CSF","CSFspaceoutText",sre.MathspeakUtil.spaceoutText],["CSF","CSFopenFracVerbose",sre.MathspeakUtil.openingFractionVerbose],["CSF","CSFcloseFracVerbose",sre.MathspeakUtil.closingFractionVerbose],["CSF","CSFoverFracVerbose",sre.MathspeakUtil.overFractionVerbose],["CSF","CSFopenFracBrief",sre.MathspeakUtil.openingFractionBrief], +["CSF","CSFcloseFracBrief",sre.MathspeakUtil.closingFractionBrief],["CSF","CSFopenFracSbrief",sre.MathspeakUtil.openingFractionSbrief],["CSF","CSFcloseFracSbrief",sre.MathspeakUtil.closingFractionSbrief],["CSF","CSFoverFracSbrief",sre.MathspeakUtil.overFractionSbrief],["CSF","CSFvulgarFrFraction",sre.NumbersUtil.vulgarFraction],["CQF","CQFvulgarFractionSmall",sre.MathspeakUtil.isSmallVulgarFraction],["CSF","CSFopenRadicalVerbose",sre.MathspeakUtil.openingRadicalVerbose],["CSF","CSFcloseRadicalVerbose", +sre.MathspeakUtil.closingRadicalVerbose],["CSF","CSFindexRadicalVerbose",sre.MathspeakUtil.indexRadicalVerbose],["CSF","CSFopenRadicalBrief",sre.MathspeakUtil.openingRadicalBrief],["CSF","CSFcloseRadicalBrief",sre.MathspeakUtil.closingRadicalBrief],["CSF","CSFindexRadicalBrief",sre.MathspeakUtil.indexRadicalBrief],["CSF","CSFopenRadicalSbrief",sre.MathspeakUtil.openingRadicalSbrief],["CSF","CSFindexRadicalSbrief",sre.MathspeakUtil.indexRadicalSbrief],["CQF","CQFisSmallRoot",sre.MathspeakFrenchUtil.smallRoot], +["CSF","CSFsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose],["CSF","CSFsuperscriptBrief",sre.MathspeakUtil.superscriptBrief],["CSF","CSFsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose],["CSF","CSFsubscriptBrief",sre.MathspeakUtil.subscriptBrief],["CSF","CSFbaselineVerbose",sre.MathspeakFrenchUtil.baselineVerbose],["CSF","CSFbaselineBrief",sre.MathspeakFrenchUtil.baselineBrief],["CSF","CSFleftsuperscriptVerbose",sre.MathspeakFrenchUtil.leftSuperscriptVerbose],["CSF","CSFleftsubscriptVerbose", +sre.MathspeakFrenchUtil.leftSubscriptVerbose],["CSF","CSFrightsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose],["CSF","CSFrightsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose],["CSF","CSFleftsuperscriptBrief",sre.MathspeakFrenchUtil.leftSuperscriptBrief],["CSF","CSFleftsubscriptBrief",sre.MathspeakFrenchUtil.leftSubscriptBrief],["CSF","CSFrightsuperscriptBrief",sre.MathspeakUtil.superscriptBrief],["CSF","CSFrightsubscriptBrief",sre.MathspeakUtil.subscriptBrief],["CSF","CSFunderscript", +sre.MathspeakUtil.nestedUnderscore],["CSF","CSFoverscript",sre.MathspeakUtil.nestedOverscore],["CTXF","CTXFordinalCounter",sre.NumbersUtil.ordinalCounter],["CTXF","CTXFcontentIterator",sre.StoreUtil.contentIterator],["CQF","CQFdetIsSimple",sre.MathspeakUtil.determinantIsSimple],["CSF","CSFRemoveParens",sre.MathspeakUtil.removeParens],["CQF","CQFresetNesting",sre.MathspeakUtil.resetNestingDepth],["CQF","CQFisLogarithm",sre.ClearspeakUtil.isLogarithmWithBase]],rules:['Rule;collapsed;default;[n] . (engine:modality=summary,grammar:collapsed);self::*;@alternative;not(contains(@grammar, "collapsed"));self::*;self::*;self::*;self::*;self::*'.split(";"), +["SpecializedRule","collapsed","default","brief"],["SpecializedRule","collapsed","brief","sbrief"],"Rule;stree;default;[n] ./*[1];self::stree;CQFresetNesting".split(";"),["Rule","unknown","default","[n] text()","self::unknown"],'Rule;protected;default;[t] text();self::*;@role="protected"'.split(";"),["Rule","omit-empty","default","[p] (pause:100)","self::empty"],'Rule;blank-empty;default;[t] "vide";self::empty;count(../*)=1;name(../..)="cell" or name(../..)="line"'.split(";"),'Rule{font{default{[n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont){self::*{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"'.split("{"), +'Rule{font-identifier-short{default{[n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont);{self::identifier{string-length(text())=1{@font{not(contains(@grammar, "ignoreFont")){@font="normal"{""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", ""){@role!="unit"'.split("{"), +'Rule{font-identifier{default{[n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont){self::identifier{string-length(text())=1{@font{@font="normal"{not(contains(@grammar, "ignoreFont")){@role!="unit"'.split("{"),'Rule;omit-font;default;[n] . (grammar:ignoreFont=@font);self::identifier;string-length(text())=1;@font;not(contains(@grammar, "ignoreFont"));@font="italic"'.split(";"),["Rule","number","default","[n] text()","self::number"],'Rule,mixed-number,default,[n] children/*[1]; [t] "et"; [n] children/*[2]; ,self::number,@role="mixed"'.split(","), +'Rule{number-with-chars{default{[t] "nombre"; [m] CQFspaceoutNumber{self::number{"" != translate(text(), "0123456789.,", ""){text() != translate(text(), "0123456789.,", "")'.split("{"),'Rule{number-as-upper-word{default{[t] "MotMajuscule"; [t] CSFspaceoutText{self::number{string-length(text())>1{text()=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9", "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9"){""=translate(text(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9","")'.split("{"), +'Rule{number-baseline{default{[t] "position de base"; [n] . (grammar:baseline){self::number{not(contains(@grammar, "ignoreFont")){preceding-sibling::identifier{not(contains(@grammar, "baseline")){preceding-sibling::*[1][@role="latinletter" or @role="greekletter" or @role="otherletter"]{parent::*/parent::infixop[@role="implicit"]'.split("{"),["SpecializedRule","number-baseline","default","brief",'[t] "base"; [n] . (grammar:baseline)'],["SpecializedRule","number-baseline","brief","sbrief"],'Rule{number-baseline-font{default{[t] "position de base"; [n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont){self::number{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"{preceding-sibling::identifier{preceding-sibling::*[@role="latinletter" or @role="greekletter" or @role="otherletter"]{parent::*/parent::infixop[@role="implicit"]'.split("{"), +["SpecializedRule","number-baseline-font","default","brief",'[t] "base"; [n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont)'],["SpecializedRule","number-baseline-font","brief","sbrief"],'Rule;identifier;default;[m] CQFspaceoutIdentifier;self::identifier;string-length(text())>1;@role!="unit";@role!="protected";not(@font) or @font="normal" or contains(@grammar, "ignoreFont");text()!=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")'.split(";"), +["Rule","identifier","default","[n] text()","self::identifier"],'Rule,negative,default,[t] "n\u00e9gatif"; [n] children/*[1],self::prefixop,@role="negative",children/identifier'.split(","),["Aliases","negative","self::prefixop",'@role="negative"',"children/number"],["Aliases","negative","self::prefixop",'@role="negative"','children/fraction[@role="vulgar"]'],'Rule,negative,default,[t] "n\u00e9gatif"; [n] children/*[1],self::prefixop,@role="negative"'.split(","),["Rule","prefix","default","[m] content/*; [n] children/*[1]", +"self::prefixop"],["Rule","postfix","default","[n] children/*[1]; [m] content/*","self::postfixop"],["Rule","binary-operation","default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop"],'Rule;implicit;default;[m] children/*;self::infixop;@role="implicit"'.split(";"),["Aliases","implicit","self::infixop",'@role="leftsuper" or @role="leftsub" or @role="rightsuper" or @role="rightsub"'],'Rule,subtraction,default,[m] children/* (separator:"moins");,self::infixop,@role="subtraction"'.split(","), +["Rule","function-unknown","default","[n] children/*[1]; [n] children/*[2]","self::appl"],'Rule,function-prefix,default,[n] children/*[1]; [n] children/*[2],self::appl,children/*[1][@role="prefix function"]'.split(","),'Rule,fences-open-close,default,[n] content/*[1]; [n] children/*[1]; [n] content/*[2],self::fenced,@role="leftright"'.split(","),'Rule,fences-neutral,default,[t] "d\u00e9but valeur absolue"; [n] children/*[1]; [t] "fin valeur absolue",self::fenced,@role="neutral",content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"'.split(","), +["SpecializedRule","fences-neutral","default","sbrief",'[t] "valeur absolue"; [n] children/*[1]; [t] "fin valeur absolue"'],'Rule,fences-neutral,default,[n] content/*[1]; [n] children/*[1]; [n] content/*[2],self::fenced,@role="neutral"'.split(","),'Rule,fences-set,default,[t] "d\u00e9but ensemble"; [n] children/*[1]; [t] "fin ensemble",self::fenced,@role="set empty" or @role="set extended" or @role="set singleton" or @role="set collection",not(name(../..)="appl")'.split(","),["SpecializedRule","fences-set", +"default","sbrief",'[t] "ensemble"; [n] children/*[1]; [t] "fin ensemble"'],["Rule","text","default","[n] text()","self::text"],'Rule;factorial;default;[t] "factorielle";self::punctuation;text()="!";name(preceding-sibling::*[1])!="text"'.split(";"),'Rule;minus;default;[t] "moins";self::operator;text()="-"'.split(";"),'Rule;single-prime;default;[t] "prime";self::punctuated;@role="prime";count(children/*)=1'.split(";"),'Rule;double-prime;default;[t] "double prime";self::punctuated;@role="prime";count(children/*)=2'.split(";"), +'Rule;triple-prime;default;[t] "triple prime";self::punctuated;@role="prime";count(children/*)=3'.split(";"),'Rule;quadruple-prime;default;[t] "quadruple prime";self::punctuated;@role="prime";count(children/*)=4'.split(";"),'Rule,counted-prime,default,[t] count(children/*); [t] "prime",self::punctuated,@role="prime"'.split(","),["Rule","fraction","default","[t] CSFopenFracVerbose; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracVerbose","self::fraction"],["Rule","fraction", +"brief","[t] CSFopenFracBrief; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracBrief","self::fraction"],["Rule","fraction","sbrief","[t] CSFopenFracSbrief; [n] children/*[1]; [t] CSFoverFracSbrief; [n] children/*[2]; [t] CSFcloseFracSbrief","self::fraction"],'Rule;vulgar-fraction;default;[t] CSFvulgarFrFraction;self::fraction;@role="vulgar";CQFvulgarFractionSmall'.split(";"),["SpecializedRule","vulgar-fraction","default","brief"],["SpecializedRule","vulgar-fraction", +"default","sbrief"],'Rule,continued-fraction-outer,default,[t] "fraction continue"; [n] children/*[1];[t] "sur"; [n] children/*[2],self::fraction,not(ancestor::fraction),children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]'.split(","),["SpecializedRule","continued-fraction-outer","default","brief",'[t] "frac continue"; [n] children/*[1];[t] "sur"; [n] children/*[2]'],["SpecializedRule","continued-fraction-outer","brief","sbrief"],'Rule,continued-fraction-inner,default,[t] "d\u00e9but fraction"; [n] children/*[1];[t] "sur"; [n] children/*[2],self::fraction,ancestor::fraction,children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]'.split(","), +["SpecializedRule","continued-fraction-inner","default","brief",'[t] "d\u00e9but frac"; [n] children/*[1];[t] "sur"; [n] children/*[2]'],["SpecializedRule","continued-fraction-inner","brief","sbrief",'[t] "frac"; [n] children/*[1];[t] "sur"; [n] children/*[2]'],["Rule","sqrt","default","[t] CSFopenRadicalVerbose; [n] children/*[1]; [t] CSFcloseRadicalVerbose","self::sqrt"],["Rule","sqrt","brief","[t] CSFopenRadicalBrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt"],["Rule","sqrt","sbrief", +"[t] CSFopenRadicalSbrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt"],"Rule,root-small,default,[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose,self::root,CQFisSmallRoot".split(","),"Rule,root-small,brief,[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief,self::root,CQFisSmallRoot".split(","),"Rule,root-small,sbrief,[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief,self::root,CQFisSmallRoot".split(","),["Rule","root","default", +"[t] CSFindexRadicalVerbose; [n] children/*[1];[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose","self::root"],["Rule","root","brief","[t] CSFindexRadicalBrief; [n] children/*[1];[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root"],["Rule","root","sbrief","[t] CSFindexRadicalSbrief; [n] children/*[1];[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root"],'Rule,limboth,default,[n] children/*[1]; [t] "d\u00e9but"; [t] CSFunderscript; [n] children/*[2];[t] "d\u00e9but"; [t] CSFoverscript; [n] children/*[3],self::limboth,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","), +'Rule,limlower,default,[n] children/*[1]; [t] "d\u00e9but"; [t] CSFunderscript; [n] children/*[2];,self::limlower,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","),'Rule,limupper,default,[n] children/*[1]; [t] "d\u00e9but"; [t] CSFoverscript; [n] children/*[2];,self::limupper,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","),'Aliases;limlower;self::underscore;@role="limit function";name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"), +'Aliases;limlower;self::underscore;children/*[2][@role!="underaccent"];name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"),'Aliases;limupper;self::overscore;children/*[2][@role!="overaccent"];name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"),["Rule","limboth-end","default",'[n] children/*[1]; [t] "d\u00e9but"; [t] CSFunderscript; [n] children/*[2];[t] "d\u00e9but"; [t] CSFoverscript; [n] children/*[3]; [t] "fin scripts"', +"self::limboth"],["Rule","limlower-end","default",'[n] children/*[1]; [t] "d\u00e9but"; [t] CSFunderscript; [n] children/*[2]; [t] "fin scripts"',"self::limlower"],["Rule","limupper-end","default",'[n] children/*[1]; [t] "d\u00e9but"; [t] CSFoverscript; [n] children/*[2]; [t] "fin scripts"',"self::limupper"],["Aliases","limlower-end","self::underscore",'@role="limit function"'],["Aliases","limlower-end","self::underscore"],["Aliases","limupper-end","self::overscore"],["Rule","integral","default", +"[n] children/*[1]; [n] children/*[2]; [n] children/*[3];","self::integral"],'Rule,integral,default,[n] children/*[1]; [t] "indice inf\u00e9rieur"; [n] children/*[2];[t] "indice sup\u00e9rieur"; [n] children/*[3]; [t] "position de base";,self::limboth,@role="integral"'.split(","),["SpecializedRule","integral","default","brief",'[n] children/*[1]; [t] "inf"; [n] children/*[2];[t] "sup"; [n] children/*[3]; [t] "position de base";'],["SpecializedRule","integral","brief","sbrief"],["Rule","bigop","default", +"[n] children/*[1]; [n] children/*[2];","self::bigop"],["Rule","relseq","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq"],'Rule,equality,default,[n] children/*[1]; [n] content/*[1]; [n] children/*[2],self::relseq,@role="equality",count(./children/*)=2'.split(","),'Rule;multi-equality;default;[m] children/* (sepFunc:CTXFcontentIterator);self::relseq;@role="equality";count(./children/*)>2'.split(";"),["Rule","multrel","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::multirel"], +["Rule","subscript","default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]","self::subscript"],["Rule","subscript","brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]","self::subscript"],["SpecializedRule","subscript","brief","sbrief"],'Rule,subscript-base,default,[n] children/*[1]; [t] "base"; [n] children/*[2],self::subscript,CQFisLogarithm,self::*,self::*,self::*'.split(","),["SpecializedRule","subscript-base","default","brief"],["SpecializedRule","subscript-base", +"default","sbrief"],'Rule,subscript-simple,brief,[n] children/*[1]; [n] children/*[2],self::subscript,name(./children/*[1])="identifier",name(./children/*[2])="number",./children/*[2][@role!="mixed"],./children/*[2][@role!="othernumber"]'.split(","),["SpecializedRule","subscript-simple","brief","sbrief"],'Rule,subscript-baseline,default,[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]; [t] CSFbaselineVerbose,self::subscript,following-sibling::*,not(name(following-sibling::subscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="subscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and @role!="subsup",not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])'.split(","), +["SpecializedRule","subscript-baseline","default","brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]; [t] CSFbaselineBrief"],["SpecializedRule","subscript-baseline","brief","sbrief"],'Aliases;subscript-baseline;self::subscript;not(following-sibling::*);ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::punctuated|ancestor::fraction;not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])'.split(";"),["Aliases","subscript-baseline", +"self::subscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel",sre.MathspeakUtil.generateBaselineConstraint()],["Aliases","subscript-baseline","self::subscript","not(following-sibling::*)","@embellished"],'Rule,subscript-empty-sup,default,[n] children/*[1]; [n] children/*[2],self::subscript,name(children/*[2])="infixop",name(children/*[2][@role="implicit"]/children/*[1])="superscript",name(children/*[2]/children/*[1]/children/*[1])="empty"'.split(","),["SpecializedRule","subscript-empty-sup", +"default","brief"],["SpecializedRule","subscript-empty-sup","brief","sbrief"],["Aliases","subscript-empty-sup","self::subscript",'name(children/*[2])="superscript"','name(children/*[2]/children/*[1])="empty"'],["Rule","superscript","default","[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2]","self::superscript"],["SpecializedRule","superscript","default","brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2]"],["SpecializedRule","superscript","brief","sbrief"],'Rule,superscript-baseline,default,[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2];[t] CSFbaselineVerbose,self::superscript,following-sibling::*,not(name(following-sibling::superscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="superscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])'.split(","), +["SpecializedRule","superscript-baseline","default","brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2];[t] CSFbaselineBrief"],["SpecializedRule","superscript-baseline","brief","sbrief"],'Aliases;superscript-baseline;self::superscript;not(following-sibling::*);ancestor::punctuated;ancestor::*/following-sibling::* and not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])'.split(";"),["Aliases","superscript-baseline","self::superscript", +"not(following-sibling::*)","ancestor::fraction|ancestor::fenced|ancestor::root|ancestor::sqrt"],["Aliases","superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel","not(@embellished)",sre.MathspeakUtil.generateBaselineConstraint()],'Aliases superscript-baseline self::superscript not(following-sibling::*) @embellished not(children/*[2][@role="prime"])'.split(" "),'Rule,superscript-empty-sub,default,[n] children/*[1]; [n] children/*[2],self::superscript,name(children/*[2])="infixop",name(children/*[2][@role="implicit"]/children/*[1])="subscript",name(children/*[2]/children/*[1]/children/*[1])="empty"'.split(","), +["SpecializedRule","superscript-empty-sub","default","brief"],["SpecializedRule","superscript-empty-sub","brief","sbrief"],["Aliases","superscript-empty-sub","self::superscript",'name(children/*[2])="subscript"','name(children/*[2]/children/*[1])="empty"'],'Rule,square,default,[n] children/*[1]; [t] "au carr\u00e9",self::superscript,children/*[2],children/*[2][text()=2],name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree")),name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"]),not(@embellished)'.split(","), +["SpecializedRule","square","default","brief"],["SpecializedRule","square","default","sbrief"],'Aliases;square;self::superscript;children/*[2];children/*[2][text()=2];@embellished;children/*[1][@role="prefix operator"]'.split(";"),'Rule,cube,default,[n] children/*[1]; [t] "cubique",self::superscript,children/*[2],children/*[2][text()=3],name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree")),name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"]),not(@embellished)'.split(","), +["SpecializedRule","cube","default","brief"],["SpecializedRule","cube","default","sbrief"],'Aliases;cube;self::superscript;children/*[2];children/*[2][text()=3];@embellished;children/*[1][@role="prefix operator"]'.split(";"),'Rule,prime,default,[n] children/*[1]; [n] children/*[2],self::superscript,children/*[2],children/*[2][@role="prime"]'.split(","),["SpecializedRule","prime","default","brief"],["SpecializedRule","prime","default","sbrief"],'Rule,prime-subscript,default,[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2],self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",not(following-sibling::*)'.split(","), +["SpecializedRule","prime-subscript","default","brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]"],["SpecializedRule","prime-subscript","brief","sbrief"],'Rule,prime-subscript-baseline,default,[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]; [t] CSFbaselineVerbose,self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",following-sibling::*'.split(","), +["SpecializedRule","prime-subscript-baseline","default","brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]; [t] CSFbaselineBrief"],["SpecializedRule","prime-subscript-baseline","brief","sbrief"],'Aliases prime-subscript-baseline self::superscript children/*[2][@role="prime"] name(children/*[1])="subscript" not(following-sibling::*) @embellished'.split(" "),'Rule,prime-subscript-simple,brief,[n] children/*[1]/children/*[1]; [n] children/*[2];[n] children/*[1]/children/*[2],self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",name(children/*[1]/children/*[1])="identifier",name(children/*[1]/children/*[2])="number",children/*[1]/children/*[2][@role!="mixed"],children/*[1]/children/*[2][@role!="othernumber"]'.split(","), +["SpecializedRule","prime-subscript-simple","brief","sbrief"],'Rule,overscore,default,[t] "suscrire"; [n] children/*[1]; [t] "avec"; [n] children/*[2],self::overscore,children/*[2][@role="overaccent"]'.split(","),'Rule,double-overscore,default,[t] "sus-suscrire"; [n] children/*[1]; [t] "avec"; [n] children/*[2],self::overscore,children/*[2][@role="overaccent"],name(children/*[1])="overscore",children/*[1]/children/*[2][@role="overaccent"]'.split(","),'Rule,underscore,default,[t] "souscrire"; [n] children/*[1]; [t] "avec"; [n] children/*[2],self::underscore,children/*[2][@role="underaccent"]'.split(","), +'Rule,double-underscore,default,[t] "sous-souscrire"; [n] children/*[1]; [t] "avec"; [n] children/*[2],self::underscore,children/*[2][@role="underaccent"],name(children/*[1])="underscore",children/*[1]/children/*[2][@role="underaccent"]'.split(","),'Rule,matrix-fence,default,[n] children/*[1];,self::fenced,count(children/*)=1,name(children/*[1])="matrix"'.split(","),["Rule","matrix","default",'[t] "d\u00e9but matrice"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin matrice"', +"self::matrix"],["Rule","matrix","sbrief",'[t] "matrice"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin matrice"',"self::matrix"],["Aliases","matrix","self::vector"],["Rule","matrix-row","default",'[m] children/* (ctxtFunc:CTXFordinalCounter,context:"colonne");[p] (pause: 200)',"self::row"],'Rule{row-with-label{default{[t] "avec \u00e9tiquette"; [n] content/*[1]; [t] "fin \u00e9tiquette"(pause: 200); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"colonne"){self::row{content'.split("{"), +'Rule{row-with-label{brief{[t] "\u00e9tiquette"; [n] content/*[1]; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"colonne"){self::row{content'.split("{"),["SpecializedRule","row-with-label","brief","sbrief"],'Rule{row-with-text-label{sbrief{[t] "\u00e9tiquette"; [t] CSFRemoveParens;[m] children/* (ctxtFunc:CTXFordinalCounter,context:"colonne"){self::row{content{name(content/cell/children/*[1])="text"'.split("{"),'Rule;empty-row;default;[t] "vide";self::row;count(children/*)=0'.split(";"),["Rule", +"matrix-cell","default","[n] children/*[1]; [p] (pause: 300)","self::cell"],'Rule,empty-cell,default,[t] "vide"; [p] (pause: 300),self::cell,count(children/*)=0'.split(","),'Rule{determinant{default{[t] "d\u00e9but d\u00e9terminant"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [t] ""; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin d\u00e9terminant"{self::matrix{@role="determinant"'.split("{"),["SpecializedRule","determinant","default","sbrief", +'[t] "d\u00e9terminant"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin d\u00e9terminant"'],'Rule{determinant-simple{default{[t] "d\u00e9but d\u00e9terminant"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e",grammar:simpleDet); [t] "fin d\u00e9terminant"{self::matrix{@role="determinant"{CQFdetIsSimple'.split("{"), +["SpecializedRule","determinant-simple","default","sbrief",'[t] "d\u00e9terminant"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e",grammar:simpleDet); [t] "fin d\u00e9terminant"'],'Rule{row-simple{default{[m] children/*;{self::row{@role="determinant"{contains(@grammar, "simpleDet")'.split("{"),["Rule","layout","default",'[t] "d\u00e9but tableau"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin tableau"', +"self::table"],["Rule","layout","sbrief",'[t] "tableau"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin tableau"',"self::table"],'Rule,binomial,default,[t] "d\u00e9but binomiale"; [n] children/*[2]/children/*[1]; [t] "parmi"; [n] children/*[1]/children/*[1]; [t] "fin binomiale",self::vector,@role="binomial"'.split(","),'Rule,binomial,sbrief,[t] "binomiale"; [n] children/*[1]/children/*[1]; [t] "parmi"; [n] children/*[2]/children/*[1]; [t] "fin binomiale",self::vector,@role="binomial"'.split(","), +["Rule","cases","default",'[t] "d\u00e9but tableau"; [n] content/*[1]; [t] "\u00e9largie";[m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin tableau"',"self::cases"],["Rule","cases","sbrief",'[t] "tableau"; [n] content/*[1]; [t] "\u00e9largie"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin tableau"',"self::cases"],["Aliases","layout","self::multiline"],["Rule","line","default","[m] children/*","self::line"],'Rule,line-with-label,default,[t] "avec etiquette"; [n] content/*[1]; [t] "fin etiquette" (pause: 200); [m] children/*,self::line,content'.split(","), +["SpecializedRule","line-with-label","default","brief",'[t] "etiquette"; [n] content/*[1] (pause: 200); [m] children/*'],["SpecializedRule","line-with-label","brief","sbrief"],'Rule,line-with-text-label,sbrief,[t] "etiquette"; [t] CSFRemoveParens; [m] children/*,self::line,content,name(content/cell/children/*[1])="text"'.split(","),'Rule;empty-line;default;[t] "vide";self::line;count(children/*)=0;not(content)'.split(";"),["SpecializedRule","empty-line","default","brief"],["SpecializedRule","empty-line", +"brief","sbrief"],'Rule,empty-line-with-label,default,[t] "avec etiquette"; [n] content/*[1]; [t] "fin etiquette" (pause: 200); [t] "vide",self::line,count(children/*)=0,content'.split(","),["SpecializedRule","empty-line-with-label","default","brief",'[t] "etiquette"; [n] content/*[1] (pause: 200); [t] "vide"'],["SpecializedRule","empty-line-with-label","brief","sbrief"],["Rule","enclose","default",'[t] "d\u00e9but enfermer en"; [t] @role (grammar:localEnclose); [n] children/*[1]; [t] "fin enfermer"', +"self::enclose"],'Rule,overbar,default,[t] "d\u00e9but trait suscrit"; [n] children/*[1]; [t] "fin trait suscrit",self::enclose,@role="top"'.split(","),'Rule,underbar,default,[t] "d\u00e9but trait souscrit"; [n] children/*[1]; [t] "fin trait souscrit",self::enclose,@role="bottom"'.split(","),'Rule,leftbar,default,[t] "barre verticale"; [n] children/*[1],self::enclose,@role="left"'.split(","),'Rule,rightbar,default,[n] children/*[1]; [t] "barre verticale",self::enclose,@role="right"'.split(","),'Rule,crossout,default,[t] "d\u00e9but biff\u00e9"; [n] children/*[1]; [t] "fin biff\u00e9",self::enclose,@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'.split(","), +'Rule,cancel,default,[t] "d\u00e9but biff\u00e9"; [n] children/*[1]/children/*[1]; [t] "avec"; [n] children/*[2]; [t] "fin biff\u00e9",self::overscore,@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'.split(","),["SpecializedRule","cancel","default","brief"],["SpecializedRule","cancel","default","sbrief"],["Aliases","cancel","self::underscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'],'Rule,cancel-reverse,default,[t] "d\u00e9but biff\u00e9"; [n] children/*[2]/children/*[1]; [t] "avec"; [n] children/*[1]; [t] "fin biff\u00e9",self::overscore,name(children/*[2])="enclose",children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]'.split(","), +["SpecializedRule","cancel-reverse","default","brief"],["SpecializedRule","cancel-reverse","default","sbrief"],["Aliases","cancel-reverse","self::underscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]'],'Rule;end-punct;default;[m] children/*;self::punctuated;@role="endpunct"'.split(";"),'Rule,start-punct,default,[n] content/*[1]; [m] children/*[position()>1],self::punctuated,@role="startpunct"'.split(","),'Rule,integral-punct,default,[n] children/*[1]; [n] children/*[3],self::punctuated,@role="integral"'.split(","), +["Rule","punctuated","default","[m] children/*","self::punctuated"],'Rule;unit;default;[t] text() (grammar:annotation="unit":translate);self::identifier;@role="unit"'.split(";"),'Rule,unit-square,default,[n] children/*[1]; [t] "carr\u00e9",self::superscript,@role="unit",children/*[2][text()=2],name(children/*[1])="identifier"'.split(","),'Rule,unit-cubic,default,[n] children/*[1]; [t] "cubique",self::superscript,@role="unit",children/*[2][text()=3],name(children/*[1])="identifier"'.split(","),'Rule,reciprocal,default,[t] "r\u00e9ciproque"; [n] children/*[1],self::superscript,@role="unit",name(children/*[1])="identifier",name(children/*[2])="prefixop",children/*[2][@role="negative"],children/*[2]/children/*[1][text()=1],count(preceding-sibling::*)=0 or preceding-sibling::*[@role!="unit"]'.split(","), +'Rule,reciprocal,default,[t] "par"; [n] children/*[1],self::superscript,@role="unit",name(children/*[1])="identifier",name(children/*[2])="prefixop",children/*[2][@role="negative"],children/*[2]/children/*[1][text()=1],preceding-sibling::*[@role="unit"]'.split(","),'Rule;unit-combine;default;[m] children/*;self::infixop;@role="unit"'.split(";"),'Rule,unit-divide,default,[n] children/*[1]; [t] "par"; [n] children/*[2],self::fraction,@role="unit"'.split(",")],initialize:[sre.MathspeakUtil.generateTensorRules]};sre.MathspeakGerman={locale:"de",domain:"mathspeak",functions:[["CQF","CQFspaceoutNumber",sre.MathspeakUtil.spaceoutNumber],["CQF","CQFspaceoutIdentifier",sre.MathspeakUtil.spaceoutIdentifier],["CSF","CSFspaceoutText",sre.MathspeakUtil.spaceoutText],["CSF","CSFopenFracVerbose",sre.MathspeakUtil.openingFractionVerbose],["CSF","CSFcloseFracVerbose",sre.MathspeakUtil.closingFractionVerbose],["CSF","CSFoverFracVerbose",sre.MathspeakUtil.overFractionVerbose],["CSF","CSFopenFracBrief",sre.MathspeakUtil.openingFractionBrief], +["CSF","CSFcloseFracBrief",sre.MathspeakUtil.closingFractionBrief],["CSF","CSFopenFracSbrief",sre.MathspeakUtil.openingFractionSbrief],["CSF","CSFcloseFracSbrief",sre.MathspeakUtil.closingFractionSbrief],["CSF","CSFoverFracSbrief",sre.MathspeakUtil.overFractionSbrief],["CSF","CSFvulgarFraction",sre.NumbersUtil.vulgarFraction],["CQF","CQFvulgarFractionSmall",sre.MathspeakUtil.isSmallVulgarFraction],["CSF","CSFopenRadicalVerbose",sre.MathspeakUtil.openingRadicalVerbose],["CSF","CSFcloseRadicalVerbose", +sre.MathspeakUtil.closingRadicalVerbose],["CSF","CSFindexRadicalVerbose",sre.MathspeakUtil.indexRadicalVerbose],["CSF","CSFopenRadicalBrief",sre.MathspeakUtil.openingRadicalBrief],["CSF","CSFcloseRadicalBrief",sre.MathspeakUtil.closingRadicalBrief],["CSF","CSFindexRadicalBrief",sre.MathspeakUtil.indexRadicalBrief],["CSF","CSFopenRadicalSbrief",sre.MathspeakUtil.openingRadicalSbrief],["CSF","CSFindexRadicalSbrief",sre.MathspeakUtil.indexRadicalSbrief],["CSF","CSFsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose], +["CSF","CSFsuperscriptBrief",sre.MathspeakUtil.superscriptBrief],["CSF","CSFsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose],["CSF","CSFsubscriptBrief",sre.MathspeakUtil.subscriptBrief],["CSF","CSFbaselineVerbose",sre.MathspeakUtil.baselineVerbose],["CSF","CSFbaselineBrief",sre.MathspeakUtil.baselineBrief],["CSF","CSFleftsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose],["CSF","CSFleftsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose],["CSF","CSFrightsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose], +["CSF","CSFrightsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose],["CSF","CSFleftsuperscriptBrief",sre.MathspeakUtil.superscriptBrief],["CSF","CSFleftsubscriptBrief",sre.MathspeakUtil.subscriptBrief],["CSF","CSFrightsuperscriptBrief",sre.MathspeakUtil.superscriptBrief],["CSF","CSFrightsubscriptBrief",sre.MathspeakUtil.subscriptBrief],["CSF","CSFunderscript",sre.MathspeakUtil.nestedUnderscore],["CSF","CSFoverscript",sre.MathspeakUtil.nestedOverscore],["CTXF","CTXFordinalCounter",sre.NumbersUtil.ordinalCounter], +["CTXF","CTXFcontentIterator",sre.StoreUtil.contentIterator],["CQF","CQFdetIsSimple",sre.MathspeakUtil.determinantIsSimple],["CSF","CSFRemoveParens",sre.MathspeakUtil.removeParens],["CQF","CQFresetNesting",sre.MathspeakUtil.resetNestingDepth]],rules:['Rule{collapsed{default{[n] . (engine:modality=summary,grammar:collapsed); [t] "kollabiert"{self::*{@alternative{not(contains(@grammar, "collapsed")){self::*{self::*{self::*{self::*{self::*'.split("{"),["SpecializedRule","collapsed","default","brief"], +["SpecializedRule","collapsed","brief","sbrief"],"Rule;stree;default;[n] ./*[1];self::stree;CQFresetNesting".split(";"),["Rule","unknown","default","[n] text()","self::unknown"],'Rule;protected;default;[t] text();self::number;contains(@grammar, "protected")'.split(";"),["Rule","omit-empty","default","[p] (pause:100)","self::empty"],'Rule;blank-empty;default;[t] "leer";self::empty;count(../*)=1;name(../..)="cell" or name(../..)="line"'.split(";"),'Rule{font{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::*{name(self::*)!="number"{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"'.split("{"), +'Rule{font-number{default{[t] @font (grammar:localFontNumber); [n] . (grammar:ignoreFont=@font){self::number{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"'.split("{"),'Rule{font-identifier-short{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::identifier{string-length(text())=1{@font{not(contains(@grammar, "ignoreFont")){@font="normal"{""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", ""){@role!="unit"'.split("{"), +'Rule{font-identifier{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::identifier{string-length(text())=1 or string-length(text())=2{@font{@font="normal"{not(contains(@grammar, "ignoreFont")){@role!="unit"'.split("{"),'Rule;omit-font;default;[n] . (grammar:ignoreFont=@font);self::identifier;string-length(text())=1 or string-length(text())=2;@font;not(contains(@grammar, "ignoreFont"));@font="italic";self::*'.split(";"),'Rule{font-double-struck{default{[n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont){self::*{name(self::*)!="number"{string-length(text())=1 or string-length(text())=2{@font{not(contains(@grammar, "ignoreFont")){@font="double-struck"'.split("{"), +'Rule{font-number-double-struck{default{[n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFontNumber){self::number{string-length(text())=1 or string-length(text())=2{@font{not(contains(@grammar, "ignoreFont")){@font="double-struck"'.split("{"),["Rule","number","default","[n] text()","self::number"],'Rule,mixed-number,default,[n] children/*[1]; [n] children/*[2]; ,self::number,@role="mixed"'.split(","),'Rule{number-with-chars{default{[t] "Zahl"; [m] CQFspaceoutNumber (grammar:protected){self::number{@role="othernumber"{"" != translate(text(), "0123456789.,", ""){not(contains(@grammar, "protected"))'.split("{"), +'Rule{number-as-upper-word{default{[t] "Wort gro\u00df"; [t] CSFspaceoutText{self::number{string-length(text())>1{text()=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9", "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9"){""=translate(text(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9","")'.split("{"), +["SpecializedRule","number-as-upper-word","default","brief"],["SpecializedRule","number-as-upper-word","default","sbrief"],'Rule{number-baseline{default{[t] "Grundlinie"; [n] . (grammar:baseline){self::number{not(contains(@grammar, "ignoreFont")){preceding-sibling::identifier{not(contains(@grammar, "baseline")){preceding-sibling::*[1][@role="latinletter" or @role="greekletter" or @role="otherletter"]{parent::*/parent::infixop[@role="implicit"]'.split("{"),["SpecializedRule","number-baseline","default", +"brief",'[t] "Grund"; [n] . (grammar:baseline)'],["SpecializedRule","number-baseline","brief","sbrief"],'Rule{number-baseline-font{default{[t] "Grundlinie"; [t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::number{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"{preceding-sibling::identifier{preceding-sibling::*[@role="latinletter" or @role="greekletter" or @role="otherletter"]{parent::*/parent::infixop[@role="implicit"]'.split("{"),["SpecializedRule","number-baseline-font", +"default","brief",'[t] "Grund"; [t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)'],["SpecializedRule","number-baseline-font","brief","sbrief"],'Rule;identifier;default;[m] CQFspaceoutIdentifier;self::identifier;string-length(text())>1;@role!="unit";not(@font) or @font="normal" or contains(@grammar, "ignoreFont");text()!=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")'.split(";"), +["Rule","identifier","default","[n] text()","self::identifier"],'Rule,negative,default,[t] "minus"; [n] children/*[1],self::prefixop,@role="negative",children/identifier'.split(","),["Aliases","negative","self::prefixop",'@role="negative"',"children/number"],["Aliases","negative","self::prefixop",'@role="negative"','children/fraction[@role="vulgar"]'],'Rule,negative,default,[t] "minus"; [n] children/*[1],self::prefixop,@role="negative"'.split(","),["Rule","prefix","default","[m] content/*; [n] children/*[1]", +"self::prefixop"],["Rule","postfix","default","[n] children/*[1]; [m] content/*","self::postfixop"],["Rule","binary-operation","default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop"],'Rule;implicit;default;[m] children/*;self::infixop;@role="implicit"'.split(";"),["Aliases","implicit","self::infixop",'@role="leftsuper" or @role="leftsub" or @role="rightsuper" or @role="rightsub"'],'Rule,subtraction,default,[m] children/* (separator:"minus");,self::infixop,@role="subtraction"'.split(","), +["Rule","function-unknown","default","[n] children/*[1]; [n] children/*[2]","self::appl"],'Rule,function-prefix,default,[n] children/*[1]; [n] children/*[2],self::appl,children/*[1][@role="prefix function"]'.split(","),'Rule,fences-open-close,default,[n] content/*[1]; [n] children/*[1]; [n] content/*[2],self::fenced,@role="leftright"'.split(","),'Rule,fences-neutral,default,[t] "Anfang Betrag"; [n] children/*[1]; [t] "Ende Betrag",self::fenced,@role="neutral",content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"'.split(","), +["SpecializedRule","fences-neutral","default","sbrief",'[t] "Betrag"; [n] children/*[1]; [t] "Ende Betrag"'],'Rule,fences-neutral,default,[n] content/*[1]; [n] children/*[1]; [n] content/*[2],self::fenced,@role="neutral"'.split(","),'Rule,fences-set,default,[t] "Anfang Menge"; [n] children/*[1]; [t] "Ende Menge",self::fenced,@role="set empty" or @role="set extended" or @role="set singleton" or @role="set collection",not(name(../..)="appl")'.split(","),["SpecializedRule","fences-set","default","sbrief", +'[t] "Menge"; [n] children/*[1]; [t] "Ende Menge"'],["Rule","text","default","[n] text()","self::text"],'Rule;factorial;default;[t] "Fakult\u00e4t";self::punctuation;text()="!";name(preceding-sibling::*[1])!="text"'.split(";"),'Rule;minus;default;[t] "minus";self::operator;text()="-"'.split(";"),'Rule;single-prime;default;[t] "Strich";self::punctuated;@role="prime";count(children/*)=1'.split(";"),'Rule;double-prime;default;[t] "zwei Strich";self::punctuated;@role="prime";count(children/*)=2'.split(";"), +'Rule;triple-prime;default;[t] "drei Strich";self::punctuated;@role="prime";count(children/*)=3'.split(";"),'Rule;quadruple-prime;default;[t] "vier Strich";self::punctuated;@role="prime";count(children/*)=4'.split(";"),'Rule,counted-prime,default,[t] count(children/*); [t] "Strich",self::punctuated,@role="prime"'.split(","),["Rule","fraction","default","[t] CSFopenFracVerbose; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracVerbose","self::fraction"],["Rule","fraction", +"brief","[t] CSFopenFracBrief; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracBrief","self::fraction"],["Rule","fraction","sbrief","[t] CSFopenFracSbrief; [n] children/*[1]; [t] CSFoverFracSbrief; [n] children/*[2]; [t] CSFcloseFracSbrief","self::fraction"],'Rule;vulgar-fraction;default;[t] CSFvulgarFraction (grammar:correctOne);self::fraction;@role="vulgar";CQFvulgarFractionSmall'.split(";"),["SpecializedRule","vulgar-fraction","default","brief"],["SpecializedRule", +"vulgar-fraction","default","sbrief"],'Rule,continued-fraction-outer,default,[t] "Kettenbruch"; [n] children/*[1];[t] "durch"; [n] children/*[2],self::fraction,not(ancestor::fraction),children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]'.split(","),'Rule,continued-fraction-inner,default,[t] "Anfang Bruch"; [n] children/*[1];[t] "durch"; [n] children/*[2],self::fraction,ancestor::fraction,children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]'.split(","), +["SpecializedRule","continued-fraction-inner","default","sbrief",'[t] "Bruch"; [n] children/*[1];[t] "durch"; [n] children/*[2]'],["Rule","sqrt","default","[t] CSFopenRadicalVerbose; [n] children/*[1]; [t] CSFcloseRadicalVerbose","self::sqrt"],["Rule","sqrt","brief","[t] CSFopenRadicalBrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt"],["Rule","sqrt","sbrief","[t] CSFopenRadicalSbrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt"],"Rule,root-small,default,[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose,self::root,children/*[1][text()=3 or text()=2]".split(","), +"Rule,root-small,brief,[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief,self::root,children/*[1][text()=3 or text()=2]".split(","),"Rule,root-small,sbrief,[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief,self::root,children/*[1][text()=3 or text()=2]".split(","),["Rule","root","default","[t] CSFindexRadicalVerbose; [n] children/*[1];[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose","self::root"],["Rule","root","brief","[t] CSFindexRadicalBrief; [n] children/*[1];[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief", +"self::root"],["Rule","root","sbrief","[t] CSFindexRadicalSbrief; [n] children/*[1];[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root"],'Rule,limboth,default,[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3],self::limboth,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","),'Rule,limlower,default,[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];,self::limlower,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","), +'Rule,limupper,default,[n] children/*[1]; [t] CSFoverscript; [n] children/*[2];,self::limupper,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","),'Aliases;limlower;self::underscore;@role="limit function";name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"),'Aliases;limlower;self::underscore;children/*[2][@role!="underaccent"];name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"), +'Aliases;limupper;self::overscore;children/*[2][@role!="overaccent"];name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"),["Rule","limboth-end","default",'[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3]; [t] "Ende \u00dcberschrift"',"self::limboth"],["Rule","limlower-end","default",'[n] children/*[1]; [t] CSFunderscript; [n] children/*[2]; [t] "Ende Unterschrift"',"self::limlower"], +["Rule","limupper-end","default",'[n] children/*[1]; [t] CSFoverscript; [n] children/*[2]; [t] "Ende \u00dcberschrift"',"self::limupper"],["Aliases","limlower-end","self::underscore",'@role="limit function"'],["Aliases","limlower-end","self::underscore"],["Aliases","limupper-end","self::overscore"],["Rule","integral","default","[n] children/*[1]; [n] children/*[2]; [n] children/*[3];","self::integral"],'Rule,integral,default,[n] children/*[1]; [t] "Index"; [n] children/*[2];[t] "Hoch"; [n] children/*[3]; [t] "Grundlinie";,self::limboth,@role="integral"'.split(","), +["SpecializedRule","integral","default","brief",'[n] children/*[1]; [t] "Index"; [n] children/*[2];[t] "Hoch"; [n] children/*[3]; [t] "Base";'],["SpecializedRule","integral","brief","sbrief"],["Rule","bigop","default","[n] children/*[1]; [n] children/*[2];","self::bigop"],["Rule","relseq","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq"],'Rule,equality,default,[n] children/*[1]; [n] content/*[1]; [n] children/*[2],self::relseq,@role="equality",count(./children/*)=2'.split(","), +'Rule;multi-equality;default;[m] children/* (sepFunc:CTXFcontentIterator);self::relseq;@role="equality";count(./children/*)>2'.split(";"),["Rule","multrel","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::multirel"],["Rule","subscript","default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]","self::subscript"],["Rule","subscript","brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]","self::subscript"],["SpecializedRule","subscript","brief","sbrief"], +'Rule,subscript-simple,default,[n] children/*[1]; [n] children/*[2],self::subscript,name(./children/*[1])="identifier",name(./children/*[2])="number",./children/*[2][@role!="mixed"],./children/*[2][@role!="othernumber"]'.split(","),["SpecializedRule","subscript-simple","default","brief"],["SpecializedRule","subscript-simple","default","sbrief"],'Rule,subscript-baseline,default,[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]; [t] CSFbaselineVerbose,self::subscript,following-sibling::*,not(name(following-sibling::subscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="subscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and @role!="subsup",not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])'.split(","), +["SpecializedRule","subscript-baseline","default","brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]; [t] CSFbaselineBrief"],["SpecializedRule","subscript-baseline","brief","sbrief"],'Aliases;subscript-baseline;self::subscript;not(following-sibling::*);ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::punctuated|ancestor::fraction;not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])'.split(";"),["Aliases","subscript-baseline", +"self::subscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel",sre.MathspeakUtil.generateBaselineConstraint()],["Aliases","subscript-baseline","self::subscript","not(following-sibling::*)","@embellished"],'Rule,subscript-empty-sup,default,[n] children/*[1]; [n] children/*[2],self::subscript,name(children/*[2])="infixop",name(children/*[2][@role="implicit"]/children/*[1])="superscript",name(children/*[2]/children/*[1]/children/*[1])="empty"'.split(","),["SpecializedRule","subscript-empty-sup", +"default","brief"],["SpecializedRule","subscript-empty-sup","brief","sbrief"],["Aliases","subscript-empty-sup","self::subscript",'name(children/*[2])="superscript"','name(children/*[2]/children/*[1])="empty"'],["Rule","superscript","default","[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2]","self::superscript"],["SpecializedRule","superscript","default","brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2]"],["SpecializedRule","superscript","brief","sbrief"],'Rule,superscript-baseline,default,[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2];[t] CSFbaselineVerbose,self::superscript,following-sibling::*,not(name(following-sibling::superscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="superscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])'.split(","), +["SpecializedRule","superscript-baseline","default","brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2];[t] CSFbaselineBrief"],["SpecializedRule","superscript-baseline","brief","sbrief"],'Aliases;superscript-baseline;self::superscript;not(following-sibling::*);ancestor::punctuated;ancestor::*/following-sibling::* and not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])'.split(";"),["Aliases","superscript-baseline","self::superscript", +"not(following-sibling::*)","ancestor::fraction|ancestor::fenced|ancestor::root|ancestor::sqrt"],["Aliases","superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel","not(@embellished)",sre.MathspeakUtil.generateBaselineConstraint()],'Aliases superscript-baseline self::superscript not(following-sibling::*) @embellished not(children/*[2][@role="prime"])'.split(" "),'Rule,superscript-empty-sub,default,[n] children/*[1]; [n] children/*[2],self::superscript,name(children/*[2])="infixop",name(children/*[2][@role="implicit"]/children/*[1])="subscript",name(children/*[2]/children/*[1]/children/*[1])="empty"'.split(","), +["SpecializedRule","superscript-empty-sub","default","brief"],["SpecializedRule","superscript-empty-sub","brief","sbrief"],["Aliases","superscript-empty-sub","self::superscript",'name(children/*[2])="subscript"','name(children/*[2]/children/*[1])="empty"'],'Rule,square,default,[n] children/*[1]; [t] "Quadrat",self::superscript,children/*[2],children/*[2][text()=2],name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree")),name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"]),not(@embellished)'.split(","), +["SpecializedRule","square","default","brief"],["SpecializedRule","square","default","sbrief"],'Aliases;square;self::superscript;children/*[2];children/*[2][text()=2];@embellished;children/*[1][@role="prefix operator"]'.split(";"),'Rule,cube,default,[n] children/*[1]; [t] "Kubik",self::superscript,children/*[2],children/*[2][text()=3],name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree")),name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"]),not(@embellished)'.split(","), +["SpecializedRule","cube","default","brief"],["SpecializedRule","cube","default","sbrief"],'Aliases;cube;self::superscript;children/*[2];children/*[2][text()=3];@embellished;children/*[1][@role="prefix operator"]'.split(";"),'Rule,prime,default,[n] children/*[1]; [n] children/*[2],self::superscript,children/*[2],children/*[2][@role="prime"]'.split(","),["SpecializedRule","prime","default","brief"],["SpecializedRule","prime","default","sbrief"],'Rule,prime-subscript,default,[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2],self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",not(following-sibling::*)'.split(","), +["SpecializedRule","prime-subscript","default","brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]"],["SpecializedRule","prime-subscript","brief","sbrief"],'Rule,prime-subscript-baseline,default,[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]; [t] CSFbaselineVerbose,self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",following-sibling::*'.split(","), +["SpecializedRule","prime-subscript-baseline","default","brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]; [t] CSFbaselineBrief"],["SpecializedRule","prime-subscript-baseline","brief","sbrief"],'Aliases prime-subscript-baseline self::superscript children/*[2][@role="prime"] name(children/*[1])="subscript" not(following-sibling::*) @embellished'.split(" "),'Rule,prime-subscript-simple,default,[n] children/*[1]/children/*[1]; [n] children/*[2];[n] children/*[1]/children/*[2],self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",name(children/*[1]/children/*[1])="identifier",name(children/*[1]/children/*[2])="number",children/*[1]/children/*[2][@role!="mixed"],children/*[1]/children/*[2][@role!="othernumber"]'.split(","), +["SpecializedRule","prime-subscript-simple","default","brief"],["SpecializedRule","prime-subscript-simple","default","sbrief"],'Rule,overscore,default,[t] "modifiziert oben"; [n] children/*[1]; [t] "mit"; [n] children/*[2],self::overscore,children/*[2][@role="overaccent"]'.split(","),["SpecializedRule","overscore","default","brief",'[t] "mod oben"; [n] children/*[1]; [t] "mit"; [n] children/*[2]'],["SpecializedRule","overscore","brief","sbrief"],'Rule,double-overscore,default,[t] "modifiziert oben oben"; [n] children/*[1]; [t] "mit"; [n] children/*[2],self::overscore,children/*[2][@role="overaccent"],name(children/*[1])="overscore",children/*[1]/children/*[2][@role="overaccent"]'.split(","), +["SpecializedRule","double-overscore","default","brief",'[t] "mod oben oben"; [n] children/*[1]; [t] "mit"; [n] children/*[2]'],["SpecializedRule","double-overscore","brief","sbrief"],'Rule,underscore,default,[t] "modifiziert unten"; [n] children/*[1]; [t] "mit"; [n] children/*[2],self::underscore,children/*[2][@role="underaccent"]'.split(","),["SpecializedRule","underscore","default","brief",'[t] "mod unten"; [n] children/*[1]; [t] "mit"; [n] children/*[2]'],["SpecializedRule","underscore","brief", +"sbrief"],'Rule,double-underscore,default,[t] "modifiziert unten unten"; [n] children/*[1]; [t] "mit"; [n] children/*[2],self::underscore,children/*[2][@role="underaccent"],name(children/*[1])="underscore",children/*[1]/children/*[2][@role="underaccent"]'.split(","),["SpecializedRule","double-underscore","default","brief",'[t] "mod unten unten"; [n] children/*[1]; [t] "mit"; [n] children/*[2]'],["SpecializedRule","double-underscore","brief","sbrief"],'Rule,overbar,default,[n] children/*[1]; [t] "\u00dcberstrich",self::overscore,@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][@role="overaccent"],children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]'.split(","), +'Rule,underbar,default,[n] children/*[1]; [t] "Unterstrich",self::underscore,@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][@role="underaccent"],children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]'.split(","),'Rule,overtilde,default,[n] children/*[1]; [t] "Tilde oben",self::overscore,children/*[2][@role="overaccent"],@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][text()="~" or text()="\u02dc" or text()="\u223c" or text()="\uff5e"]'.split(","), +'Rule,undertilde,default,[n] children/*[1]; [t] "Tilde unten",self::underscore,@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][@role="underaccent"],children/*[2][text()="~" or text()="\u02dc" or text()="\u223c" or text()="\uff5e"]'.split(","),'Rule,matrix-fence,default,[n] children/*[1];,self::fenced,count(children/*)=1,name(children/*[1])="matrix"'.split(","),["Rule","matrix","default",'[t] "Anfang"; [t] count(children/*); [t] "mal";[t] count(children/*[1]/children/*); [t] "Matrize"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Zeile "); [t] "Ende Matrize"', +"self::matrix"],["Rule","matrix","sbrief",'[t] count(children/*); [t] "mal";[t] count(children/*[1]/children/*); [t] "Matrize"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Zeile "); [t] "Ende Matrize"',"self::matrix"],["Aliases","matrix","self::vector"],["Rule","matrix-row","default",'[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Spalte");[p] (pause: 200)',"self::row"],'Rule{row-with-label{default{[t] "mit Bezeichner"; [n] content/*[1]; [t] "Ende Bezeichner"(pause: 200); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Spalte"){self::row{content'.split("{"), +'Rule{row-with-label{brief{[t] "Bezeichner"; [n] content/*[1]; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Spalte"){self::row{content'.split("{"),["SpecializedRule","row-with-label","brief","sbrief"],'Rule{row-with-text-label{sbrief{[t] "Bezeichner"; [t] CSFRemoveParens;[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Spalte"){self::row{content{name(content/cell/children/*[1])="text"'.split("{"),'Rule;empty-row;default;[t] "Blank";self::row;count(children/*)=0'.split(";"),["Rule","matrix-cell", +"default","[n] children/*[1]; [p] (pause: 300)","self::cell"],'Rule,empty-cell,default,[t] "leer"; [p] (pause: 300),self::cell,count(children/*)=0'.split(","),'Rule{determinant{default{[t] "Anfang"; [t] count(children/*); [t] "mal";[t] count(children/*[1]/children/*); [t] "Determinante"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Zeile "); [t] "Ende Determinante"{self::matrix{@role="determinant"'.split("{"),["SpecializedRule","determinant","default","sbrief",'[t] count(children/*); [t] "mal";[t] count(children/*[1]/children/*); [t] "Determinante"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Zeile "); [t] "Ende Determinante"'], +'Rule{determinant-simple{default{[t] "Anfang"; [t] count(children/*); [t] "mal";[t] count(children/*[1]/children/*); [t] "Determinante"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Zeile",grammar:simpleDet); [t] "Ende Determinante"{self::matrix{@role="determinant"{CQFdetIsSimple'.split("{"),["SpecializedRule","determinant-simple","default","sbrief",'[t] count(children/*); [t] "mal";[t] count(children/*[1]/children/*); [t] "Determinante"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Zeile",grammar:simpleDet); [t] "Ende Determinante"'], +'Rule{row-simple{default{[m] children/*;{self::row{@role="determinant"{contains(@grammar, "simpleDet")'.split("{"),["Rule","layout","default",'[t] "Anfang Anordnung"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Zeile "); [t] "Ende Anordnung"',"self::table"],["Rule","layout","sbrief",'[t] "Anordnung"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Zeile "); [t] "Ende Anordnung"',"self::table"],'Rule,binomial,default,[t] "Anfang Binomialkoeffizient"; [n] children/*[2]/children/*[1]; [t] "aus"; [n] children/*[1]/children/*[1]; [t] "Ende Binomialkoeffizient",self::vector,@role="binomial"'.split(","), +'Rule,binomial,brief,[t] "Anfang Binomial"; [n] children/*[2]/children/*[1]; [t] "aus"; [n] children/*[1]/children/*[1]; [t] "Ende Binomial",self::vector,@role="binomial"'.split(","),'Rule,binomial,sbrief,[t] "Binomial"; [n] children/*[2]/children/*[1]; [t] "aus"; [n] children/*[1]/children/*[1]; [t] "Ende Binomial",self::vector,@role="binomial"'.split(","),["Rule","cases","default",'[t] "Anfang Fallunterscheidung"; [t] "gro\u00dfe"; [n] content/*[1];[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Zeile "); [t] "Ende Fallunterscheidung"', +"self::cases"],["Rule","cases","brief",'[t] "Anfang F\u00e4lle"; [t] "gro\u00dfe"; [n] content/*[1];[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Zeile "); [t] "Ende F\u00e4lle"',"self::cases"],["Rule","cases","sbrief",'[t] "F\u00e4lle"; [t] "gro\u00dfe"; [n] content/*[1];[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Zeile "); [t] "Ende F\u00e4lle"',"self::cases"],["Aliases","layout","self::multiline"],["Rule","line","default","[m] children/*","self::line"],'Rule,line-with-label,default,[t] "mit Bezeichner"; [n] content/*[1]; [t] "Ende Bezeichner" (pause: 200); [m] children/*,self::line,content'.split(","), +["SpecializedRule","line-with-label","default","brief",'[t] "Bezeichner"; [n] content/*[1] (pause: 200); [m] children/*'],["SpecializedRule","line-with-label","brief","sbrief"],'Rule,line-with-text-label,sbrief,[t] "Bezeichner"; [t] CSFRemoveParens; [m] children/*,self::line,content,name(content/cell/children/*[1])="text"'.split(","),'Rule;empty-line;default;[t] "leer";self::line;count(children/*)=0;not(content)'.split(";"),["SpecializedRule","empty-line","default","brief"],["SpecializedRule","empty-line", +"brief","sbrief"],'Rule,empty-line-with-label,default,[t] "mit Bezeichner"; [n] content/*[1]; [t] "Ende Bezeichner"(pause: 200); [t] "leer",self::line,count(children/*)=0,content'.split(","),["SpecializedRule","empty-line-with-label","default","brief",'[t] "Bezeichner"; [n] content/*[1] (pause: 200); [t] "leer"'],["SpecializedRule","empty-line-with-label","brief","sbrief"],["Rule","enclose","default",'[t] "Anfang Umschlie\u00dfung"; [t] @role (grammar:localEnclose); [n] children/*[1]; [t] "Ende Umschlie\u00dfung"', +"self::enclose"],["Aliases","overbar","self::enclose",'@role="top"'],["Aliases","underbar","self::enclose",'@role="bottom"'],'Rule,leftbar,default,[t] "senkrechter Strich"; [n] children/*[1],self::enclose,@role="left"'.split(","),'Rule,rightbar,default,[n] children/*[1]; [t] "senkrechter Strich",self::enclose,@role="right"'.split(","),'Rule,crossout,default,[t] "durchgestrichen"; [n] children/*[1]; [t] "Ende duchgestrichen",self::enclose,@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'.split(","), +'Rule,cancel,default,[t] "durchgestrichen"; [n] children/*[1]/children/*[1]; [t] "mit"; [n] children/*[2]; [t] "Ende duchgestrichen",self::overscore,@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'.split(","),["SpecializedRule","cancel","default","brief"],["SpecializedRule","cancel","default","sbrief"],["Aliases","cancel","self::underscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'],'Rule,cancel-reverse,default,[t] "durchgestrichen"; [n] children/*[2]/children/*[1]; [t] "mit"; [n] children/*[1]; [t] "Ende duchgestrichen",self::overscore,name(children/*[2])="enclose",children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]'.split(","), +["SpecializedRule","cancel-reverse","default","brief"],["SpecializedRule","cancel-reverse","default","sbrief"],["Aliases","cancel-reverse","self::underscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]'],'Rule;end-punct;default;[m] children/*;self::punctuated;@role="endpunct"'.split(";"),'Rule,start-punct,default,[n] content/*[1]; [m] children/*[position()>1],self::punctuated,@role="startpunct"'.split(","),'Rule,integral-punct,default,[n] children/*[1]; [n] children/*[3],self::punctuated,@role="integral"'.split(","), +["Rule","punctuated","default","[m] children/*","self::punctuated"],'Rule;unit;default;[t] text() (grammar:annotation="unit":translate:plural);self::identifier;@role="unit"'.split(";"),'Rule,unit-square,default,[t] "Quadrat"; [n] children/*[1],self::superscript,@role="unit",children/*[2][text()=2],name(children/*[1])="identifier"'.split(","),'Rule,unit-cubic,default,[t] "Kubik"; [n] children/*[1],self::superscript,@role="unit",children/*[2][text()=3],name(children/*[1])="identifier"'.split(","),'Rule,reciprocal,default,[n] children/*[1]; [t] "invers",self::superscript,@role="unit",name(children/*[1])="identifier",name(children/*[2])="prefixop",children/*[2][@role="negative"],children/*[2]/children/*[1][text()=1],count(preceding-sibling::*)=0 or preceding-sibling::*[@role!="unit"]'.split(","), +'Rule,reciprocal,default,[t] "pro"; [n] children/*[1],self::superscript,@role="unit",name(children/*[1])="identifier",name(children/*[2])="prefixop",children/*[2][@role="negative"],children/*[2]/children/*[1][text()=1],preceding-sibling::*[@role="unit"]'.split(","),'Rule;unit-combine;default;[m] children/*;self::infixop;@role="unit"'.split(";"),'Rule,unit-divide,default,[n] children/*[1]; [t] "pro"; [n] children/*[2],self::fraction,@role="unit"'.split(","),["Rule","inference","default",'[t] "Schlussregel"; [m] content/*; [t] "mit Folgerung"; [n] children/*[1]; [t] "aus"; [t] count(children/*[2]/children/*); [t] "Pr\u00e4missen"', +"self::inference"],'Rule,inference,default,[t] "Schlussregel"; ; [m] content/*; [t] "mit Folgerung"; [n] children/*[1]; [t] "aus"; [t] count(children/*[2]/children/*); [t] "Pr\u00e4misse",self::inference,count(children/*[2]/children/*)<2'.split(","),["Rule","premise","default",'[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Pr\u00e4misse ");',"self::premises"],["Rule","conclusion","default","[n] children/*[1]","self::conclusion"],["Rule","label","default",'[t] "Regel"; [n] children/*[1]',"self::rulelabel"], +'Rule,axiom,default,[t] "Axiom"; [m] children/*[1];,self::inference,@role="axiom"'.split(","),'Rule,axiom,default,[t] "leeres Axiom";,self::empty,@role="axiom"'.split(",")],initialize:[sre.MathspeakUtil.generateTensorRules]};sre.MathspeakRules={domain:"mathspeak",functions:[["CQF","CQFspaceoutNumber",sre.MathspeakUtil.spaceoutNumber],["CQF","CQFspaceoutIdentifier",sre.MathspeakUtil.spaceoutIdentifier],["CSF","CSFspaceoutText",sre.MathspeakUtil.spaceoutText],["CSF","CSFopenFracVerbose",sre.MathspeakUtil.openingFractionVerbose],["CSF","CSFcloseFracVerbose",sre.MathspeakUtil.closingFractionVerbose],["CSF","CSFoverFracVerbose",sre.MathspeakUtil.overFractionVerbose],["CSF","CSFopenFracBrief",sre.MathspeakUtil.openingFractionBrief], +["CSF","CSFcloseFracBrief",sre.MathspeakUtil.closingFractionBrief],["CSF","CSFopenFracSbrief",sre.MathspeakUtil.openingFractionSbrief],["CSF","CSFcloseFracSbrief",sre.MathspeakUtil.closingFractionSbrief],["CSF","CSFoverFracSbrief",sre.MathspeakUtil.overFractionSbrief],["CSF","CSFvulgarFraction",sre.NumbersUtil.vulgarFraction],["CQF","CQFvulgarFractionSmall",sre.MathspeakUtil.isSmallVulgarFraction],["CSF","CSFopenRadicalVerbose",sre.MathspeakUtil.openingRadicalVerbose],["CSF","CSFcloseRadicalVerbose", +sre.MathspeakUtil.closingRadicalVerbose],["CSF","CSFindexRadicalVerbose",sre.MathspeakUtil.indexRadicalVerbose],["CSF","CSFopenRadicalBrief",sre.MathspeakUtil.openingRadicalBrief],["CSF","CSFcloseRadicalBrief",sre.MathspeakUtil.closingRadicalBrief],["CSF","CSFindexRadicalBrief",sre.MathspeakUtil.indexRadicalBrief],["CSF","CSFopenRadicalSbrief",sre.MathspeakUtil.openingRadicalSbrief],["CSF","CSFindexRadicalSbrief",sre.MathspeakUtil.indexRadicalSbrief],["CSF","CSFsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose], +["CSF","CSFsuperscriptBrief",sre.MathspeakUtil.superscriptBrief],["CSF","CSFsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose],["CSF","CSFsubscriptBrief",sre.MathspeakUtil.subscriptBrief],["CSF","CSFbaselineVerbose",sre.MathspeakUtil.baselineVerbose],["CSF","CSFbaselineBrief",sre.MathspeakUtil.baselineBrief],["CSF","CSFleftsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose],["CSF","CSFleftsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose],["CSF","CSFrightsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose], +["CSF","CSFrightsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose],["CSF","CSFleftsuperscriptBrief",sre.MathspeakUtil.superscriptBrief],["CSF","CSFleftsubscriptBrief",sre.MathspeakUtil.subscriptBrief],["CSF","CSFrightsuperscriptBrief",sre.MathspeakUtil.superscriptBrief],["CSF","CSFrightsubscriptBrief",sre.MathspeakUtil.subscriptBrief],["CSF","CSFunderscript",sre.MathspeakUtil.nestedUnderscore],["CSF","CSFoverscript",sre.MathspeakUtil.nestedOverscore],["CTXF","CTXFordinalCounter",sre.NumbersUtil.ordinalCounter], +["CTXF","CTXFcontentIterator",sre.StoreUtil.contentIterator],["CQF","CQFdetIsSimple",sre.MathspeakUtil.determinantIsSimple],["CSF","CSFRemoveParens",sre.MathspeakUtil.removeParens],["CQF","CQFresetNesting",sre.MathspeakUtil.resetNestingDepth]],rules:['Rule{collapsed{default{[t] "collapsed"; [n] . (engine:modality=summary,grammar:collapsed){self::*{@alternative{not(contains(@grammar, "collapsed")){self::*{self::*{self::*{self::*{self::*'.split("{"),["SpecializedRule","collapsed","default","brief"], +["SpecializedRule","collapsed","brief","sbrief"],"Rule;stree;default;[n] ./*[1];self::stree;CQFresetNesting".split(";"),["Rule","unknown","default","[n] text()","self::unknown"],'Rule;protected;default;[t] text();self::number;contains(@grammar, "protected")'.split(";"),["Rule","omit-empty","default","[p] (pause:100)","self::empty"],'Rule;blank-empty;default;[t] "Blank";self::empty;count(../*)=1;name(../..)="cell" or name(../..)="line"'.split(";"),'Rule{font{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::*{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"'.split("{"), +'Rule{font-identifier-short{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::identifier{string-length(text())=1{@font{not(contains(@grammar, "ignoreFont")){@font="normal"{""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", ""){@role!="unit"'.split("{"), +'Rule{font-identifier{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::identifier{string-length(text())=1{@font{@font="normal"{not(contains(@grammar, "ignoreFont")){@role!="unit"'.split("{"),'Rule;omit-font;default;[n] . (grammar:ignoreFont=@font);self::identifier;string-length(text())=1;@font;not(contains(@grammar, "ignoreFont"));@font="italic"'.split(";"),'Rule{german-font{default{[t] "German"; [n] . (grammar:ignoreFont=@font){self::*{@font{not(contains(@grammar, "ignoreFont")){@font="fraktur"'.split("{"), +'Rule{german-font{default{[t] "bold German"; [n] . (grammar:ignoreFont=@font){self::*{@font{not(contains(@grammar, "ignoreFont")){@font="bold-fraktur"'.split("{"),["Rule","number","default","[n] text()","self::number"],'Rule,mixed-number,default,[n] children/*[1]; [t] "and"; [n] children/*[2]; ,self::number,@role="mixed"'.split(","),'Rule{number-with-chars{default{[t] "Number"; [m] CQFspaceoutNumber (grammar:protected){self::number{@role="othernumber"{"" != translate(text(), "0123456789.,", ""){not(contains(@grammar, "protected"))'.split("{"), +["SpecializedRule","number-with-chars","default","brief",'[t] "Num"; [m] CQFspaceoutNumber (grammar:protected)'],["SpecializedRule","number-with-chars","brief","sbrief"],'Rule{number-as-upper-word{default{[t] "UpperWord"; [t] CSFspaceoutText{self::number{string-length(text())>1{text()=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9", "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9"){""=translate(text(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9","")'.split("{"), +["SpecializedRule","number-as-upper-word","default","brief"],["SpecializedRule","number-as-upper-word","default","sbrief"],'Rule{number-baseline{default{[t] "Baseline"; [n] . (grammar:baseline){self::number{not(contains(@grammar, "ignoreFont")){preceding-sibling::identifier{not(contains(@grammar, "baseline")){preceding-sibling::*[1][@role="latinletter" or @role="greekletter" or @role="otherletter"]{parent::*/parent::infixop[@role="implicit"]'.split("{"),["SpecializedRule","number-baseline","default", +"brief",'[t] "Base"; [n] . (grammar:baseline)'],["SpecializedRule","number-baseline","brief","sbrief"],'Rule{number-baseline-font{default{[t] "Baseline"; [t] @font; [n] . (grammar:ignoreFont=@font){self::number{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"{preceding-sibling::identifier{preceding-sibling::*[@role="latinletter" or @role="greekletter" or @role="otherletter"]{parent::*/parent::infixop[@role="implicit"]'.split("{"),["SpecializedRule","number-baseline-font","default","brief", +'[t] "Base"; [t] @font; [n] . (grammar:ignoreFont=@font)'],["SpecializedRule","number-baseline-font","brief","sbrief"],'Rule;identifier;default;[m] CQFspaceoutIdentifier;self::identifier;string-length(text())>1;@role!="unit";not(@font) or @font="normal" or contains(@grammar, "ignoreFont");text()!=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")'.split(";"), +["Rule","identifier","default","[n] text()","self::identifier"],'Rule,negative,default,[t] "negative"; [n] children/*[1],self::prefixop,@role="negative",children/identifier'.split(","),["Aliases","negative","self::prefixop",'@role="negative"',"children/number"],["Aliases","negative","self::prefixop",'@role="negative"','children/fraction[@role="vulgar"]'],'Rule,negative,default,[t] "minus"; [n] children/*[1],self::prefixop,@role="negative"'.split(","),["Rule","prefix","default","[m] content/*; [n] children/*[1]", +"self::prefixop"],["Rule","postfix","default","[n] children/*[1]; [m] content/*","self::postfixop"],["Rule","binary-operation","default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop"],'Rule;implicit;default;[m] children/*;self::infixop;@role="implicit"'.split(";"),["Aliases","implicit","self::infixop",'@role="leftsuper" or @role="leftsub" or @role="rightsuper" or @role="rightsub"'],'Rule,subtraction,default,[m] children/* (separator:"minus");,self::infixop,@role="subtraction"'.split(","), +["Rule","function-unknown","default","[n] children/*[1]; [n] children/*[2]","self::appl"],'Rule,function-prefix,default,[n] children/*[1]; [n] children/*[2],self::appl,children/*[1][@role="prefix function"]'.split(","),'Rule,fences-open-close,default,[n] content/*[1]; [n] children/*[1]; [n] content/*[2],self::fenced,@role="leftright"'.split(","),'Rule,fences-neutral,default,[t] "StartAbsoluteValue"; [n] children/*[1]; [t] "EndAbsoluteValue",self::fenced,@role="neutral",content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"'.split(","), +["SpecializedRule","fences-neutral","default","sbrief",'[t] "AbsoluteValue"; [n] children/*[1]; [t] "EndAbsoluteValue"'],'Rule,fences-neutral,default,[n] content/*[1]; [n] children/*[1]; [n] content/*[2],self::fenced,@role="neutral"'.split(","),'Rule,fences-set,default,[t] "StartSet"; [n] children/*[1]; [t] "EndSet",self::fenced,@role="set empty" or @role="set extended" or @role="set singleton" or @role="set collection",not(name(../..)="appl")'.split(","),["SpecializedRule","fences-set","default", +"sbrief",'[t] "Set"; [n] children/*[1]; [t] "EndSet"'],["Rule","text","default","[n] text()","self::text"],'Rule;factorial;default;[t] "factorial";self::punctuation;text()="!";name(preceding-sibling::*[1])!="text"'.split(";"),'Rule;minus;default;[t] "minus";self::operator;text()="-"'.split(";"),'Rule;single-prime;default;[t] "prime";self::punctuated;@role="prime";count(children/*)=1'.split(";"),'Rule;double-prime;default;[t] "double prime";self::punctuated;@role="prime";count(children/*)=2'.split(";"), +'Rule;triple-prime;default;[t] "triple prime";self::punctuated;@role="prime";count(children/*)=3'.split(";"),'Rule;quadruple-prime;default;[t] "quadruple prime";self::punctuated;@role="prime";count(children/*)=4'.split(";"),'Rule,counted-prime,default,[t] count(children/*); [t] "prime",self::punctuated,@role="prime"'.split(","),["Rule","fraction","default","[t] CSFopenFracVerbose; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracVerbose","self::fraction"],["Rule","fraction", +"brief","[t] CSFopenFracBrief; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracBrief","self::fraction"],["Rule","fraction","sbrief","[t] CSFopenFracSbrief; [n] children/*[1]; [t] CSFoverFracSbrief; [n] children/*[2]; [t] CSFcloseFracSbrief","self::fraction"],'Rule;vulgar-fraction;default;[t] CSFvulgarFraction;self::fraction;@role="vulgar";CQFvulgarFractionSmall'.split(";"),["SpecializedRule","vulgar-fraction","default","brief"],["SpecializedRule","vulgar-fraction","default", +"sbrief"],'Rule,continued-fraction-outer,default,[t] "ContinuedFraction"; [n] children/*[1];[t] "Over"; [n] children/*[2],self::fraction,not(ancestor::fraction),children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]'.split(","),["SpecializedRule","continued-fraction-outer","default","brief",'[t] "ContinuedFrac"; [n] children/*[1];[t] "Over"; [n] children/*[2]'],["SpecializedRule","continued-fraction-outer","brief","sbrief"],'Rule,continued-fraction-inner,default,[t] "StartFraction"; [n] children/*[1];[t] "Over"; [n] children/*[2],self::fraction,ancestor::fraction,children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]'.split(","), +["SpecializedRule","continued-fraction-inner","default","brief",'[t] "StartFrac"; [n] children/*[1];[t] "Over"; [n] children/*[2]'],["SpecializedRule","continued-fraction-inner","brief","sbrief",'[t] "Frac"; [n] children/*[1];[t] "Over"; [n] children/*[2]'],["Rule","sqrt","default","[t] CSFopenRadicalVerbose; [n] children/*[1]; [t] CSFcloseRadicalVerbose","self::sqrt"],["Rule","sqrt","brief","[t] CSFopenRadicalBrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt"],["Rule","sqrt","sbrief", +"[t] CSFopenRadicalSbrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt"],["Rule","root","default","[t] CSFindexRadicalVerbose; [n] children/*[1];[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose","self::root"],["Rule","root","brief","[t] CSFindexRadicalBrief; [n] children/*[1];[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root"],["Rule","root","sbrief","[t] CSFindexRadicalSbrief; [n] children/*[1];[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief", +"self::root"],'Rule,limboth,default,[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3],self::limboth,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","),'Rule,limlower,default,[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];,self::limlower,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","), +'Rule,limupper,default,[n] children/*[1]; [t] CSFoverscript; [n] children/*[2];,self::limupper,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","),'Aliases;limlower;self::underscore;@role="limit function";name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"),'Aliases;limlower;self::underscore;children/*[2][@role!="underaccent"];name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"), +'Aliases;limupper;self::overscore;children/*[2][@role!="overaccent"];name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"),["Rule","limboth-end","default",'[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3]; [t] "Endscripts"',"self::limboth"],["Rule","limlower-end","default",'[n] children/*[1]; [t] CSFunderscript; [n] children/*[2]; [t] "Endscripts"',"self::limlower"],["Rule","limupper-end", +"default",'[n] children/*[1]; [t] CSFoverscript; [n] children/*[2]; [t] "Endscripts"',"self::limupper"],["Aliases","limlower-end","self::underscore",'@role="limit function"'],["Aliases","limlower-end","self::underscore"],["Aliases","limupper-end","self::overscore"],["Rule","integral","default","[n] children/*[1]; [n] children/*[2]; [n] children/*[3];","self::integral"],'Rule,integral,default,[n] children/*[1]; [t] "Subscript"; [n] children/*[2];[t] "Superscript"; [n] children/*[3]; [t] "Baseline";,self::limboth,@role="integral"'.split(","), +["SpecializedRule","integral","default","brief",'[n] children/*[1]; [t] "Sub"; [n] children/*[2];[t] "Sup"; [n] children/*[3]; [t] "Base";'],["SpecializedRule","integral","brief","sbrief"],["Rule","bigop","default","[n] children/*[1]; [n] children/*[2];","self::bigop"],["Rule","relseq","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq"],'Rule,equality,default,[n] children/*[1]; [n] content/*[1]; [n] children/*[2],self::relseq,@role="equality",count(./children/*)=2'.split(","), +'Rule;multi-equality;default;[m] children/* (sepFunc:CTXFcontentIterator);self::relseq;@role="equality";count(./children/*)>2'.split(";"),["Rule","multrel","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::multirel"],["Rule","subscript","default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]","self::subscript"],["Rule","subscript","brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]","self::subscript"],["SpecializedRule","subscript","brief","sbrief"], +'Rule,subscript-simple,default,[n] children/*[1]; [n] children/*[2],self::subscript,name(./children/*[1])="identifier",name(./children/*[2])="number",./children/*[2][@role!="mixed"],./children/*[2][@role!="othernumber"]'.split(","),["SpecializedRule","subscript-simple","default","brief"],["SpecializedRule","subscript-simple","default","sbrief"],'Rule,subscript-baseline,default,[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]; [t] CSFbaselineVerbose,self::subscript,following-sibling::*,not(name(following-sibling::subscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="subscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and @role!="subsup",not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])'.split(","), +["SpecializedRule","subscript-baseline","default","brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]; [t] CSFbaselineBrief"],["SpecializedRule","subscript-baseline","brief","sbrief"],'Aliases;subscript-baseline;self::subscript;not(following-sibling::*);ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::punctuated|ancestor::fraction;not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])'.split(";"),["Aliases","subscript-baseline", +"self::subscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel",sre.MathspeakUtil.generateBaselineConstraint()],["Aliases","subscript-baseline","self::subscript","not(following-sibling::*)","@embellished"],'Rule,subscript-empty-sup,default,[n] children/*[1]; [n] children/*[2],self::subscript,name(children/*[2])="infixop",name(children/*[2][@role="implicit"]/children/*[1])="superscript",name(children/*[2]/children/*[1]/children/*[1])="empty"'.split(","),["SpecializedRule","subscript-empty-sup", +"default","brief"],["SpecializedRule","subscript-empty-sup","brief","sbrief"],["Aliases","subscript-empty-sup","self::subscript",'name(children/*[2])="superscript"','name(children/*[2]/children/*[1])="empty"'],["Rule","superscript","default","[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2]","self::superscript"],["SpecializedRule","superscript","default","brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2]"],["SpecializedRule","superscript","brief","sbrief"],'Rule,superscript-baseline,default,[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2];[t] CSFbaselineVerbose,self::superscript,following-sibling::*,not(name(following-sibling::superscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="superscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])'.split(","), +["SpecializedRule","superscript-baseline","default","brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2];[t] CSFbaselineBrief"],["SpecializedRule","superscript-baseline","brief","sbrief"],'Aliases;superscript-baseline;self::superscript;not(following-sibling::*);ancestor::punctuated;ancestor::*/following-sibling::* and not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])'.split(";"),["Aliases","superscript-baseline","self::superscript", +"not(following-sibling::*)","ancestor::fraction|ancestor::fenced|ancestor::root|ancestor::sqrt"],["Aliases","superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel","not(@embellished)",sre.MathspeakUtil.generateBaselineConstraint()],'Aliases superscript-baseline self::superscript not(following-sibling::*) @embellished not(children/*[2][@role="prime"])'.split(" "),'Rule,superscript-empty-sub,default,[n] children/*[1]; [n] children/*[2],self::superscript,name(children/*[2])="infixop",name(children/*[2][@role="implicit"]/children/*[1])="subscript",name(children/*[2]/children/*[1]/children/*[1])="empty"'.split(","), +["SpecializedRule","superscript-empty-sub","default","brief"],["SpecializedRule","superscript-empty-sub","brief","sbrief"],["Aliases","superscript-empty-sub","self::superscript",'name(children/*[2])="subscript"','name(children/*[2]/children/*[1])="empty"'],'Rule,square,default,[n] children/*[1]; [t] "squared",self::superscript,children/*[2],children/*[2][text()=2],name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree")),name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"]),not(@embellished)'.split(","), +["SpecializedRule","square","default","brief"],["SpecializedRule","square","default","sbrief"],'Aliases;square;self::superscript;children/*[2];children/*[2][text()=2];@embellished;children/*[1][@role="prefix operator"]'.split(";"),'Rule,cube,default,[n] children/*[1]; [t] "cubed",self::superscript,children/*[2],children/*[2][text()=3],name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree")),name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"]),not(@embellished)'.split(","), +["SpecializedRule","cube","default","brief"],["SpecializedRule","cube","default","sbrief"],'Aliases;cube;self::superscript;children/*[2];children/*[2][text()=3];@embellished;children/*[1][@role="prefix operator"]'.split(";"),'Rule,prime,default,[n] children/*[1]; [n] children/*[2],self::superscript,children/*[2],children/*[2][@role="prime"]'.split(","),["SpecializedRule","prime","default","brief"],["SpecializedRule","prime","default","sbrief"],'Rule,prime-subscript,default,[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2],self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",not(following-sibling::*)'.split(","), +["SpecializedRule","prime-subscript","default","brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]"],["SpecializedRule","prime-subscript","brief","sbrief"],'Rule,prime-subscript-baseline,default,[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]; [t] CSFbaselineVerbose,self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",following-sibling::*'.split(","), +["SpecializedRule","prime-subscript-baseline","default","brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]; [t] CSFbaselineBrief"],["SpecializedRule","prime-subscript-baseline","brief","sbrief"],'Aliases prime-subscript-baseline self::superscript children/*[2][@role="prime"] name(children/*[1])="subscript" not(following-sibling::*) @embellished'.split(" "),'Rule,prime-subscript-simple,default,[n] children/*[1]/children/*[1]; [n] children/*[2];[n] children/*[1]/children/*[2],self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",name(children/*[1]/children/*[1])="identifier",name(children/*[1]/children/*[2])="number",children/*[1]/children/*[2][@role!="mixed"],children/*[1]/children/*[2][@role!="othernumber"]'.split(","), +["SpecializedRule","prime-subscript-simple","default","brief"],["SpecializedRule","prime-subscript-simple","default","sbrief"],'Rule,overscore,default,[t] "ModifyingAbove"; [n] children/*[1]; [t] "With"; [n] children/*[2],self::overscore,children/*[2][@role="overaccent"]'.split(","),["SpecializedRule","overscore","default","brief",'[t] "ModAbove"; [n] children/*[1]; [t] "With"; [n] children/*[2]'],["SpecializedRule","overscore","brief","sbrief"],'Rule,double-overscore,default,[t] "ModifyingAbove Above"; [n] children/*[1]; [t] "With"; [n] children/*[2],self::overscore,children/*[2][@role="overaccent"],name(children/*[1])="overscore",children/*[1]/children/*[2][@role="overaccent"]'.split(","), +["SpecializedRule","double-overscore","default","brief",'[t] "ModAbove Above"; [n] children/*[1]; [t] "With"; [n] children/*[2]'],["SpecializedRule","double-overscore","brief","sbrief"],'Rule,underscore,default,[t] "ModifyingBelow"; [n] children/*[1]; [t] "With"; [n] children/*[2],self::underscore,children/*[2][@role="underaccent"]'.split(","),["SpecializedRule","underscore","default","brief",'[t] "ModBelow"; [n] children/*[1]; [t] "With"; [n] children/*[2]'],["SpecializedRule","underscore","brief", +"sbrief"],'Rule,double-underscore,default,[t] "ModifyingBelow Below"; [n] children/*[1]; [t] "With"; [n] children/*[2],self::underscore,children/*[2][@role="underaccent"],name(children/*[1])="underscore",children/*[1]/children/*[2][@role="underaccent"]'.split(","),["SpecializedRule","double-underscore","default","brief",'[t] "ModBelow Below"; [n] children/*[1]; [t] "With"; [n] children/*[2]'],["SpecializedRule","double-underscore","brief","sbrief"],'Rule,overbar,default,[n] children/*[1]; [t] "overbar",self::overscore,@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][@role="overaccent"],children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]'.split(","), +["SpecializedRule","overbar","default","brief",'[n] children/*[1]; [t] "overBar"'],["SpecializedRule","overbar","brief","sbrief"],'Rule,underbar,default,[n] children/*[1]; [t] "underbar",self::underscore,@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][@role="underaccent"],children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]'.split(","),["SpecializedRule","underbar","default","brief",'[n] children/*[1]; [t] "underBar"'], +["SpecializedRule","underbar","brief","sbrief"],'Rule,overtilde,default,[n] children/*[1]; [t] "overTilde",self::overscore,children/*[2][@role="overaccent"],@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][text()="~" or text()="\u02dc" or text()="\u223c" or text()="\uff5e"]'.split(","),["SpecializedRule","overtilde","default","brief",'[n] children/*[1]; [t] "overtilde"'],["SpecializedRule","overtilde","brief","sbrief"],'Rule,undertilde,default,[n] children/*[1]; [t] "underTilde",self::underscore,@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][@role="underaccent"],children/*[2][text()="~" or text()="\u02dc" or text()="\u223c" or text()="\uff5e"]'.split(","), +["SpecializedRule","undertilde","default","brief",'[n] children/*[1]; [t] "undertilde"'],["SpecializedRule","undertilde","brief","sbrief"],'Rule,matrix-fence,default,[n] children/*[1];,self::fenced,count(children/*)=1,name(children/*[1])="matrix"'.split(","),["Rule","matrix","default",'[t] "Start"; [t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Matrix"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndMatrix"',"self::matrix"],["Rule","matrix","sbrief", +'[t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Matrix"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndMatrix"',"self::matrix"],["Aliases","matrix","self::vector"],["Rule","matrix-row","default",'[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column");[p] (pause: 200)',"self::row"],'Rule{row-with-label{default{[t] "with Label"; [n] content/*[1]; [t] "EndLabel"(pause: 200); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column"){self::row{content'.split("{"), +'Rule{row-with-label{brief{[t] "Label"; [n] content/*[1]; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column"){self::row{content'.split("{"),["SpecializedRule","row-with-label","brief","sbrief"],'Rule{row-with-text-label{sbrief{[t] "Label"; [t] CSFRemoveParens;[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column"){self::row{content{name(content/cell/children/*[1])="text"'.split("{"),'Rule;empty-row;default;[t] "Blank";self::row;count(children/*)=0'.split(";"),["Rule","matrix-cell", +"default","[n] children/*[1]; [p] (pause: 300)","self::cell"],'Rule,empty-cell,default,[t] "Blank"; [p] (pause: 300),self::cell,count(children/*)=0'.split(","),'Rule{determinant{default{[t] "Start"; [t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Determinant"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndDeterminant"{self::matrix{@role="determinant"'.split("{"),["SpecializedRule","determinant","default","sbrief",'[t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Determinant"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndDeterminant"'], +'Rule{determinant-simple{default{[t] "Start"; [t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Determinant"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row",grammar:simpleDet); [t] "EndDeterminant"{self::matrix{@role="determinant"{CQFdetIsSimple'.split("{"),["SpecializedRule","determinant-simple","default","sbrief",'[t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Determinant"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row",grammar:simpleDet); [t] "EndDeterminant"'], +'Rule{row-simple{default{[m] children/*;{self::row{@role="determinant"{contains(@grammar, "simpleDet")'.split("{"),["Rule","layout","default",'[t] "StartLayout"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"',"self::table"],["Rule","layout","sbrief",'[t] "Layout"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"',"self::table"],'Rule,binomial,default,[t] "StartBinomialOrMatrix"; [n] children/*[1]/children/*[1]; [t] "Choose"; [n] children/*[2]/children/*[1]; [t] "EndBinomialOrMatrix",self::vector,@role="binomial"'.split(","), +'Rule,binomial,sbrief,[t] "BinomialOrMatrix"; [n] children/*[1]/children/*[1]; [t] "Choose"; [n] children/*[2]/children/*[1]; [t] "EndBinomialOrMatrix",self::vector,@role="binomial"'.split(","),["Rule","cases","default",'[t] "StartLayout"; [t] "Enlarged"; [n] content/*[1];[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"',"self::cases"],["Rule","cases","sbrief",'[t] "Layout"; [t] "Enlarged"; [n] content/*[1];[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"', +"self::cases"],["Aliases","layout","self::multiline"],["Rule","line","default","[m] children/*","self::line"],'Rule,line-with-label,default,[t] "with Label"; [n] content/*[1]; [t] "EndLabel" (pause: 200); [m] children/*,self::line,content'.split(","),["SpecializedRule","line-with-label","default","brief",'[t] "Label"; [n] content/*[1] (pause: 200); [m] children/*'],["SpecializedRule","line-with-label","brief","sbrief"],'Rule,line-with-text-label,sbrief,[t] "Label"; [t] CSFRemoveParens; [m] children/*,self::line,content,name(content/cell/children/*[1])="text"'.split(","), +'Rule;empty-line;default;[t] "Blank";self::line;count(children/*)=0;not(content)'.split(";"),["SpecializedRule","empty-line","default","brief"],["SpecializedRule","empty-line","brief","sbrief"],'Rule,empty-line-with-label,default,[t] "with Label"; [n] content/*[1]; [t] "EndLabel"(pause: 200); [t] "Blank",self::line,count(children/*)=0,content'.split(","),["SpecializedRule","empty-line-with-label","default","brief",'[t] "Label"; [n] content/*[1] (pause: 200); [t] "Blank"'],["SpecializedRule","empty-line-with-label", +"brief","sbrief"],["Rule","enclose","default",'[t] "StartEnclose"; [t] @role (grammar:localEnclose); [n] children/*[1]; [t] "EndEnclose"',"self::enclose"],["Aliases","overbar","self::enclose",'@role="top"'],["Aliases","underbar","self::enclose",'@role="bottom"'],'Rule,leftbar,default,[t] "vertical bar"; [n] children/*[1],self::enclose,@role="left"'.split(","),'Rule,rightbar,default,[n] children/*[1]; [t] "vertical bar",self::enclose,@role="right"'.split(","),'Rule,crossout,default,[t] "CrossOut"; [n] children/*[1]; [t] "EndCrossOut",self::enclose,@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'.split(","), +'Rule,cancel,default,[t] "CrossOut"; [n] children/*[1]/children/*[1]; [t] "With"; [n] children/*[2]; [t] "EndCrossOut",self::overscore,@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'.split(","),["SpecializedRule","cancel","default","brief"],["SpecializedRule","cancel","default","sbrief"],["Aliases","cancel","self::underscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'],'Rule,cancel-reverse,default,[t] "CrossOut"; [n] children/*[2]/children/*[1]; [t] "With"; [n] children/*[1]; [t] "EndCrossOut",self::overscore,name(children/*[2])="enclose",children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]'.split(","), +["SpecializedRule","cancel-reverse","default","brief"],["SpecializedRule","cancel-reverse","default","sbrief"],["Aliases","cancel-reverse","self::underscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]'],'Rule;end-punct;default;[m] children/*;self::punctuated;@role="endpunct"'.split(";"),'Rule,start-punct,default,[n] content/*[1]; [m] children/*[position()>1],self::punctuated,@role="startpunct"'.split(","),'Rule,integral-punct,default,[n] children/*[1]; [n] children/*[3],self::punctuated,@role="integral"'.split(","), +["Rule","punctuated","default","[m] children/*","self::punctuated"],'Rule;unit;default;[t] text() (grammar:annotation="unit":translate:plural);self::identifier;@role="unit"'.split(";"),'Rule;unit-combine;default;[m] children/*;self::infixop;@role="unit"'.split(";"),'Rule,unit-divide,default,[n] children/*[1]; [t] "per"; [n] children/*[2],self::fraction,@role="unit"'.split(","),["Rule","inference","default",'[t] "inference rule"; [m] content/*; [t] "with conclusion"; [n] children/*[1]; [t] "and"; [t] count(children/*[2]/children/*); [t] "premises"', +"self::inference"],'Rule,inference,default,[t] "inference rule"; ; [m] content/*; [t] "with conclusion"; [n] children/*[1]; [t] "and"; [t] count(children/*[2]/children/*); [t] "premise",self::inference,count(children/*[2]/children/*)<2'.split(","),["Rule","premise","default",'[m] children/* (ctxtFunc:CTXFordinalCounter,context:"premise ");',"self::premises"],["Rule","conclusion","default","[n] children/*[1]","self::conclusion"],["Rule","label","default",'[t] "label"; [n] children/*[1]',"self::rulelabel"], +'Rule,axiom,default,[t] "axiom"; [m] children/*[1];,self::inference,@role="axiom"'.split(","),'Rule,axiom,default,[t] "empty axiom";,self::empty,@role="axiom"'.split(",")],initialize:[sre.MathspeakUtil.generateTensorRules]};sre.MathspeakSpanishUtil={};sre.MathspeakSpanishUtil.ordinalCounter=function(a,b){var c=0;return function(){return sre.Messages.NUMBERS.numberToOrdinal(++c,!1)+" "+b}};sre.MathspeakSpanishUtil.smallRoot=function(a){if(!a.childNodes||0===a.childNodes.length||!a.childNodes[0].childNodes)return[];var b=a.childNodes[0].childNodes[0].textContent;if(!/^\d+$/.test(b))return[];b=parseInt(b,10);return 1=b?[a]:[]};sre.UnitUtil={};sre.UnitUtil.unitMultipliers=function(a,b){var c=0;return function(){var d=sre.AuditoryDescription.create({text:sre.UnitUtil.rightMostUnit(a[c])&&sre.UnitUtil.leftMostUnit(a[c+1])?sre.Messages.UNIT_TIMES:""},{});c++;return[d]}};sre.UnitUtil.SCRIPT_ELEMENTS=[sre.SemanticAttr.Type.SUPERSCRIPT,sre.SemanticAttr.Type.SUBSCRIPT,sre.SemanticAttr.Type.OVERSCORE,sre.SemanticAttr.Type.UNDERSCORE]; +sre.UnitUtil.rightMostUnit=function(a){for(;a;){if("unit"===a.getAttribute("role"))return!0;var b=a.tagName;a=sre.XpathUtil.evalXPath("children/*",a);a=-1!==sre.UnitUtil.SCRIPT_ELEMENTS.indexOf(b)?a[0]:a[a.length-1]}return!1};sre.UnitUtil.leftMostUnit=function(a){for(;a;){if("unit"===a.getAttribute("role"))return!0;a=sre.XpathUtil.evalXPath("children/*",a)[0]}return!1}; +sre.UnitUtil.oneLeft=function(a){for(;a;){if("number"===a.tagName&&"1"===a.textContent)return[a];if("infixop"!==a.tagName||"multiplication"!==a.getAttribute("role")&&"implicit"!==a.getAttribute("role"))break;a=sre.XpathUtil.evalXPath("children/*",a)[0]}return[]};sre.MathspeakSpanish={locale:"es",domain:"mathspeak",functions:[["CQF","CQFspaceoutNumber",sre.MathspeakUtil.spaceoutNumber],["CQF","CQFspaceoutIdentifier",sre.MathspeakUtil.spaceoutIdentifier],["CSF","CSFspaceoutText",sre.MathspeakUtil.spaceoutText],["CSF","CSFopenFracVerbose",sre.MathspeakUtil.openingFractionVerbose],["CSF","CSFcloseFracVerbose",sre.MathspeakUtil.closingFractionVerbose],["CSF","CSFoverFracVerbose",sre.MathspeakUtil.overFractionVerbose],["CSF","CSFopenFracBrief",sre.MathspeakUtil.openingFractionBrief], +["CSF","CSFcloseFracBrief",sre.MathspeakUtil.closingFractionBrief],["CSF","CSFopenFracSbrief",sre.MathspeakUtil.openingFractionSbrief],["CSF","CSFcloseFracSbrief",sre.MathspeakUtil.closingFractionSbrief],["CSF","CSFoverFracSbrief",sre.MathspeakUtil.overFractionSbrief],["CSF","CSFopenRadicalVerbose",sre.MathspeakUtil.openingRadicalVerbose],["CSF","CSFcloseRadicalVerbose",sre.MathspeakUtil.closingRadicalVerbose],["CSF","CSFindexRadicalVerbose",sre.MathspeakUtil.indexRadicalVerbose],["CSF","CSFopenRadicalBrief", +sre.MathspeakUtil.openingRadicalBrief],["CSF","CSFcloseRadicalBrief",sre.MathspeakUtil.closingRadicalBrief],["CSF","CSFindexRadicalBrief",sre.MathspeakUtil.indexRadicalBrief],["CSF","CSFopenRadicalSbrief",sre.MathspeakUtil.openingRadicalSbrief],["CSF","CSFindexRadicalSbrief",sre.MathspeakUtil.indexRadicalSbrief],["CQF","CQFisSmallRoot",sre.MathspeakSpanishUtil.smallRoot],["CSF","CSFsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose],["CSF","CSFsuperscriptBrief",sre.MathspeakUtil.superscriptBrief], +["CSF","CSFsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose],["CSF","CSFsubscriptBrief",sre.MathspeakUtil.subscriptBrief],["CSF","CSFbaselineVerbose",sre.MathspeakUtil.baselineVerbose],["CSF","CSFbaselineBrief",sre.MathspeakUtil.baselineBrief],["CSF","CSFleftsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose],["CSF","CSFleftsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose],["CSF","CSFrightsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose],["CSF","CSFrightsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose], +["CSF","CSFleftsuperscriptBrief",sre.MathspeakUtil.superscriptBrief],["CSF","CSFleftsubscriptBrief",sre.MathspeakUtil.subscriptBrief],["CSF","CSFrightsuperscriptBrief",sre.MathspeakUtil.superscriptBrief],["CSF","CSFrightsubscriptBrief",sre.MathspeakUtil.subscriptBrief],["CSF","CSFunderscript",sre.MathspeakUtil.nestedUnderscore],["CSF","CSFoverscript",sre.MathspeakUtil.nestedOverscore],["CTXF","CTXFordinalCounter",sre.MathspeakSpanishUtil.ordinalCounter],["CTXF","CTXFcontentIterator",sre.StoreUtil.contentIterator], +["CTXF","CTXFunitMultipliers",sre.UnitUtil.unitMultipliers],["CQF","CQFdetIsSimple",sre.MathspeakUtil.determinantIsSimple],["CSF","CSFRemoveParens",sre.MathspeakUtil.removeParens],["CQF","CQFoneLeft",sre.UnitUtil.oneLeft],["CQF","CQFresetNesting",sre.MathspeakUtil.resetNestingDepth]],rules:['Rule{collapsed{default{[n] . (engine:modality=summary,grammar:collapsed); [t] "plegado";{self::*{@alternative{not(contains(@grammar, "collapsed")){self::*{self::*{self::*{self::*{self::*'.split("{"),["SpecializedRule", +"collapsed","default","brief"],["SpecializedRule","collapsed","brief","sbrief"],"Rule;stree;default;[n] ./*[1];self::stree;CQFresetNesting".split(";"),["Rule","unknown","default","[n] text()","self::unknown"],'Rule;protected;default;[t] text();self::number;contains(@grammar, "protected")'.split(";"),["Rule","omit-empty","default","[p] (pause:100)","self::empty"],'Rule;blank-empty;default;[t] "espacio";self::empty;count(../*)=1;name(../..)="cell" or name(../..)="line"'.split(";"),'Rule{font{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::*{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"'.split("{"), +'Rule{font-identifier-short{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::identifier{string-length(text())=1{@font{not(contains(@grammar, "ignoreFont")){@font="normal"{""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", ""){@role!="unit"'.split("{"), +'Rule{font-identifier{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::identifier{string-length(text())=1{@font{@font="normal"{not(contains(@grammar, "ignoreFont")){@role!="unit"'.split("{"),'Rule;omit-font;default;[n] . (grammar:ignoreFont=@font);self::identifier;string-length(text())=1;@font;not(contains(@grammar, "ignoreFont"));@font="italic"'.split(";"),["Rule","number","default","[n] text()","self::number"],'Rule,mixed-number,default,[n] children/*[1]; [t] "m\u00e1s"; [n] children/*[2]; ,self::number,@role="mixed"'.split(","), +'Rule{number-with-chars{default{[t] "n\u00famero"; [m] CQFspaceoutNumber (grammar:protected){self::number{@role="othernumber"{"" != translate(text(), "0123456789.,", ""){not(contains(@grammar, "protected"))'.split("{"),["SpecializedRule","number-with-chars","default","brief",'[t] "n\u00fam"; [m] CQFspaceoutNumber (grammar:protected)'],["SpecializedRule","number-with-chars","brief","sbrief"],'Rule{number-as-upper-word{default{[t] "may\u00fascula"; [t] CSFspaceoutText{self::number{string-length(text())>1{text()=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9", "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9"){""=translate(text(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9","")'.split("{"), +["SpecializedRule","number-as-upper-word","default","brief"],["SpecializedRule","number-as-upper-word","default","sbrief"],'Rule{number-baseline{default{[t] "l\u00ednea base"; [n] . (grammar:baseline){self::number{not(contains(@grammar, "ignoreFont")){preceding-sibling::identifier{not(contains(@grammar, "baseline")){preceding-sibling::*[1][@role="latinletter" or @role="greekletter" or @role="otherletter"]{parent::*/parent::infixop[@role="implicit"]'.split("{"),["SpecializedRule","number-baseline", +"default","brief",'[t] "base"; [n] text()'],["SpecializedRule","number-baseline","brief","sbrief"],'Rule{number-baseline-font{default{[t] "l\u00ednea base"; [t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::number{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"{preceding-sibling::identifier{preceding-sibling::*[@role="latinletter" or @role="greekletter" or @role="otherletter"]{parent::*/parent::infixop[@role="implicit"]'.split("{"),["SpecializedRule","number-baseline-font", +"default","brief",'[t] "base"; [t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)'],["SpecializedRule","number-baseline-font","brief","sbrief"],'Rule;identifier;default;[m] CQFspaceoutIdentifier;self::identifier;string-length(text())>1;@role!="unit";not(@font) or @font="normal" or contains(@grammar, "ignoreFont");text()!=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")'.split(";"), +["Rule","identifier","default","[n] text()","self::identifier"],'Rule,negative,default,[t] "menos"; [n] children/*[1],self::prefixop,@role="negative",children/identifier'.split(","),["Aliases","negative","self::prefixop",'@role="negative"',"children/number"],["Aliases","negative","self::prefixop",'@role="negative"','children/fraction[@role="vulgar"]'],'Rule,negative,default,[t] "menos"; [n] children/*[1],self::prefixop,@role="negative"'.split(","),["Rule","prefix","default","[m] content/*; [n] children/*[1]", +"self::prefixop"],["Rule","postfix","default","[n] children/*[1]; [m] content/*","self::postfixop"],["Rule","binary-operation","default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop"],'Rule;implicit;default;[m] children/*;self::infixop;@role="implicit"'.split(";"),["Aliases","implicit","self::infixop",'@role="leftsuper" or @role="leftsub" or @role="rightsuper" or @role="rightsub"'],'Rule,subtraction,default,[m] children/* (separator:"menos");,self::infixop,@role="subtraction"'.split(","), +["Rule","function-unknown","default","[n] children/*[1]; [n] children/*[2]","self::appl"],'Rule,function-prefix,default,[n] children/*[1]; [n] children/*[2],self::appl,children/*[1][@role="prefix function"]'.split(","),'Rule,fences-open-close,default,[n] content/*[1]; [n] children/*[1]; [n] content/*[2],self::fenced,@role="leftright"'.split(","),'Rule,fences-neutral,default,[t] "empezar valor absoluto"; [n] children/*[1]; [t] "finalizar valor absoluto",self::fenced,@role="neutral",content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"'.split(","), +["SpecializedRule","fences-neutral","default","sbrief",'[t] "valor absoluto"; [n] children/*[1]; [t] "finalizar valor absoluto"'],'Rule,fences-neutral,default,[n] content/*[1]; [n] children/*[1]; [n] content/*[2],self::fenced,@role="neutral"'.split(","),'Rule,fences-set,default,[t] "empezar llave"; [n] children/*[1]; [t] "finalizar llave",self::fenced,@role="set empty" or @role="set extended" or @role="set singleton" or @role="set collection",not(name(../..)="appl")'.split(","),["SpecializedRule", +"fences-set","default","sbrief",'[t] "llave"; [n] children/*[1]; [t] "finalizar llave"'],["Rule","text","default","[n] text() (grammar:noTranslateText)","self::text"],'Rule;factorial;default;[t] "factorial";self::punctuation;text()="!";name(preceding-sibling::*[1])!="text"'.split(";"),'Rule;minus;default;[t] "menos";self::operator;text()="-"'.split(";"),'Rule;single-prime;default;[t] "prima";self::punctuated;@role="prime";count(children/*)=1'.split(";"),'Rule;double-prime;default;[t] "doble prima";self::punctuated;@role="prime";count(children/*)=2'.split(";"), +'Rule;triple-prime;default;[t] "triple prima";self::punctuated;@role="prime";count(children/*)=3'.split(";"),'Rule;quadruple-prime;default;[t] "cuadruplicar prima";self::punctuated;@role="prime";count(children/*)=4'.split(";"),'Rule,counted-prime,default,[t] count(children/*); [t] "prime",self::punctuated,@role="prime"'.split(","),["Rule","fraction","default","[t] CSFopenFracVerbose; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracVerbose","self::fraction"],["Rule","fraction", +"brief","[t] CSFopenFracBrief; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracBrief","self::fraction"],["Rule","fraction","sbrief","[t] CSFopenFracSbrief; [n] children/*[1]; [t] CSFoverFracSbrief; [n] children/*[2]; [t] CSFcloseFracSbrief","self::fraction"],'Rule,continued-fraction-outer,default,[t] "fracci\u00f3n continua"; [n] children/*[1];[t] "entre"; [n] children/*[2],self::fraction,not(ancestor::fraction),children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]'.split(","), +["SpecializedRule","continued-fraction-outer","default","brief",'[t] "frac continua"; [n] children/*[1];[t] "entre"; [n] children/*[2]'],["SpecializedRule","continued-fraction-outer","brief","sbrief"],'Rule,continued-fraction-inner,default,[t] "empezar fracci\u00f3n"; [n] children/*[1];[t] "entre"; [n] children/*[2],self::fraction,ancestor::fraction,children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]'.split(","),["SpecializedRule","continued-fraction-inner","default", +"brief",'[t] "empezar frac"; [n] children/*[1];[t] "entre"; [n] children/*[2]'],["SpecializedRule","continued-fraction-inner","brief","sbrief",'[t] "frac"; [n] children/*[1];[t] "entre"; [n] children/*[2]'],["Rule","sqrt","default","[t] CSFopenRadicalVerbose; [n] children/*[1]; [t] CSFcloseRadicalVerbose","self::sqrt"],["Rule","sqrt","brief","[t] CSFopenRadicalBrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt"],["Rule","sqrt","sbrief","[t] CSFopenRadicalSbrief; [n] children/*[1]; [t] CSFcloseRadicalBrief", +"self::sqrt"],"Rule,root-small,default,[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose,self::root,CQFisSmallRoot".split(","),"Rule,root-small,brief,[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief,self::root,CQFisSmallRoot".split(","),"Rule,root-small,sbrief,[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief,self::root,CQFisSmallRoot".split(","),["Rule","root","default","[t] CSFindexRadicalVerbose; [n] children/*[1];[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose", +"self::root"],["Rule","root","brief","[t] CSFindexRadicalBrief; [n] children/*[1];[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root"],["Rule","root","sbrief","[t] CSFindexRadicalSbrief; [n] children/*[1];[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root"],'Rule,limboth,default,[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3],self::limboth,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","), +'Rule,limlower,default,[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];,self::limlower,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","),'Rule,limupper,default,[n] children/*[1]; [t] CSFoverscript; [n] children/*[2];,self::limupper,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","),'Aliases;limlower;self::underscore;@role="limit function";name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"), +'Aliases;limlower;self::underscore;children/*[2][@role!="underaccent"];name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"),'Aliases;limupper;self::overscore;children/*[2][@role!="overaccent"];name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"),["Rule","limboth-end","default",'[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3]; [t] "finalizar \u00edndices"', +"self::limboth"],["Rule","limlower-end","default",'[n] children/*[1]; [t] CSFunderscript; [n] children/*[2]; [t] "finalizar \u00edndices"',"self::limlower"],["Rule","limupper-end","default",'[n] children/*[1]; [t] CSFoverscript; [n] children/*[2]; [t] "finalizar \u00edndices"',"self::limupper"],["Aliases","limlower-end","self::underscore",'@role="limit function"'],["Aliases","limlower-end","self::underscore"],["Aliases","limupper-end","self::overscore"],["Rule","integral","default","[n] children/*[1]; [n] children/*[2]; [n] children/*[3];", +"self::integral"],'Rule,integral,default,[n] children/*[1]; [t] "definida"; [t] "sub\u00edndice"; [n] children/*[2];[t] "super\u00edndice"; [n] children/*[3]; [t] "l\u00ednea base";,self::limboth,@role="integral"'.split(","),["SpecializedRule","integral","default","brief",'[n] children/*[1]; [t] "Sub"; [n] children/*[2];[t] "Sup"; [n] children/*[3]; [t] "Base";'],["SpecializedRule","integral","brief","sbrief"],["Rule","bigop","default","[n] children/*[1]; [n] children/*[2];","self::bigop"],["Rule", +"relseq","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq"],'Rule,equality,default,[n] children/*[1]; [n] content/*[1]; [n] children/*[2],self::relseq,@role="equality",count(./children/*)=2'.split(","),'Rule;multi-equality;default;[m] children/* (sepFunc:CTXFcontentIterator);self::relseq;@role="equality";count(./children/*)>2'.split(";"),["Rule","multrel","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::multirel"],["Rule","subscript","default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]", +"self::subscript"],["Rule","subscript","brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]","self::subscript"],["SpecializedRule","subscript","brief","sbrief"],'Rule,subscript-baseline,default,[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]; [t] CSFbaselineVerbose,self::subscript,following-sibling::*,not(name(following-sibling::subscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="subscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and @role!="subsup",not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])'.split(","), +["SpecializedRule","subscript-baseline","default","brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]; [t] CSFbaselineBriefS"],["SpecializedRule","subscript-baseline","brief","sbrief"],'Aliases;subscript-baseline;self::subscript;not(following-sibling::*);ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::punctuated|ancestor::fraction;not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])'.split(";"),["Aliases","subscript-baseline", +"self::subscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel",sre.MathspeakUtil.generateBaselineConstraint()],["Aliases","subscript-baseline","self::subscript","not(following-sibling::*)","@embellished"],'Rule,subscript-empty-sup,default,[n] children/*[1]; [n] children/*[2],self::subscript,name(children/*[2])="infixop",name(children/*[2][@role="implicit"]/children/*[1])="superscript",name(children/*[2]/children/*[1]/children/*[1])="empty"'.split(","),["SpecializedRule","subscript-empty-sup", +"default","brief"],["SpecializedRule","subscript-empty-sup","brief","sbrief"],["Aliases","subscript-empty-sup","self::subscript",'name(children/*[2])="superscript"','name(children/*[2]/children/*[1])="empty"'],["Rule","superscript","default","[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2]","self::superscript"],["SpecializedRule","superscript","default","brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2]"],["SpecializedRule","superscript","brief","sbrief"],'Rule,superscript-baseline,default,[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2];[t] CSFbaselineVerbose,self::superscript,following-sibling::*,not(name(following-sibling::superscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="superscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])'.split(","), +["SpecializedRule","superscript-baseline","default","brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2];[t] CSFbaselineBriefS"],["SpecializedRule","superscript-baseline","brief","sbrief"],'Aliases;superscript-baseline;self::superscript;not(following-sibling::*);ancestor::punctuated;ancestor::*/following-sibling::* and not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])'.split(";"),["Aliases","superscript-baseline","self::superscript", +"not(following-sibling::*)","ancestor::fraction|ancestor::fenced|ancestor::root|ancestor::sqrt"],["Aliases","superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel","not(@embellished)",sre.MathspeakUtil.generateBaselineConstraint()],'Aliases superscript-baseline self::superscript not(following-sibling::*) @embellished not(children/*[2][@role="prime"])'.split(" "),'Rule,superscript-empty-sub,default,[n] children/*[1]; [n] children/*[2],self::superscript,name(children/*[2])="infixop",name(children/*[2][@role="implicit"]/children/*[1])="subscript",name(children/*[2]/children/*[1]/children/*[1])="empty"'.split(","), +["SpecializedRule","superscript-empty-sub","default","brief"],["SpecializedRule","superscript-empty-sub","brief","sbrief"],["Aliases","superscript-empty-sub","self::superscript",'name(children/*[2])="subscript"','name(children/*[2]/children/*[1])="empty"'],'Rule,square,default,[n] children/*[1]; [t] "al cuadrado",self::superscript,children/*[2],children/*[2][text()=2],name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree")),name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"]),not(@embellished)'.split(","), +["SpecializedRule","square","default","brief"],["SpecializedRule","square","default","sbrief"],'Aliases;square;self::superscript;children/*[2];children/*[2][text()=2];@embellished;children/*[1][@role="prefix operator"]'.split(";"),'Rule,cube,default,[n] children/*[1]; [t] "al cubo",self::superscript,children/*[2],children/*[2][text()=3],name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree")),name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"]),not(@embellished)'.split(","), +["SpecializedRule","cube","default","brief"],["SpecializedRule","cube","default","sbrief"],'Aliases;cube;self::superscript;children/*[2];children/*[2][text()=3];@embellished;children/*[1][@role="prefix operator"]'.split(";"),'Rule,prime,default,[n] children/*[1]; [n] children/*[2],self::superscript,children/*[2],children/*[2][@role="prime"]'.split(","),["SpecializedRule","prime","default","brief"],["SpecializedRule","prime","default","sbrief"],'Rule,prime-subscript,default,[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2],self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",not(following-sibling::*)'.split(","), +["SpecializedRule","prime-subscript","default","brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]"],["SpecializedRule","prime-subscript","brief","sbrief"],'Rule,prime-subscript-baseline,default,[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]; [t] CSFbaselineVerbose,self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",following-sibling::*'.split(","), +["SpecializedRule","prime-subscript-baseline","default","brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]; [t] CSFbaselineBriefS"],["SpecializedRule","prime-subscript-baseline","brief","sbrief"],'Aliases prime-subscript-baseline self::superscript children/*[2][@role="prime"] name(children/*[1])="subscript" not(following-sibling::*) @embellished'.split(" "),'Rule,overscore,default,[t] "modificando superior"; [n] children/*[1]; [t] "con"; [n] children/*[2],self::overscore,children/*[2][@role="overaccent"]'.split(","), +["SpecializedRule","overscore","default","brief",'[t] "mod superior"; [n] children/*[1]; [t] "con"; [n] children/*[2]'],["SpecializedRule","overscore","brief","sbrief"],'Rule,double-overscore,default,[t] "modificando superior superior"; [n] children/*[1]; [t] "con"; [n] children/*[2],self::overscore,children/*[2][@role="overaccent"],name(children/*[1])="overscore",children/*[1]/children/*[2][@role="overaccent"]'.split(","),["SpecializedRule","double-overscore","default","brief",'[t] "mod superior superior"; [n] children/*[1]; [t] "con"; [n] children/*[2]'], +["SpecializedRule","double-overscore","brief","sbrief"],'Rule,underscore,default,[t] "modificando inferior"; [n] children/*[1]; [t] "con"; [n] children/*[2],self::underscore,children/*[2][@role="underaccent"]'.split(","),["SpecializedRule","underscore","default","brief",'[t] "mod inferior"; [n] children/*[1]; [t] "con"; [n] children/*[2]'],["SpecializedRule","underscore","brief","sbrief"],'Rule,double-underscore,default,[t] "modificando inferior inferior"; [n] children/*[1]; [t] "con"; [n] children/*[2],self::underscore,children/*[2][@role="underaccent"],name(children/*[1])="underscore",children/*[1]/children/*[2][@role="underaccent"]'.split(","), +["SpecializedRule","double-underscore","default","brief",'[t] "mod inferior inferior"; [n] children/*[1]; [t] "con"; [n] children/*[2]'],["SpecializedRule","double-underscore","brief","sbrief"],'Rule,overbar,default,[n] children/*[1]; [t] "barra",self::overscore,@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][@role="overaccent"],children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]'.split(","),["SpecializedRule","overbar", +"default","brief",'[n] children/*[1]; [t] "barra"'],["SpecializedRule","overbar","brief","sbrief"],'Rule,underbar,default,[n] children/*[1]; [t] "subbarra",self::underscore,@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][@role="underaccent"],children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]'.split(","),["SpecializedRule","underbar","default","brief",'[n] children/*[1]; [t] "subbarra"'],["SpecializedRule","underbar", +"brief","sbrief"],'Rule,overtilde,default,[n] children/*[1]; [t] "tilde",self::overscore,children/*[2][@role="overaccent"],@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][text()="~" or text()="\u02dc" or text()="\u223c" or text()="\uff5e"]'.split(","),["SpecializedRule","overtilde","default","brief",'[n] children/*[1]; [t] "tilde"'],["SpecializedRule","overtilde","brief","sbrief"],'Rule,undertilde,default,[n] children/*[1]; [t] "subtilde",self::underscore,@role="latinletter" or @role="greekletter" or @role="otherletter",children/*[2][@role="underaccent"],children/*[2][text()="~" or text()="\u02dc" or text()="\u223c" or text()="\uff5e"]'.split(","), +["SpecializedRule","undertilde","default","brief",'[n] children/*[1]; [t] "subtilde"'],["SpecializedRule","undertilde","brief","sbrief"],'Rule,matrix-fence,default,[n] children/*[1];,self::fenced,count(children/*)=1,name(children/*[1])="matrix"'.split(","),["Rule","matrix","default",'[t] "empezar matriz"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar matriz"',"self::matrix"],["Rule","matrix","sbrief", +'[t] "matriz"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:" "); [t] "finalizar matriz"',"self::matrix"],["Aliases","matrix","self::vector"],["Rule","matrix-row","default",'[m] children/* (ctxtFunc:CTXFordinalCounter,context:"columna");[p] (pause: 200)',"self::row"],'Rule{row-with-label{default{[t] "con etiqueta"; [n] content/*[1]; [t] "finalizar etiqueta" (pause: 200); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"columna"){self::row{content'.split("{"), +'Rule{row-with-label{brief{[t] "etiqueta"; [n] content/*[1]; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"columna"){self::row{content'.split("{"),["SpecializedRule","row-with-label","brief","sbrief"],'Rule{row-with-text-label{sbrief{[t] "etiqueta"; [t] CSFRemoveParens;[m] children/* (ctxtFunc:CTXFordinalCounter,context:"columna"){self::row{content{name(content/cell/children/*[1])="text"'.split("{"),'Rule;empty-row;default;[t] "espacio";self::row;count(children/*)=0'.split(";"),["Rule","matrix-cell", +"default","[n] children/*[1]; [p] (pause: 300)","self::cell"],'Rule,empty-cell,default,[t] "espacio"; [p] (pause: 300),self::cell,count(children/*)=0'.split(","),'Rule{determinant{default{[t] "empezar determinante"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar determinante"{self::matrix{@role="determinant"'.split("{"),["SpecializedRule","determinant","default","sbrief",'[t] "determinante"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar determinante"'], +'Rule{determinant-simple{default{[t] "empezar determinante"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila",grammar:simpleDet); [t] "finalizar determinante"{self::matrix{@role="determinant"{CQFdetIsSimple'.split("{"),["SpecializedRule","determinant-simple","default","sbrief",'[t] "determinante"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila",grammar:simpleDet); [t] "finalizar determinante"'], +'Rule{row-simple{default{[m] children/*;{self::row{@role="determinant"{contains(@grammar, "simpleDet")'.split("{"),["Rule","layout","default",'[t] "empezar esquema"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar esquema"',"self::table"],["Rule","layout","sbrief",'[t] "esquema"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar esquema"',"self::table"],'Rule,binomial,default,[t] "empezar binomial"; [n] children/*[1]/children/*[1]; [t] "en"; [n] children/*[2]/children/*[1]; [t] "finalizar binomial",self::vector,@role="binomial"'.split(","), +'Rule,binomial,sbrief,[t] "binomial"; [n] children/*[1]/children/*[1]; [t] "en"; [n] children/*[2]/children/*[1]; [t] "finalizar binomial",self::vector,@role="binomial"'.split(","),["Rule","cases","default",'[t] "empezar esquema"; [n] content/*[1]; [t] "alargada"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar esquema"',"self::cases"],["Rule","cases","sbrief",'[t] "esquema"; [n] content/*[1]; [t] "alargada"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar esquema"', +"self::cases"],["Aliases","layout","self::multiline"],["Rule","line","default","[m] children/*","self::line"],'Rule,line-with-label,default,[t] "con etiqueta"; [n] content/*[1]; [t] "finalizar etiqueta" (pause: 200); [m] children/*,self::line,content'.split(","),["SpecializedRule","line-with-label","default","brief",'[t] "etiqueta"; [n] content/*[1] (pause: 200); [m] children/*'],["SpecializedRule","line-with-label","brief","sbrief"],'Rule,line-with-text-label,sbrief,[t] "etiqueta"; [t] CSFRemoveParens; [m] children/*,self::line,content,name(content/cell/children/*[1])="text"'.split(","), +'Rule;empty-line;default;[t] "espacio";self::line;count(children/*)=0;not(content)'.split(";"),["SpecializedRule","empty-line","default","brief"],["SpecializedRule","empty-line","brief","sbrief"],'Rule,empty-line-with-label,default,[t] "con etiqueta"; [n] content/*[1]; [t] "finalizar etiqueta" (pause: 200); [t] "espacio",self::line,count(children/*)=0,content'.split(","),["SpecializedRule","empty-line-with-label","default","brief",'[t] "etiqueta"; [n] content/*[1] (pause: 200); [t] "espacio"'],["SpecializedRule", +"empty-line-with-label","brief","sbrief"],["Rule","enclose","default",'[t] "empezar rodear"; [t] @role (grammar:localEnclose); [n] children/*[1]; [t] "finalizar rodear"',"self::enclose"],["Aliases","overbar","self::enclose",'@role="top"'],["Aliases","underbar","self::enclose",'@role="bottom"'],'Rule,leftbar,default,[t] "barra vertical"; [n] children/*[1],self::enclose,@role="left"'.split(","),'Rule,rightbar,default,[n] children/*[1]; [t] "barra vertical",self::enclose,@role="right"'.split(","),'Rule,crossout,default,[t] "tachado"; [n] children/*[1]; [t] "finalizar tachado",self::enclose,@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'.split(","), +'Rule,cancel,default,[t] "tachado"; [n] children/*[1]/children/*[1]; [t] "con"; [n] children/*[2]; [t] "finalizar tachado",self::overscore,@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'.split(","),["SpecializedRule","cancel","default","brief"],["SpecializedRule","cancel","default","sbrief"],["Aliases","cancel","self::underscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'],'Rule,cancel-reverse,default,[t] "tachado"; [n] children/*[2]/children/*[1]; [t] "con"; [n] children/*[1]; [t] "finalizar tachado",self::overscore,name(children/*[2])="enclose",children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]'.split(","), +["SpecializedRule","cancel-reverse","default","brief"],["SpecializedRule","cancel-reverse","default","sbrief"],["Aliases","cancel-reverse","self::underscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]'],'Rule;end-punct;default;[m] children/*;self::punctuated;@role="endpunct"'.split(";"),'Rule,start-punct,default,[n] content/*[1]; [m] children/*[position()>1],self::punctuated,@role="startpunct"'.split(","),'Rule,integral-punct,default,[n] children/*[1]; [n] children/*[3],self::punctuated,@role="integral"'.split(","), +["Rule","punctuated","default","[m] children/*","self::punctuated"],'Rule;unit-singular;default;[t] text() (grammar:annotation="unit":translate);self::identifier;@role="unit"'.split(";"),'Rule;unit-plural;default;[t] text() (grammar:annotation="unit":translate:plural);self::identifier;@role="unit";not(contains(@grammar, "singularUnit"))'.split(";"),'Rule,unit-square,default,[n] children/*[1]; [t] "cuadrado",self::superscript,@role="unit",children/*[2][text()=2],name(children/*[1])="identifier"'.split(","), +'Rule,unit-cubic,default,[n] children/*[1]; [t] "c\u00fabico",self::superscript,@role="unit",children/*[2][text()=3],name(children/*[1])="identifier"'.split(","),'Rule,reciprocal,default,[t] "rec\u00edproco"; [n] children/*[1],self::superscript,@role="unit",name(children/*[1])="identifier",name(children/*[2])="prefixop",children/*[2][@role="negative"],children/*[2]/children/*[1][text()=1],count(preceding-sibling::*)=0 or preceding-sibling::*[@role!="unit"]'.split(","),'Rule,reciprocal,default,[t] "por"; [n] children/*[1],self::superscript,@role="unit",name(children/*[1])="identifier",name(children/*[2])="prefixop",children/*[2][@role="negative"],children/*[2]/children/*[1][text()=1],preceding-sibling::*[@role="unit"]'.split(","), +'Rule;unit-combine;default;[m] children/* (sepFunc:CTXFunitMultipliers);self::infixop;@role="unit"'.split(";"),'Rule,unit-combine-mult,default,[m] children/* (sepFunc:CTXFunitMultipliers);,self::infixop,@role="multiplication" or @role="implicit",children/*[@role="unit"]'.split(","),'Rule{unit-combiner-singular{default{[n] children/*[1]; [t] "por"; [m] children/*[position()>1] (grammar:!singularUnit, sepFunc:CTXFunitMultipliers){self::infixop{@role="unit"{name(children/*[1])!="number"{contains(@grammar, "singularUnit"){count(children/*)>1'.split("{"), +'Rule,unit-combine-singular-first,default,[n] children/*[1]; [n] children/*[2] (grammar:singularUnit); [t] "por"; [m] children/*[position()>2] (sepFunc:CTXFunitMultipliers),self::infixop,@role="unit",name(children/*[1])="number",children/*[1][text()=1]'.split(","),'Rule,unit-combine-singular-first,default,[n] children/*[1]; [n] children/*[2] (grammar:singularUnit); ,self::infixop,@role="unit",name(children/*[1])="number",children/*[1][text()=1],count(children/*)=2'.split(","),'Rule,unit-divide,default,[n] children/*[1]; [t] "por"; [n] children/*[2] (grammar:singularUnit),self::fraction,@role="unit"'.split(",")], +initialize:[sre.MathspeakUtil.generateTensorRules]};sre.NemethUtil={};sre.NemethUtil.openingFraction=function(a){a=sre.MathspeakUtil.fractionNestingDepth(a);return Array(a).join(sre.Messages.MS.FRACTION_REPEAT)+sre.Messages.MS.FRACTION_START};sre.NemethUtil.closingFraction=function(a){a=sre.MathspeakUtil.fractionNestingDepth(a);return Array(a).join(sre.Messages.MS.FRACTION_REPEAT)+sre.Messages.MS.FRACTION_END};sre.NemethUtil.overFraction=function(a){a=sre.MathspeakUtil.fractionNestingDepth(a);return Array(a).join(sre.Messages.MS.FRACTION_REPEAT)+sre.Messages.MS.FRACTION_OVER}; +sre.NemethUtil.overBevelledFraction=function(a){a=sre.MathspeakUtil.fractionNestingDepth(a);return Array(a).join(sre.Messages.MS.FRACTION_REPEAT)+"\u2838"+sre.Messages.MS.FRACTION_OVER};sre.NemethUtil.nestedRadical=function(a,b){a=sre.NemethUtil.radicalNestingDepth(a);return 1===a?b:Array(a).join(sre.Messages.MS.NESTED)+b};sre.NemethUtil.radicalNestingDepth=function(a,b){b=b||0;return a.parentNode?sre.NemethUtil.radicalNestingDepth(a.parentNode,"root"===a.tagName||"sqrt"===a.tagName?b+1:b):b}; +sre.NemethUtil.openingRadical=function(a){return sre.NemethUtil.nestedRadical(a,sre.Messages.MS.STARTROOT)};sre.NemethUtil.closingRadical=function(a){return sre.NemethUtil.nestedRadical(a,sre.Messages.MS.ENDROOT)};sre.NemethUtil.indexRadical=function(a){return sre.NemethUtil.nestedRadical(a,sre.Messages.MS.ROOTINDEX)}; +sre.NemethUtil.enlargeFence=function(a){if(1===a.length)return"\u2820"+a;var b=a.split("");return b.every(function(c){return"\u2833"===c})?"\u2820"+b.join("\u2820"):a.slice(0,1)+"\u2820"+a.slice(1)};sre.Grammar.getInstance().setCorrection("enlargeFence",sre.NemethUtil.enlargeFence);sre.NemethUtil.NUMBER_PROPAGATORS_=[sre.SemanticAttr.Type.MULTIREL,sre.SemanticAttr.Type.RELSEQ,sre.SemanticAttr.Type.PUNCTUATED,sre.SemanticAttr.Type.APPL]; +sre.NemethUtil.checkParent_=function(a){a=a.parent;if(!a)return!1;var b=a.type;return-1!==sre.NemethUtil.NUMBER_PROPAGATORS_.indexOf(b)||b===sre.SemanticAttr.Type.PREFIXOP&&a.role===sre.SemanticAttr.Role.NEGATIVE?!0:!1};sre.NemethUtil.propagateNumber=function(a,b){if(!a.childNodes.length)return sre.NemethUtil.checkParent_(a)&&(b.number=!0),[b.number?"number":"",{number:!1}];sre.NemethUtil.checkParent_(a)&&(b.number=!0);return["",b]}; +sre.NemethUtil.numberIndicator=function(){return new sre.SemanticVisitor("nemeth",sre.NemethUtil.propagateNumber,{number:!0})};sre.NemethUtil.addAnnotators=function(){sre.SemanticAnnotations.getInstance().register(sre.NemethUtil.numberIndicator())};sre.NemethUtil.componentString_={2:"CSFbaseline",1:"CSFsubscript",0:"CSFsuperscript"};sre.NemethUtil.childNumber_={4:2,3:3,2:1,1:4,0:5}; +sre.NemethUtil.generateTensorRuleStrings_=function(a){var b=[],c="";a=parseInt(a,2);for(var d=0;5>d;d++){var e="children/*["+sre.NemethUtil.childNumber_[d]+"]";a&1?c="[t] "+sre.NemethUtil.componentString_[d%3]+"Verbose; [n] "+e+";"+c:b.unshift("name("+e+')="empty"');a>>=1}b.push(c);return b}; +sre.NemethUtil.generateTensorRules=function(a){var b=goog.bind(a.defineRule,a);a=goog.bind(a.defineRulesAlias,a);for(var c="11111 11110 11101 11100 10111 10110 10101 10100 01111 01110 01101 01100".split(" "),d=0,e;e=c[d];d++){var f="tensor"+e;e=sre.NemethUtil.generateTensorRuleStrings_(e);var g=e.pop(),h=[f,"default.default",g,"self::tensor"].concat(e);b.apply(null,h);g+="; [t]"+sre.NemethUtil.componentString_[2]+"Verbose";f+="-baseline";h=[f,"default.default",g,"self::tensor","following-sibling::*"].concat(e); +b.apply(null,h);f=[f,"self::tensor","not(following-sibling::*)","ancestor::fraction|ancestor::punctuated|ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::relseq|ancestor::multirel|@embellished"].concat(e);a.apply(null,f)}};sre.NemethRules={locale:"nemeth",modality:"braille",domain:"default",functions:[["CQF","CQFspaceoutNumber",sre.MathspeakUtil.spaceoutNumber],["CQF","CQFspaceoutIdentifier",sre.MathspeakUtil.spaceoutIdentifier],["CSF","CSFspaceoutText",sre.MathspeakUtil.spaceoutText],["CSF","CSFopenFraction",sre.NemethUtil.openingFraction],["CSF","CSFcloseFraction",sre.NemethUtil.closingFraction],["CSF","CSFoverFraction",sre.NemethUtil.overFraction],["CSF","CSFoverBevFraction",sre.NemethUtil.overBevelledFraction], +["CSF","CSFopenRadicalVerbose",sre.NemethUtil.openingRadical],["CSF","CSFcloseRadicalVerbose",sre.NemethUtil.closingRadical],["CSF","CSFindexRadicalVerbose",sre.NemethUtil.indexRadical],["CSF","CSFsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose],["CSF","CSFsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose],["CSF","CSFbaselineVerbose",sre.MathspeakUtil.baselineVerbose],["CSF","CSFunderscript",sre.MathspeakUtil.nestedUnderscore],["CSF","CSFoverscript",sre.MathspeakUtil.nestedOverscore], +["CTXF","CTXFordinalCounter",sre.NumbersUtil.ordinalCounter],["CTXF","CTXFcontentIterator",sre.StoreUtil.contentIterator],["CQF","CQFdetIsSimple",sre.MathspeakUtil.determinantIsSimple],["CSF","CSFRemoveParens",sre.MathspeakUtil.removeParens],["CQF","CQFresetNesting",sre.MathspeakUtil.resetNestingDepth]],rules:["Rule;stree;default;[n] ./*[1];self::stree;CQFresetNesting".split(";"),["Rule","unknown","default","[n] text()","self::unknown"],'Rule;protected;default;[t] text();self::*;@role="protected"'.split(";"), +["Rule","omit-empty","default","[p] (pause:100)","self::empty"],'Rule;blank-empty;default;[t] "\u2800";self::empty;count(../*)=1;name(../..)="cell" or name(../..)="line"'.split(";"),'Rule{font{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::*{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"'.split("{"),'Rule{font-identifier-short{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::identifier{string-length(text())=1{@font{not(contains(@grammar, "ignoreFont")){@font="normal"{""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", ""){@role!="unit"'.split("{"), +'Rule{font-identifier{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::identifier{string-length(text())=1{@font{@font="normal"{not(contains(@grammar, "ignoreFont")){@role!="unit"'.split("{"),'Rule;omit-font;default;[n] . (grammar:ignoreFont=@font);self::identifier;string-length(text())=1;@font;@role!="greekletter";not(contains(@grammar, "ignoreFont"));@font="italic"'.split(";"),'Rule{number-indicator{default{[t] "\u283c"; [n] text() (pause:10){self::number{contains(@annotation, "nemeth:number"){not(ancestor::sqrt){not(ancestor::root){not(ancestor::fraction)'.split("{"), +["Rule","number","default","[n] text()","self::number"],'Rule,mixed-number,default,[n] children/*[1]; [t] "\u2838\u2839"; [n] children/*[2]/children/*[1]; [t] "\u280c"; [n] children/*[2]/children/*[2]; [t] "\u2838\u283c",self::number,@role="mixed"'.split(","),'Rule{number-with-chars{default{[t] "\u283c"; [m] CQFspaceoutNumber{self::number{"" != translate(text(), "0123456789.,", ""){text() != translate(text(), "0123456789.,", "")'.split("{"),'Rule{number-as-upper-word{default{[t] "UpperWord"; [t] CSFspaceoutText{self::number{string-length(text())>1{text()=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9", "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9"){""=translate(text(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9","")'.split("{"), +'Rule{number-baseline{default{[t] "\u2810"; [n] text(){self::number{not(contains(@grammar, "ignoreFont")){preceding-sibling::identifier{preceding-sibling::*[1][@role="latinletter" or @role="greekletter" or @role="otherletter"]{parent::*/parent::infixop[@role="implicit"]'.split("{"),'Rule{number-baseline-font{default{[t] "\u2810"; [t] @font; [n] . (grammar:ignoreFont=@font){self::number{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"{preceding-sibling::identifier{preceding-sibling::*[@role="latinletter" or @role="greekletter" or @role="otherletter"]{parent::*/parent::infixop[@role="implicit"]'.split("{"), +'Rule;identifier;default;[n] text();self::identifier;@role="protected"'.split(";"),'Rule,negative,default,[t] "\u2824"; [n] children/*[1],self::prefixop,@role="negative"'.split(","),["Rule","prefix","default","[n] text(); [n] children/*[1]","self::prefixop"],["Rule","postfix","default","[n] children/*[1]; [n] text()","self::postfixop"],["Rule","binary-operation","default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop"],'Rule;implicit;default;[m] children/*;self::infixop;@role="implicit"'.split(";"), +["Aliases","implicit","self::infixop",'@role="leftsuper" or @role="leftsub" or @role="rightsuper" or @role="rightsub"'],["Rule","function-named","default",'[n] children/*[1]; [t] "\u2800"; [n] children/*[2]',"self::appl"],'Rule,function-prefix,default,[n] content/*[1]; [t] "\u2800"; [n] children/*[1],self::prefixop,content/*[1][@role="infix function"]'.split(","),'Rule,function-infix,default,[n] children/*[1]; [n] content/*[1]; [t] "\u2800"; [n] children/*[2],self::infixop,@role="infix function"'.split(","), +'Rule,function-simple,default,[n] children/*[1]; [n] children/*[2],self::appl,children/*[1][@role="simple function"]'.split(","),["Rule","fences-open-close","default","[n] content/*[1]; [n] children/*[1]; [n] content/*[2]","self::fenced"],'Rule,fences-neutral,default,[n] content/*[1]; [n] children/*[1]; [n] content/*[2],self::fenced,@role="neutral"'.split(","),["Rule","text","default","[n] text()","self::text"],'Rule;factorial;default;[t] "\u282f";self::punctuation;text()="!";name(preceding-sibling::*[1])!="text"'.split(";"), +'Rule;single-prime;default;[t] "\u2804";self::punctuated;@role="prime";count(children/*)=1'.split(";"),'Rule;double-prime;default;[t] "\u2804\u2804";self::punctuated;@role="prime";count(children/*)=2'.split(";"),'Rule;triple-prime;default;[t] "\u2804\u2804\u2804";self::punctuated;@role="prime";count(children/*)=3'.split(";"),'Rule;quadruple-prime;default;[t] "\u2804\u2804\u2804\u2804";self::punctuated;@role="prime";count(children/*)=4'.split(";"),["Rule","fraction","default","[t] CSFopenFraction; [n] children/*[1]; [t] CSFoverFraction; [n] children/*[2]; [t] CSFcloseFraction", +"self::fraction"],'Rule{bevelled-fraction{default{[t] CSFopenFraction; [n] children/*[1]; [t] CSFoverBevFraction; [n] children/*[2]; [t] CSFcloseFraction{self::fraction{contains(@annotation, "general:bevelled")'.split("{"),["Rule","sqrt","default","[t] CSFopenRadicalVerbose; [n] children/*[1]; [t] CSFcloseRadicalVerbose","self::sqrt"],["Rule","root","default",'[t] CSFindexRadicalVerbose; [n] children/*[1];[t] "\u281c"; [n] children/*[2]; [t] CSFcloseRadicalVerbose',"self::root"],'Rule,limboth,default,[t] "\u2810"; [n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3],self::limboth,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","), +'Rule,limlower,default,[t] "\u2810"; [n] children/*[1]; [t] CSFunderscript; [n] children/*[2];,self::limlower,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","),'Rule,limupper,default,[t] "\u2810"; [n] children/*[1]; [t] CSFoverscript; [n] children/*[2];,self::limupper,name(../..)="underscore" or name(../..)="overscore",following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(","),'Aliases;limlower;self::underscore;@role="limit function";name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"), +'Aliases;limlower;self::underscore;children/*[2][@role!="underaccent"];name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"),'Aliases;limupper;self::overscore;children/*[2][@role!="overaccent"];name(../..)="underscore" or name(../..)="overscore";following-sibling::*[@role!="underaccent" and @role!="overaccent"]'.split(";"),["Rule","limboth-end","default",'[t] "\u2810"; [n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3]; [t] "\u283b"', +"self::limboth"],["Rule","limlower-end","default",'[t] "\u2810"; [n] children/*[1]; [t] CSFunderscript; [n] children/*[2]; [t] "\u283b"',"self::limlower"],["Rule","limupper-end","default",'[t] "\u2810"; [n] children/*[1]; [t] CSFoverscript; [n] children/*[2]; [t] "\u283b"',"self::limupper"],["Aliases","limlower-end","self::underscore",'@role="limit function"'],["Aliases","limlower-end","self::underscore"],["Aliases","limupper-end","self::overscore"],["Rule","integral","default","[n] children/*[1]; [n] children/*[2]; [n] children/*[3];", +"self::integral"],'Rule,integral,default,[n] children/*[1]; [t] "\u2830"; [n] children/*[2];[t] "\u2818"; [n] children/*[3]; [t] "\u2810",self::limboth,@role="integral"'.split(","),["Rule","bigop","default","[n] children/*[1]; [n] children/*[2];","self::bigop"],["Rule","relseq","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq"],'Rule,equality,default,[n] children/*[1]; [n] content/*[1]; [n] children/*[2],self::relseq,@role="equality",count(./children/*)=2'.split(","),'Rule;multi-equality;default;[m] children/* (sepFunc:CTXFcontentIterator);self::relseq;@role="equality";count(./children/*)>2'.split(";"), +["Rule","multrel","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::multirel"],["Rule","subscript","default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]","self::subscript"],'Rule,subscript-simple,default,[n] children/*[1]; [n] children/*[2],self::subscript,name(./children/*[1])="identifier",name(./children/*[2])="number",./children/*[2][@role!="mixed"],./children/*[2][@role!="othernumber"],self::*'.split(","),'Rule,subscript-baseline,default,[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]; [t] CSFbaselineVerbose,self::subscript,following-sibling::*,@role!="prefix function",not(name(following-sibling::subscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="subscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and @role!="subsup",not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])'.split(","), +'Aliases;subscript-baseline;self::subscript;not(following-sibling::*);ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::punctuated|ancestor::fraction;not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])'.split(";"),["Aliases","subscript-baseline","self::subscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel",sre.MathspeakUtil.generateBaselineConstraint()],["Aliases","subscript-baseline","self::subscript","not(following-sibling::*)", +"@embellished"],'Rule,subscript-empty-sup,default,[n] children/*[1]; [n] children/*[2],self::subscript,name(children/*[2])="infixop",name(children/*[2][@role="implicit"]/children/*[1])="superscript",name(children/*[2]/children/*[1]/children/*[1])="empty"'.split(","),["Aliases","subscript-empty-sup","self::subscript",'name(children/*[2])="superscript"','name(children/*[2]/children/*[1])="empty"'],["Rule","superscript","default","[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2]","self::superscript"], +'Rule,superscript-baseline,default,[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2];[t] CSFbaselineVerbose,self::superscript,following-sibling::*,@role!="prefix function",not(name(following-sibling::superscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="superscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])'.split(","), +'Aliases;superscript-baseline;self::superscript;not(following-sibling::*);ancestor::punctuated;ancestor::*/following-sibling::* and not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])'.split(";"),["Aliases","superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::fraction|ancestor::fenced|ancestor::root|ancestor::sqrt"],["Aliases","superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel", +"not(@embellished)",sre.MathspeakUtil.generateBaselineConstraint()],'Aliases superscript-baseline self::superscript not(following-sibling::*) @embellished not(children/*[2][@role="prime"])'.split(" "),'Rule,superscript-empty-sub,default,[n] children/*[1]; [n] children/*[2],self::superscript,name(children/*[2])="infixop",name(children/*[2][@role="implicit"]/children/*[1])="subscript",name(children/*[2]/children/*[1]/children/*[1])="empty"'.split(","),["Aliases","superscript-empty-sub","self::superscript", +'name(children/*[2])="subscript"','name(children/*[2]/children/*[1])="empty"'],'Rule,prime,default,[n] children/*[1]; [n] children/*[2],self::superscript,children/*[2],children/*[2][@role="prime"]'.split(","),'Rule,prime-subscript,default,[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2],self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",not(following-sibling::*)'.split(","),'Rule,prime-subscript-baseline,default,[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]; [t] CSFbaselineVerbose,self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",following-sibling::*'.split(","), +'Aliases prime-subscript-baseline self::superscript children/*[2][@role="prime"] name(children/*[1])="subscript" not(following-sibling::*) @embellished'.split(" "),'Rule,prime-subscript-simple,default,[n] children/*[1]/children/*[1]; [n] children/*[2];[n] children/*[1]/children/*[2],self::superscript,children/*[2][@role="prime"],name(children/*[1])="subscript",name(children/*[1]/children/*[1])="identifier",name(children/*[1]/children/*[2])="number",children/*[1]/children/*[2][@role!="mixed"],children/*[1]/children/*[2][@role!="othernumber"]'.split(","), +'Rule,overscore,default,[t] "\u2810"; [n] children/*[1]; [t] "\u2823"; [n] children/*[2]; [t] "\u283b",self::overscore,children/*[2][@role="overaccent"]'.split(","),'Rule{overscore{default{[n] children/*[1]; [t] "\u2823"; [n] children/*[2]{self::overscore{children/*[2][@role="overaccent"]{contains(@grammar, "modified")'.split("{"),'Rule,double-overscore,default,[t] "\u2810"; [n] children/*[1] (grammar:"modified"); [t] "\u2823"; [n] children/*[2]; [t] "\u283b",self::overscore,children/*[2][@role="overaccent"],name(children/*[1])="overscore",children/*[1]/children/*[2][@role="overaccent"]'.split(","), +'Rule,underscore,default,[t] "\u2810"; [n] children/*[1]; [t] "\u2829"; [n] children/*[2]; [t] "\u283b",self::underscore,children/*[2][@role="underaccent"]'.split(","),'Rule{underscore{default{[n] children/*[1]; [t] "\u2829"; [n] children/*[2]{self::underscore{children/*[2][@role="underaccent"]{contains(@grammar, "modified")'.split("{"),'Rule,double-underscore,default,[t] "\u2810"; [n] children/*[1] (grammar:"modified"); [t] "\u2829"; [n] children/*[2]; [t] "\u283b",self::underscore,children/*[2][@role="underaccent"],name(children/*[1])="underscore",children/*[1]/children/*[2][@role="underaccent"]'.split(","), +'Rule,matrix-fence,default,[n] children/*[1];,self::fenced,count(children/*)=1,name(children/*[1])="matrix"'.split(","),["Rule","matrix","default",'[m] children/* (separator:"\u2800", join:"");',"self::matrix"],["Aliases","matrix","self::vector"],["Rule","matrix-row","default",'[n] ../../content/*[1] (grammar:enlargeFence); [m] children/* (separator:"\u2800"); [n] ../../content/*[2] (grammar:enlargeFence); ',"self::row"],["Aliases","matrix-row","self::line",'@role="vector"'],["Aliases","matrix-row", +"self::line",'@role="binomial"'],'Rule{row-with-label{default{[t] "with Label"; [n] content/*[1]; [t] "EndLabel"(pause: 200); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column"){self::row{content'.split("{"),'Rule;empty-row;default;[t] "\u2800" (pause:300);self::row;count(children/*)=0'.split(";"),["Rule","matrix-cell","default","[n] children/*[1]","self::cell"],'Rule;empty-cell;default;[t] "\u2800" (pause: 300);self::cell;count(children/*)=0'.split(";"),["Rule","layout","default",'[m] children/* (separator:"\u2800", join:"");', +"self::table"],["Rule","cases","default",'[n] ../../content/*[1] (grammar:enlargeFence); [m] children/* (separator:"\u2800"); [t] "\u2810"',"self::cases"],["Aliases","layout","self::multiline"],["Rule","line","default","[m] children/*","self::line"],'Rule,line-with-label,default,[t] "with Label"; [n] content/*[1]; [t] "EndLabel" (pause: 200); [m] children/*,self::line,content'.split(","),'Rule;empty-line;default;[t] "\u2800";self::line;count(children/*)=0;not(content)'.split(";"),'Rule,empty-line-with-label,default,[t] "with Label"; [n] content/*[1]; [t] "EndLabel"(pause: 200); [t] "Blank",self::line,count(children/*)=0,content'.split(","), +["Rule","enclose","default",'[t] "StartEnclose"; [t] @role (grammar:localEnclose); [n] children/*[1]; [t] "EndEnclose"',"self::enclose"],'Rule,overbar,default,[t] "\u2810"; [n] children/*[1]; [t] "\u2823\u2831\u283b",self::enclose,@role="top"'.split(","),'Rule,underbar,default,[t] "\u2810"; [n] children/*[1]; [t] "\u2829\u2831\u283b",self::enclose,@role="bottom"'.split(","),'Rule,leftbar,default,[t] "\u2833"; [n] children/*[1],self::enclose,@role="left"'.split(","),'Rule,rightbar,default,[n] children/*[1]; [t] "\u2833",self::enclose,@role="right"'.split(","), +'Rule,crossout,default,[t] "\u282a"; [n] children/*[1]; [t] "\u283b",self::enclose,@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'.split(","),'Rule,cancel,default,[t] "\u282a"; [n] children/*[1]/children/*[1]; [t] "\u282a"; [n] children/*[2]; [t] "\u283b",self::overscore,@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'.split(","),["Aliases","cancel","self::underscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"'], +'Rule,cancel-reverse,default,[t] "\u282a"; [n] children/*[2]/children/*[1]; [t] "\u282a"; [n] children/*[1]; [t] "\u283b",self::overscore,name(children/*[2])="enclose",children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]'.split(","),["Aliases","cancel-reverse","self::underscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]'],'Rule;end-punct;default;[m] children/*;self::punctuated;@role="endpunct"'.split(";"), +'Rule,start-punct,default,[n] content/*[1]; [m] children/*[position()>1],self::punctuated,@role="startpunct"'.split(","),'Rule{punctuation{default{[n] text(); [t] "\u2810"{self::punctuation{@role="fullstop"{contains(@annotation, "nemeth:number")'.split("{"),'Rule,integral-punct,default,[n] children/*[1]; [n] children/*[3],self::punctuated,@role="integral"'.split(","),["Rule","punctuated","default","[m] children/*","self::punctuated"],'Rule,punctuation-comma,default,[n] text(); [t] "\u2800",self::punctuation,parent::*/parent::punctuated,following-sibling::*,@role!="fullstop"'.split(","), +'Rule,punctuation-ellipses,default,[t] "\u2800"; [n] text(); [t] "\u2800",self::punctuation,parent::*/parent::punctuated,following-sibling::*,@role="ellipsis",name(preceding-sibling::*[1])!="punctuation"'.split(","),'Rule,punctuation-ellipses,default,[t] "\u2800"; [n] text();,self::punctuation,parent::*/parent::punctuated,@role="ellipsis",name(preceding-sibling::*[1])!="punctuation"'.split(","),'Rule,reference-sign,default,[n] children/*[1]; [n] children/*[2],self::superscript,name(children/*[1])="text" or (name(children/*[1])="punctuated" and children/*[1][@role="text"]),name(children/*[2])="operator" or name(children/*[2])="punctuation"'.split(","), +'Rule,reference-number,default,[n] children/*[1]; [t] "\u2808\u283b"; [n] children/*[2]; [t] "\u2810",self::superscript,name(children/*[1])="text" or (name(children/*[1])="punctuated" and children/*[1][@role="text"]),name(children/*[2])="number",children/*[2][@role="integer"]'.split(",")],initialize:[sre.NemethUtil.generateTensorRules,sre.NemethUtil.addAnnotators]};sre.PrefixFrench={locale:"fr",modality:"prefix",domain:"default",functions:[["CSF","CSFordinalPosition",sre.NumbersUtil.ordinalPosition]],rules:['Rule,numerator,default,[t] "num\u00e9rateur"; [p] (pause:200),self::*,name(../..)="fraction",count(preceding-sibling::*)=0'.split(","),'Rule,denominator,default,[t] "d\u00e9nominateur"; [p] (pause:200),self::*,name(../..)="fraction",count(preceding-sibling::*)=1'.split(","),'Rule,base,default,[t] "base"; [p] (pause:200),self::*,name(../..)="superscript" or name(../..)="subscript" or name(../..)="overscore" or name(../..)="underscore" or name(../..)="tensor" or name(../..)="limlower" or name(../..)="limupper",count(preceding-sibling::*)=0'.split(","), +'Rule,base-limit,default,[t] "base"; [p] (pause:200),self::*,name(../..)="limboth"'.split(","),'Rule,exponent,default,[t] "exposant"; [p] (pause:200),self::*,name(../..)="superscript",count(preceding-sibling::*)=1'.split(","),'Rule,subscript,default,[t] "indice"; [p] (pause:200),self::*,name(../..)="subscript",count(preceding-sibling::*)=1'.split(","),'Rule,overscript,default,[t] "indice suscrit"; [p] (pause:200),self::*,name(../..)="overscore" or name(../..)="limupper" or name(../..)="limboth",count(preceding-sibling::*)=1 or count(preceding-sibling::*)=2'.split(","), +'Rule,underscript,default,[t] "indice souscrit"; [p] (pause:200),self::*,name(../..)="underscore" or name(../..)="limlower" or name(../..)="limboth",count(preceding-sibling::*)=1'.split(","),'Rule,radicand,default,[t] "radicande"; [p] (pause:200),self::*,name(../..)="sqrt"'.split(","),'Rule,radicand,default,[t] "radicande"; [p] (pause:200),self::*,name(../..)="root",count(preceding-sibling::*)=1'.split(","),'Rule,index,default,[t] "indice"; [p] (pause:200),self::*,name(../..)="root",count(preceding-sibling::*)=0'.split(","), +'Rule,leftsub,default,[t] "indice inf\u00e9rieur gauche"; [p] (pause:200),self::*,name(../..)="tensor",@role="leftsub"'.split(","),'Rule,leftsub,default,[t] CSFordinalPosition (grammar:gender="male"); [t] "indice inf\u00e9rieur gauche"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="leftsub"'.split(","),'Rule,leftsuper,default,[t] "indice sup\u00e9rieur gauche"; [p] (pause:200),self::*,name(../..)="tensor",@role="leftsuper"'.split(","),'Rule,leftsuper,default,[t] CSFordinalPosition (grammar:gender="male"); [t] "indice sup\u00e9rieur gauche"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="leftsuper"'.split(","), +'Rule,rightsub,default,[t] "indice inf\u00e9rieur droite"; [p] (pause:200),self::*,name(../..)="tensor",@role="rightsub"'.split(","),'Rule,rightsub,default,[t] CSFordinalPosition (grammar:gender="male"); [t] "indice inf\u00e9rieur droite"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="rightsub"'.split(","),'Rule,rightsuper,default,[t] "indice sup\u00e9rieur droite"; [p] (pause:200),self::*,name(../..)="tensor",@role="rightsuper"'.split(","),'Rule,rightsuper,default,[t] CSFordinalPosition (grammar:gender="male"); [t] "indice sup\u00e9rieur droite"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="rightsuper"'.split(","), +'Rule,choice,default,[t] "nombre d\'\u00e9l\u00e9ments choisis"; [p] (pause:200),self::line,@role="binomial",parent::*/parent::vector,count(preceding-sibling::*)=1'.split(","),'Rule,select,default,[t] "nombre d\'\u00e9l\u00e9ments disponibles"; [p] (pause:200),self::line,@role="binomial",parent::*/parent::vector,count(preceding-sibling::*)=0'.split(","),["Rule","row","default",'[t] CSFordinalPosition (grammar:gender="female"); [t] "rang\u00e9e"; [p] (pause:200)',"self::row"],["Aliases","row","self::line"], +'Rule{cell{default{[n] ../..; [t] CSFordinalPosition (grammar:gender="female"); [t] "colonne"; [p] (pause:200){self::cell{contains(@grammar,"depth")'.split("{"),["Rule","cell","default",'[t] CSFordinalPosition (grammar:gender="female"); [t] "colonne"; [p] (pause:200)',"self::cell"]]};sre.PrefixGerman={modality:"prefix",locale:"de",domain:"default",functions:[["CSF","CSFordinalPosition",sre.NumbersUtil.ordinalPosition]],rules:['Rule,numerator,default,[t] "Z\u00e4hler"; [p] (pause:200),self::*,name(../..)="fraction",count(preceding-sibling::*)=0'.split(","),'Rule,denominator,default,[t] "Nenner"; [p] (pause:200),self::*,name(../..)="fraction",count(preceding-sibling::*)=1'.split(","),'Rule,base,default,[t] "Basis"; [p] (pause:200),self::*,name(../..)="superscript" or name(../..)="subscript" or name(../..)="overscore" or name(../..)="underscore" or name(../..)="tensor",count(preceding-sibling::*)=0'.split(","), +'Rule,exponent,default,[t] "Exponent"; [p] (pause:200),self::*,name(../..)="superscript",count(preceding-sibling::*)=1'.split(","),'Rule,subscript,default,[t] "Index"; [p] (pause:200),self::*,name(../..)="subscript",count(preceding-sibling::*)=1'.split(","),'Rule,overscript,default,[t] "Oberer Grenzwert"; [p] (pause:200),self::*,name(../..)="overscore",count(preceding-sibling::*)=1'.split(","),'Rule,underscript,default,[t] "Unterer Grenzwert"; [p] (pause:200),self::*,name(../..)="underscore",count(preceding-sibling::*)=1'.split(","), +'Rule,radicand,default,[t] "Radikand"; [p] (pause:200),self::*,name(../..)="sqrt"'.split(","),'Rule,radicand,default,[t] "Radikand"; [p] (pause:200),self::*,name(../..)="root",count(preceding-sibling::*)=1'.split(","),'Rule,index,default,[t] "Wurzelexponent"; [p] (pause:200),self::*,name(../..)="root",count(preceding-sibling::*)=0'.split(","),'Rule,leftsub,default,[t] "linker unterer Index"; [p] (pause:200),self::*,name(../..)="tensor",@role="leftsub"'.split(","),'Rule,leftsub,default,[t] CSFordinalPosition; [t] "linker unterer Index"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="leftsub"'.split(","), +'Rule,leftsuper,default,[t] "linker oberer Index"; [p] (pause:200),self::*,name(../..)="tensor",@role="leftsuper"'.split(","),'Rule,leftsuper,default,[t] CSFordinalPosition; [t] "linker oberer Index"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="leftsuper"'.split(","),'Rule,rightsub,default,[t] "rechter unterer Index"; [p] (pause:200),self::*,name(../..)="tensor",@role="rightsub"'.split(","),'Rule,rightsub,default,[t] CSFordinalPosition; [t] "rechter unterer Index"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="rightsub"'.split(","), +'Rule,rightsuper,default,[t] "rechter oberer Index"; [p] (pause:200),self::*,name(../..)="tensor",@role="rightsuper"'.split(","),'Rule,rightsuper,default,[t] CSFordinalPosition; [t] "rechter oberer Index"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="rightsuper"'.split(","),'Rule,choice,default,[t] "Grundgesamtheit"; [p] (pause:200),self::line,@role="binomial",parent::*/parent::vector,count(preceding-sibling::*)=0'.split(","),'Rule,select,default,[t] "Stichprobengr\u00f6\u00dfe"; [p] (pause:200),self::line,@role="binomial",parent::*/parent::vector,count(preceding-sibling::*)=1'.split(","), +["Rule","row","default",'[t] CSFordinalPosition; [t] "Zeile"; [p] (pause:200)',"self::row"],["Aliases","row","self::line"],'Rule{cell{default{[n] ../..; [t] CSFordinalPosition; [t] "Spalte"; [p] (pause:200){self::cell{contains(@grammar,"depth")'.split("{"),["Rule","cell","default",'[t] CSFordinalPosition; [t] "Spalte"; [p] (pause:200)',"self::cell"]]};sre.PrefixRules={modality:"prefix",domain:"default",functions:[["CSF","CSFordinalPosition",sre.NumbersUtil.ordinalPosition]],rules:['Rule,numerator,default,[t] "Numerator"; [p] (pause:200),self::*,name(../..)="fraction",count(preceding-sibling::*)=0'.split(","),'Rule,denominator,default,[t] "Denominator"; [p] (pause:200),self::*,name(../..)="fraction",count(preceding-sibling::*)=1'.split(","),'Rule,base,default,[t] "Base"; [p] (pause:200),self::*,name(../..)="superscript" or name(../..)="subscript" or name(../..)="overscore" or name(../..)="underscore" or name(../..)="tensor",count(preceding-sibling::*)=0'.split(","), +'Rule,exponent,default,[t] "Exponent"; [p] (pause:200),self::*,name(../..)="superscript",count(preceding-sibling::*)=1'.split(","),'Rule,subscript,default,[t] "Subscript"; [p] (pause:200),self::*,name(../..)="subscript",count(preceding-sibling::*)=1'.split(","),'Rule,overscript,default,[t] "Overscript"; [p] (pause:200),self::*,name(../..)="overscore",count(preceding-sibling::*)=1'.split(","),'Rule,underscript,default,[t] "Underscript"; [p] (pause:200),self::*,name(../..)="underscore",count(preceding-sibling::*)=1'.split(","), +'Rule,radicand,default,[t] "Radicand"; [p] (pause:200),self::*,name(../..)="sqrt"'.split(","),'Rule,radicand,default,[t] "Radicand"; [p] (pause:200),self::*,name(../..)="root",count(preceding-sibling::*)=1'.split(","),'Rule,index,default,[t] "Index"; [p] (pause:200),self::*,name(../..)="root",count(preceding-sibling::*)=0'.split(","),'Rule,leftsub,default,[t] "Left Subscript"; [p] (pause:200),self::*,name(../..)="tensor",@role="leftsub"'.split(","),'Rule,leftsub,default,[t] CSFordinalPosition; [t] "Left Subscript"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="leftsub"'.split(","), +'Rule,leftsuper,default,[t] "Left Superscript"; [p] (pause:200),self::*,name(../..)="tensor",@role="leftsuper"'.split(","),'Rule,leftsuper,default,[t] CSFordinalPosition; [t] "Left Superscript"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="leftsuper"'.split(","),'Rule,rightsub,default,[t] "Right Subscript"; [p] (pause:200),self::*,name(../..)="tensor",@role="rightsub"'.split(","),'Rule,rightsub,default,[t] CSFordinalPosition; [t] "Right Subscript"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="rightsub"'.split(","), +'Rule,rightsuper,default,[t] "Right Superscript"; [p] (pause:200),self::*,name(../..)="tensor",@role="rightsuper"'.split(","),'Rule,rightsuper,default,[t] CSFordinalPosition; [t] "Right Superscript"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="rightsuper"'.split(","),'Rule,choice,default,[t] "Choice Quantity"; [p] (pause:200),self::line,@role="binomial",parent::*/parent::vector,count(preceding-sibling::*)=0'.split(","),'Rule,select,default,[t] "Selection Quantity"; [p] (pause:200),self::line,@role="binomial",parent::*/parent::vector,count(preceding-sibling::*)=1'.split(","), +["Rule","row","default",'[t] CSFordinalPosition; [t] "Row"; [p] (pause:200)',"self::row"],["Aliases","row","self::line"],'Rule{cell{default{[n] ../..; [t] CSFordinalPosition; [t] "Column"; [p] (pause:200){self::cell{contains(@grammar,"depth")'.split("{"),["Rule","cell","default",'[t] CSFordinalPosition; [t] "Column"; [p] (pause:200)',"self::cell"]]};sre.PrefixSpanish={locale:"es",modality:"prefix",domain:"default",functions:[["CSF","CSFordinalPosition",sre.NumbersUtil.ordinalPosition]],rules:['Rule,numerator,default,[t] "numerador"; [p] (pause:200),self::*,name(../..)="fraction",count(preceding-sibling::*)=0'.split(","),'Rule,denominator,default,[t] "denominador"; [p] (pause:200),self::*,name(../..)="fraction",count(preceding-sibling::*)=1'.split(","),'Rule,base,default,[t] "base"; [p] (pause:200),self::*,name(../..)="superscript" or name(../..)="subscript" or name(../..)="overscore" or name(../..)="underscore" or name(../..)="tensor",count(preceding-sibling::*)=0'.split(","), +'Rule,exponent,default,[t] "exponente"; [p] (pause:200),self::*,name(../..)="superscript",count(preceding-sibling::*)=1'.split(","),'Rule,subscript,default,[t] "sub\u00edndice"; [p] (pause:200),self::*,name(../..)="subscript",count(preceding-sibling::*)=1'.split(","),'Rule,overscript,default,[t] "sobre\u00edndice"; [p] (pause:200),self::*,name(../..)="overscore",count(preceding-sibling::*)=1'.split(","),'Rule,underscript,default,[t] "bajo\u00edndice"; [p] (pause:200),self::*,name(../..)="underscore",count(preceding-sibling::*)=1'.split(","), +'Rule,radicand,default,[t] "radicand"; [p] (pause:200),self::*,name(../..)="sqrt"'.split(","),'Rule,radicand,default,[t] "radicand"; [p] (pause:200),self::*,name(../..)="root",count(preceding-sibling::*)=1'.split(","),'Rule,index,default,[t] "\u00edndice"; [p] (pause:200),self::*,name(../..)="root",count(preceding-sibling::*)=0'.split(","),'Rule,leftsub,default,[t] "sub\u00edndice izquierdo"; [p] (pause:200),self::*,name(../..)="tensor",@role="leftsub"'.split(","),'Rule,leftsub,default,[t] CSFordinalPosition (grammar:gender="male"); [t] "sub\u00edndice izquierdo"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="leftsub"'.split(","), +'Rule,leftsuper,default,[t] "super\u00edndice izquierdo"; [p] (pause:200),self::*,name(../..)="tensor",@role="leftsuper"'.split(","),'Rule,leftsuper,default,[t] CSFordinalPosition (grammar:gender="male"); [t] "super\u00edndice izquierdo"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="leftsuper"'.split(","),'Rule,rightsub,default,[t] "sub\u00edndice derecho"; [p] (pause:200),self::*,name(../..)="tensor",@role="rightsub"'.split(","),'Rule,rightsub,default,[t] CSFordinalPosition (grammar:gender="male"); [t] "sub\u00edndice derecho"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="rightsub"'.split(","), +'Rule,rightsuper,default,[t] "super\u00edndice derecho"; [p] (pause:200),self::*,name(../..)="tensor",@role="rightsuper"'.split(","),'Rule,rightsuper,default,[t] CSFordinalPosition (grammar:gender="male"); [t] "super\u00edndice derecho"; [p] (pause:200),self::*,name(../..)="punctuated",name(../../../..)="tensor",../../@role="rightsuper"'.split(","),'Rule,choice,default,[t] "cantidad de elecci\u00f3n"; [p] (pause:200),self::line,@role="binomial",parent::*/parent::vector,count(preceding-sibling::*)=0'.split(","), +'Rule,select,default,[t] "cantidad de selecci\u00f3n"; [p] (pause:200),self::line,@role="binomial",parent::*/parent::vector,count(preceding-sibling::*)=1'.split(","),["Rule","row","default",'[t] CSFordinalPosition (grammar:gender="female"); [t] "fila"; [p] (pause:200)',"self::row"],["Aliases","row","self::line"],'Rule{cell{default{[n] ../..; [t] CSFordinalPosition (grammar:gender="female"); [t] "columna"; [p] (pause:200){self::cell{contains(@grammar,"depth")'.split("{"),["Rule","cell","default",'[t] CSFordinalPosition (grammar:gender="female"); [t] "columna"; [p] (pause:200)', +"self::cell"]]};sre.SemanticTreeRules={domain:"default",functions:[["CTXF","CTXFnodeCounter",sre.StoreUtil.nodeCounter],["CTXF","CTXFcontentIterator",sre.StoreUtil.contentIterator]],rules:['Rule{collapsed{default{[t] "collapsed"; [n] . (engine:modality=summary,grammar:collapsed){self::*{@alternative{not(contains(@grammar, "collapsed")){self::*{self::*{self::*{self::*{self::*'.split("{"),["Rule","stree","default","[n] ./*[1]","self::stree"],'Rule;factorial;default;[t] "factorial";self::punctuation;text()="!";name(preceding-sibling::*[1])!="text"'.split(";"), +["Rule","multrel","default",'[t] "multirelation"; [m] children/* (sepFunc:CTXFcontentIterator)',"self::multirel"],'Rule{variable-equality{default{[t] "equation sequence"; [m] children/* (context:"part",ctxtFunc:CTXFnodeCounter,sepFunc:CTXFcontentIterator){self::relseq[@role="equality"]{count(./children/*)>2{./children/punctuation[@role="ellipsis"]'.split("{"),'Rule{multi-equality{default{[t] "equation sequence"; [m] children/* (context:"part",ctxtFunc:CTXFnodeCounter,sepFunc:CTXFcontentIterator){self::relseq[@role="equality"]{count(./children/*)>2'.split("{"), +'Rule,equality,default,[n] children/*[1]; [p] (pause:200); [n] content/*[1] (pause:200);[n] children/*[2],self::relseq[@role="equality"],count(./children/*)=2'.split(","),'Rule,simple-equality,default,[n] children/*[1]; [p] (pause:200); [n] content/*[1] (pause:200);[n] children/*[2],self::relseq[@role="equality"],count(./children/*)=2,./children/identifier or ./children/number'.split(","),'Rule,simple-equality2,default,[n] children/*[1]; [p] (pause:200); [n] content/*[1] (pause:200);[n] children/*[2],self::relseq[@role="equality"],count(./children/*)=2,./children/function or ./children/appl'.split(","), +["Rule","relseq","default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq"],["Rule","binary-operation","default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop"],'Rule,variable-addition,default,[t] "sum with variable number of summands";[p] (pause:400); [m] children/* (sepFunc:CTXFcontentIterator),self::infixop[@role="addition"],count(children/*)>2,children/punctuation[@role="ellipsis"]'.split(","),'Rule,multi-addition,default,[t] "sum with"; [t] count(./children/*); [t] "summands";[p] (pause:400); [m] children/* (sepFunc:CTXFcontentIterator),self::infixop[@role="addition"],count(./children/*)>2'.split(","), +["Rule","prefix","default",'[t] "prefix"; [m] content/* (pause 150);[n] children/*[1]',"self::prefixop"],'Rule,negative,default,[t] "negative"; [n] children/*[1],self::prefixop,self::prefixop[@role="negative"]'.split(","),["Rule","postfix","default",'[n] children/*[1]; [t] "postfix"; [m] content/* (pause 300)',"self::postfixop"],["Rule","identifier","default","[n] text()","self::identifier"],["Rule","number","default","[n] text()","self::number"],'Rule,mixed-number,default,[n] children/*[1]; [t] "and"; [n] children/*[2]; ,self::number,@role="mixed"'.split(","), +'Rule{font{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::*{@font{not(contains(@grammar, "ignoreFont")){@font!="normal"'.split("{"),'Rule{font-identifier-short{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::identifier{string-length(text())=1{@font{not(contains(@grammar, "ignoreFont")){@font="normal"{""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", ""){@role!="unit"'.split("{"), +'Rule{font-identifier{default{[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font){self::identifier{string-length(text())=1{@font{@font="normal"{not(contains(@grammar, "ignoreFont")){@role!="unit"'.split("{"),'Rule;omit-font;default;[n] . (grammar:ignoreFont=@font);self::identifier;string-length(text())=1;@font;not(contains(@grammar, "ignoreFont"));@font="italic"'.split(";"),["Rule","fraction","default",'[p] (pause:250); [n] children/*[1] (rate:0.35); [p] (pause:250); [t] "divided by"; [n] children/*[2] (rate:-0.35); [p] (pause:400)', +"self::fraction"],["Rule","superscript","default",'[n] children/*[1]; [t] "super"; [n] children/*[2] (pitch:0.35);[p] (pause:300)',"self::superscript"],["Rule","subscript","default",'[n] children/*[1]; [t] "sub"; [n] children/*[2] (pitch:-0.35);[p] (pause:300)',"self::subscript"],'Rule,ellipsis,default,[p] (pause:200); [t] "ellipsis"; [p] (pause:300),self::punctuation,self::punctuation[@role="ellipsis"]'.split(","),'Rule;fence-single;default;[n] text();self::punctuation;self::punctuation[@role="openfence"]'.split(";"), +["Aliases","fence-single","self::punctuation",'self::punctuation[@role="closefence"]'],["Aliases","fence-single","self::punctuation",'self::punctuation[@role="vbar"]'],["Aliases","fence-single","self::punctuation",'self::punctuation[@role="application"]'],["Rule","omit-empty","default","[p] (pause:100)","self::empty"],'Rule,fences-open-close,default,[p] (pause:100); [n] content/*[1]; [n] children/*[1]; [n] content/*[2]; [p] (pause:100),self::fenced,@role="leftright"'.split(","),'Rule,fences-open-close-in-appl,default,[p] (pause:200); [n] children/*[1]; [p] (pause:200);,self::fenced[@role="leftright"],./parent::children/parent::appl'.split(","), +'Rule,fences-neutral,default,[p] (pause:100); [t] "absolute value of"; [n] children/*[1];[p] (pause:350);,self::fenced,self::fenced[@role="neutral"]'.split(","),["Rule","omit-fences","default","[p] (pause:500); [n] children/*[1]; [p] (pause:200);","self::fenced"],["Rule","matrix","default",'[t] "matrix"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:100)',"self::matrix"],["Rule","matrix-row","default",'[m] children/* (ctxtFunc:CTXFnodeCounter,context:"column",pause:100)','self::row[@role="matrix"]'], +["Rule","matrix-cell","default","[n] children/*[1]",'self::cell[@role="matrix"]'],["Rule","vector","default",'[t] "vector"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"element",pause:100)',"self::vector"],["Rule","cases","default",'[t] "case statement"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"case",pause:100)',"self::cases"],["Rule","cases-row","default","[m] children/*",'self::row[@role="cases"]'],["Rule","cases-cell","default","[n] children/*[1]",'self::cell[@role="cases"]'],["Rule", +"row","default",'[m] ./* (ctxtFunc:CTXFnodeCounter,context:"column",pause:100)',"self::row"],'Rule{cases-end{default{[t] "case statement"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"case",pause:100);[t] "end cases"{self::cases{following-sibling::*'.split("{"),["Rule","multiline","default",'[t] "multiline equation";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"line",pause:100)',"self::multiline"],'Rule{multiline-ineq{default{[t] "multiline inequality";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:100){self::multiline{@role="inequality"'.split("{"), +["Rule","line","default","[m] children/*","self::line"],["Rule","table","default",'[t] "multiline equation";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:200)',"self::table"],'Rule{table-ineq{default{[t] "multiline inequality";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:200){self::table{@role="inequality"'.split("{"),["Rule","table-row","default","[m] children/* (pause:100)",'self::row[@role="table"]'],["Aliases","cases-cell",'self::cell[@role="table"]'],'Rule;empty-cell;default;[t] "Blank";self::cell;count(children/*)=0'.split(";"), +'Rule,end-punct,default,[m] children/*; [p] (pause:300),self::punctuated,@role="endpunct"'.split(","),'Rule,start-punct,default,[n] content/*[1]; [p] (pause:200); [m] children/*[position()>1],self::punctuated,@role="startpunct"'.split(","),'Rule,integral-punct,default,[n] children/*[1] (rate:0.2); [n] children/*[3] (rate:0.2),self::punctuated,@role="integral"'.split(","),["Rule","punctuated","default","[m] children/* (pause:100)","self::punctuated"],["Rule","function","default","[n] text()","self::function"], +["Rule","appl","default","[n] children/*[1]; [n] content/*[1]; [n] children/*[2]","self::appl"],'Rule,sum-only,default,[n] children/*[1]; [t] "from"; [n] children/*[2]; [t] "to";[n] children/*[3],self::limboth,self::limboth[@role="sum"]'.split(","),["Rule","limboth","default",'[n] children/*[1]; [p] (pause 100); [t] "over"; [n] children/*[2];[t] "under"; [n] children/*[3]; [p] (pause 250);',"self::limboth"],["Rule","limlower","default",'[n] children/*[1]; [t] "over"; [n] children/*[2];',"self::limlower"], +["Rule","limupper","default",'[n] children/*[1]; [t] "under"; [n] children/*[2];',"self::limupper"],["Rule","largeop","default","[n] text()","self::largeop"],["Rule","bigop","default",'[n] children/*[1]; [p] (pause 100); [t] "over"; [n] children/*[2];[p] (pause 250);',"self::bigop"],["Rule","integral","default","[n] children/*[1]; [p] (pause 100); [n] children/*[2];[p] (pause 200); [n] children/*[3] (rate:0.35);","self::integral"],["Rule","sqrt","default",'[t] "Square root of"; [n] children/*[1] (rate:0.35); [p] (pause:400)', +"self::sqrt"],'Rule,square,default,[n] children/*[1]; [t] "squared" (pitch:0.35); [p] (pause:300),self::superscript,children/*[2][text()=2],name(./children/*[1])!="text"'.split(","),'Rule,cube,default,[n] children/*[1]; [t] "cubed" (pitch:0.35); [p] (pause:300),self::superscript,children/*[2][text()=3],name(./children/*[1])!="text"'.split(","),["Rule","root","default",'[t] "root of order"; [n] children/*[1];[t] "over"; [n] children/*[2] (rate:0.35); [p] (pause:400)',"self::root"],["Rule","text","default", +"[n] text(); [p] (pause:200)","self::text"],'Rule;unit;default;[t] text() (grammar:annotation="unit":translate:plural);self::identifier;@role="unit"'.split(";"),'Rule,unit-square,default,[t] "square"; [n] children/*[1],self::superscript,@role="unit",children/*[2][text()=2],name(children/*[1])="identifier"'.split(","),'Rule,unit-cubic,default,[t] "cubic"; [n] children/*[1],self::superscript,@role="unit",children/*[2][text()=3],name(children/*[1])="identifier"'.split(","),'Rule,reciprocal,default,[t] "reciprocal"; [n] children/*[1],self::superscript,@role="unit",name(children/*[1])="identifier",name(children/*[2])="prefixop",children/*[2][@role="negative"],children/*[2]/children/*[1][text()=1],count(preceding-sibling::*)=0 or preceding-sibling::*[@role!="unit"]'.split(","), +'Rule,reciprocal,default,[t] "per"; [n] children/*[1],self::superscript,@role="unit",name(children/*[1])="identifier",name(children/*[2])="prefixop",children/*[2][@role="negative"],children/*[2]/children/*[1][text()=1],preceding-sibling::*[@role="unit"]'.split(","),'Rule;unit-combine;default;[m] children/*;self::infixop;@role="unit"'.split(";"),'Rule,unit-divide,default,[n] children/*[1] (pitch:0.3); [t] "per"; [n] children/*[2] (pitch:-0.3),self::fraction,@role="unit"'.split(",")]};sre.SummaryFrench={locale:"fr",modality:"summary",rules:[["Rule","collapsed-masculine","default.masculine",'[t] "compress\u00e9"','contains(@grammar, "collapsed")'],["Rule","collapsed-feminine","default.feminine",'[t] "compress\u00e9e"','contains(@grammar, "collapsed")'],["Rule","no-collapsed","default.masculine",'[t] ""','not(contains(@grammar, "collapsed"))'],["Rule","no-collapsed","default.feminine",'[t] ""','not(contains(@grammar, "collapsed"))'],["Rule","stree","default.default","[n] ./*[1]", +"self::stree"],'Rule{abstr-identifier{default.default{[t] "identifiant long"; [n] . (engine:style=masculine){self::identifier{contains(@grammar, "collapsed")'.split("{"),["Rule","abstr-identifier","default.default",'[t] "identifiant"; [n] . (engine:style=masculine)',"self::identifier"],'Rule{abstr-number{default.default{[t] "nombre long"; [n] . (engine:style=masculine){self::number{contains(@grammar, "collapsed")'.split("{"),["Rule","abstr-number","default.default",'[t] "nombre"; [n] . (engine:style=masculine)', +"self::number"],'Rule{abstr-mixed-number{default.default{[t] "nombre fractionnaire long"; [n] . (engine:style=masculine){self::number{@role="mixed"{contains(@grammar, "collapsed")'.split("{"),'Rule,abstr-mixed-number,default.default,[t] "nombre fractionnaire"; [n] . (engine:style=masculine),self::number,@role="mixed"'.split(","),["Rule","abstr-text","default.default",'[t] "texte"; [n] . (engine:style=masculine)',"self::text"],["Rule","abstr-function","default.default",'[t] "expression fonctionnelle"; [n] . (engine:style=feminine)', +"self::function"],["Rule","abstr-function","mathspeak.brief",'[t] "fonction"; [n] . (engine:style=feminine)',"self::function"],["SpecializedRule","abstr-function","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-lim,default.default,[t] "fonction de limitation"; [n] . (engine:style=feminine),self::function,@role="limit function"'.split(","),'Rule,abstr-lim,mathspeak.brief,[t] "lim"; [n] . (engine:style=feminine),self::function,@role="limit function"'.split(","),["SpecializedRule","abstr-lim","mathspeak.brief", +"mathspeak.sbrief"],["Rule","abstr-fraction","default.default",'[t] "fraction"; [n] . (engine:style=feminine)',"self::fraction"],["Rule","abstr-fraction","mathspeak.brief",'[t] "frac"; [n] . (engine:style=feminine)',"self::fraction"],["SpecializedRule","abstr-fraction","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-continued-fraction,default.default,[t] "fraction continue"; [n] . (engine:style=feminine),self::fraction,children/*[2]/descendant-or-self::*[@role="ellipsis"]'.split(","),'Rule,abstr-continued-fraction,mathspeak.brief,[t] "frac continue"; [n] . (engine:style=feminine),self::fraction,children/*[2]/descendant-or-self::*[@role="ellipsis"]'.split(","), +["SpecializedRule","abstr-continued-fraction","mathspeak.brief","mathspeak.sbrief"],["Rule","abstr-sqrt","default.default",'[t] "racine carr\u00e9e"; [n] . (engine:style=feminine)',"self::sqrt"],'Rule,abstr-sqrt-nested,default.default,[t] "racine carr\u00e9e imbriqu\u00e9e"; [n] . (engine:style=feminine),self::sqrt,children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(","),'Rule{abstr-root{default.default{[t] "racine d\'indice"; [n] children/*[1] (engine:modality="speech"); [t] "fin indice"; [n] . (engine:style=feminine);{self::root{contains(@grammar, "collapsed"){following-sibling::* or ancestor::*/following-sibling::*'.split("{"), +["Rule","abstr-root","default.default",'[t] "racine d\'indice"; [n] children/*[1] (engine:modality=speech); [n] . (engine:style=feminine)',"self::root"],["Rule","abstr-root","mathspeak.brief",'[t] "racine"; [n] . (engine:style=feminine)',"self::root"],["SpecializedRule","abstr-root","mathspeak.brief","mathspeak.sbrief"],'Rule{abstr-root-nested{default.default{[t] "racine imbriqu\u00e9e d\'indice"; [n] children/*[1] (engine:modality=speech); [t] "fin indice"; [n] . (engine:style=feminine);{self::root{contains(@grammar, "collapsed"){children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root{following-sibling::* or ancestor::*/following-sibling::*'.split("{"), +'Rule,abstr-root-nested,default.default,[t] "racine imbriqu\u00e9e d\'indice"; [n] children/*[1] (engine:modality=speech); [n] . (engine:style=feminine),self::root,children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(","),'Rule,abstr-root-nested,mathspeak.brief,[t] "racine imbriqu\u00e9e"; [n] . (engine:style=feminine),self::root,children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(","),["SpecializedRule","abstr-root-nested","mathspeak.brief", +"mathspeak.sbrief"],["Rule","abstr-superscript","default.default",'[t] "puissance"; [n] . (engine:style=feminine)',"self::superscript"],["Rule","abstr-subscript","default.default",'[t] "indice"; [n] . (engine:style=masculine)',"self::subscript"],'Rule,abstr-subsup,default.default,[t] "puissance avec index"; [n] . (engine:style=feminine),self::superscript,name(children/*[1])="subscript"'.split(","),["Rule","abstr-infixop","default.default",'[t] @role (grammar:localRole); [t] "avec"; [t] count(./children/*); [t] "\u00e9l\u00e9ments"; [n] . (engine:style=masculine)', +"self::infixop"],'Rule,abstr-infixop,default.default,[t] @role (grammar:localRole); [t] "avec un nombre d\'\u00e9l\u00e9ments variable"; [n] . (engine:style=masculine),self::infixop,count(./children/*)>2,./children/punctuation[@role="ellipsis"]'.split(","),["Rule","abstr-infixop","mathspeak.brief","[t] @role (grammar:localRole); [n] . (engine:style=masculine)","self::infixop"],["SpecializedRule","abstr-infixop","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-addition,default.default,[t] "somme avec"; [t] count(./children/*); [t] "op\u00e9randes"; [n] . (engine:style=feminine),self::infixop,@role="addition"'.split(","), +'Rule,abstr-addition,mathspeak.brief,[t] "somme"; [n] . (engine:style=feminine),self::infixop,@role="addition"'.split(","),["SpecializedRule","abstr-addition","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-addition,default.default,[t] "somme avec un nombre variable d\'op\u00e9randes"; [n] . (engine:style=feminine),self::infixop,@role="addition",count(./children/*)>2,./children/punctuation[@role="ellipsis"]'.split(","),'Rule,abstr-multiplication,default.default,[t] "produit avec"; [t] count(./children/*); [t] "facteurs"; [n] . (engine:style=masculine);,self::infixop,@role="multiplication"'.split(","), +'Rule,abstr-multiplication,mathspeak.brief,[t] "produit"; [n] . (engine:style=masculine),self::infixop,@role="multiplication"'.split(","),["SpecializedRule","abstr-multiplication","mathspeak.brief","mathspeak.sbrief"],["Aliases","abstr-multiplication","self::infixop",'@role="implicit"'],'Rule,abstr-var-multiplication,default.default,[t] "produit avec un nombre de facteurs variable"; [n] . (engine:style=masculine),self::infixop,@role="multiplication",count(./children/*)>2,./children/punctuation[@role="ellipsis"]'.split(","), +'Aliases abstr-var-multiplication self::infixop @role="implicit" count(./children/*)>2 ./children/punctuation[@role="ellipsis"]'.split(" "),["Rule","abstr-vector","default.default",'[t] "vecteur de dimension"; [t] count(./children/*); [n] . (engine:style=masculine)',"self::vector"],["Rule","abstr-vector","mathspeak.brief",'[t] "vecteur"; [n] . (engine:style=masculine)',"self::vector"],["SpecializedRule","abstr-vector","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-vector,default.default,[t] "vecteur colonne de dimension n"; [n] . (engine:style=masculine),self::vector,./children/*/children/punctuation[@role="ellipsis"]'.split(","), +'Rule,abstr-binomial,default.default,[t] "binomial"; [n] . (engine:style=masculine),self::vector,@role="binomial"'.split(","),["SpecializedRule","abstr-binomial","default.default","mathspeak.brief"],["SpecializedRule","abstr-binomial","default.default","mathspeak.sbrief"],'Rule,abstr-determinant,default.default,[t] "d\u00e9terminant de dimension"; [t] count(./children/*); [n] . (engine:style=masculine),self::matrix,@role="determinant"'.split(","),'Rule,abstr-determinant,mathspeak.brief,[t] "d\u00e9terminant"; [n] . (engine:style=masculine),self::matrix,@role="determinant"'.split(","), +["SpecializedRule","abstr-determinant","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-determinant,default.default,[t] "d\u00e9terminant de dimension n"; [n] . (engine:style=masculine),self::matrix,@role="determinant",./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(","),'Rule,abstr-squarematrix,default.default,[t] "matrice carr\u00e9e de dimension"; [t] count(./children/*); [n] . (engine:style=feminine),self::matrix,@role="squarematrix"'.split(","),'Rule,abstr-squarematrix,mathspeak.brief,[t] "matrice carr\u00e9e"; [n] . (engine:style=feminine),self::matrix,@role="squarematrix"'.split(","), +["SpecializedRule","abstr-squarematrix","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-rowvector,default.default,[t] "vecteur ligne de dimension"; [t] count(./children/row/children/*); [n] . (engine:style=masculine),self::matrix,@role="rowvector"'.split(","),'Rule,abstr-rowvector,mathspeak.brief,[t] "vecteur ligne"; [n] . (engine:style=masculine),self::matrix,@role="rowvector"'.split(","),["SpecializedRule","abstr-rowvector","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-matrix;default.default;[t] "vecteur ligne de dimension n";self::matrix;@role="rowvector";./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(";"), +["Rule","abstr-matrix","default.default",'[t] "matrice"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [n] . (engine:style=feminine)',"self::matrix"],["Rule","abstr-matrix","mathspeak.brief",'[t] "matrice"; [n] . (engine:style=feminine)',"self::matrix"],["SpecializedRule","abstr-matrix","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-matrix,default.default,[t] "matrice de dimension n par m"; [n] . (engine:style=feminine),self::matrix,./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(","), +["Rule","abstr-cases","default.default",'[t] "d\u00e9claration de cas";[t] "avec"; [t] count(children/*); [t] "cas"; [n] . (engine:style=feminine)',"self::cases"],["Rule","abstr-cases","mathspeak.brief",'[t] "d\u00e9claration de cas"; [n] . (engine:style=feminine)',"self::cases"],["SpecializedRule","abstr-cases","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-cases,default.default,[t] "d\u00e9claration de cas variable"; [n] . (engine:style=feminine),self::cases,./children/row/children/cell/children/punctuation[@role="ellipsis"]or ./children/line/children/punctuation[@role="ellipsis"]'.split(","), +["Rule","abstr-punctuated","default.default",'[t] "liste de longueur"; [t] count(children/*) - count(content/*); [t] "s\u00e9par\u00e9e par des"; [n] content/*[1] (join:""); [t] "s"; [n] . (engine:style=feminine)',"self::punctuated"],["Rule","abstr-punctuated","mathspeak.brief",'[t] "liste s\u00e9par\u00e9e par des"; [n] content/*[1] (join:""); [t] "s"; [n] . (engine:style=feminine)',"self::punctuated"],["SpecializedRule","abstr-punctuated","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-punctuated,default.default,[t] "liste de longueur variable s\u00e9par\u00e9e par des"; [n] content/*[1] (join:""); [t] "s"; [n] . (engine:style=feminine),self::punctuated,./children/punctuation[@role="ellipsis"]'.split(","), +["Rule","abstr-bigop","default.default","[n] content/*[1]; [n] . (engine:style=masculine)","self::bigop"],["Rule","abstr-integral","default.default",'[t] "int\u00e9grale"; [n] . (engine:style=feminine)','@role="integral"'],"Rule,abstr-relation,default.default,[t] @role (grammar:localRole); [n] . (engine:style=masculine);,self::relseq,count(./children/*)=2".split(","),'Rule,abstr-relation-seq,default.default,[t] @role (grammar:localRole); [t] "s\u00e9quence"; [t] "avec"; [t] count(./children/*); [t] "\u00e9l\u00e9ments"; [n] . (engine:style=feminine),self::relseq,count(./children/*)>2'.split(","), +'Rule,abstr-relation-seq,mathspeak.brief,[t] @role (grammar:localRole); [t] "s\u00e9quence"; [n] . (engine:style=feminine),self::relseq,count(./children/*)>2'.split(","),["SpecializedRule","abstr-relation-seq","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-relation,default.default,[t] @role (grammar:localRole); [t] "s\u00e9quence"; [t] "avec un nombre de \u00e9l\u00e9ments variable"; [n] . (engine:style=feminine),self::relseq,count(./children/*)>2,./children/punctuation[@role="ellipsis"]'.split(","), +'UniqueAlias abstr-relation default.default self::multirel @role!="unknown" count(./children/*)>2'.split(" "),'Aliases abstr-var-relation self::multirel @role!="unknown" count(./children/*)>2 ./children/punctuation[@role="ellipsis"]'.split(" "),'Rule,abstr-multirel,default.default,[t] "s\u00e9quence de relation"; [t] "avec"; [t] count(./children/*); [t] "\u00e9l\u00e9ments"; [n] . (engine:style=feminine),self::multirel,count(./children/*)>2'.split(","),'Rule,abstr-multirel,mathspeak.brief,[t] "s\u00e9quence de relation"; [n] . (engine:style=feminine),self::multirel,count(./children/*)>2'.split(","), +["SpecializedRule","abstr-multirel","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-multirel,default.default,[t] "s\u00e9quence de relation avec un nombre de \u00e9l\u00e9ments variable"; [n] . (engine:style=feminine),self::multirel,count(./children/*)>2,./children/punctuation[@role="ellipsis"]'.split(","),["Rule","abstr-table","default.default",'[t] "table avec"; [t] count(children/*); [t] "lignes et";[t] count(children/*[1]/children/*); [t] "colonnes"; [n] . (engine:style=feminine);',"self::table"], +["Rule","abstr-line","default.default",'[t] "dans"; [t] @role (grammar:localRole); [n] . (engine:style=masculine)',"self::line"],["Rule","abstr-row","default.default",'[t] "dans"; [t] @role (grammar:localRole);[t] count(preceding-sibling::..); [t] "avec";[t] count(children/*); [t] "colonnes"; [n] . (engine:style=feminine)',"self::row"],["Rule","abstr-cell","default.default",'[t] "dans"; [t] @role (grammar:localRole); [n] . (engine:style=feminine);',"self::cell"]]};sre.SummaryGerman={modality:"summary",locale:"de",rules:['Rule;abstr-identifier;default.default;[t] "langer Bezeichner";self::identifier;contains(@grammar, "collapsed")'.split(";"),["Rule","abstr-identifier","default.default",'[t] "Bezeichner"',"self::identifier"],'Rule;abstr-number;default.default;[t] "lange Zahl";self::number;contains(@grammar, "collapsed")'.split(";"),["Rule","abstr-number","default.default",'[t] "Zahl"',"self::number"],'Rule;abstr-mixed-number;default.default;[t] "langer gemischter Bruch";self::number;@role="mixed";contains(@grammar, "collapsed")'.split(";"), +'Rule;abstr-mixed-number;default.default;[t] "gemischter Bruch";self::number;@role="mixed"'.split(";"),["Rule","abstr-text","default.default",'[t] "Text"',"self::text"],["Rule","abstr-function","default.default",'[t] "Funktionsausdruck"',"self::function"],["Rule","abstr-function","mathspeak.brief",'[t] "Funktion"',"self::function"],["SpecializedRule","abstr-function","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-lim;default.default;[t] "Grenzwertfunktion";self::function;@role="limit function"'.split(";"), +'Rule;abstr-lim;mathspeak.brief;[t] "Grenzwert";self::function;@role="limit function"'.split(";"),["SpecializedRule","abstr-lim","mathspeak.brief","mathspeak.sbrief"],["Rule","abstr-fraction","default.default",'[t] "Bruch"',"self::fraction"],'Rule;abstr-continued-fraction;default.default;[t] "Kettenbruch";self::fraction;children/*[2]/descendant-or-self::*[@role="ellipsis"]'.split(";"),["Rule","abstr-sqrt","default.default",'[t] "Quadratwurzel"',"self::sqrt"],'Rule;abstr-sqrt-nested;default.default;[t] "verschachtelte Quadratwurzel";self::sqrt;children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(";"), +'Rule{abstr-root{default.default{[t] "Wurzel mit Exponent"; [n] children/*[1] (engine:modality=speech); [t] "Exponentende"{self::root{contains(@grammar, "collapsed"){following-sibling::* or ancestor::*/following-sibling::*'.split("{"),["Rule","abstr-root","default.default",'[t] "Wurzel mit Exponent"; [n] children/*[1] (engine:modality=speech)',"self::root"],["Rule","abstr-root","mathspeak.brief",'[t] "Wurzel"',"self::root"],["SpecializedRule","abstr-root","mathspeak.brief","mathspeak.sbrief"],'Rule{abstr-root-nested{default.default{[t] "verschachtelte Wurzel mit Wurzelexponent"; [n] children/*[1] (engine:modality="speech"); [t] "Ende Wurzelexponent"{self::root{contains(@grammar, "collapsed"){children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root{following-sibling::* or ancestor::*/following-sibling::*'.split("{"), +'Rule,abstr-root-nested,default.default,[t] "verschachtelte Wurzel mit Exponent"; [n] children/*[1] (engine:modality="speech"),self::root,children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(","),'Rule;abstr-root-nested;mathspeak.brief;[t] "verschachtelte Wurzel";self::root;children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(";"),["SpecializedRule","abstr-root-nested","mathspeak.brief","mathspeak.sbrief"],["Rule","abstr-superscript","default.default", +'[t] "Potenz"',"self::superscript"],["Rule","abstr-subscript","default.default",'[t] "Index"',"self::subscript"],'Rule;abstr-subsup;default.default;[t] "Potenz mit Index";self::superscript;name(children/*[1])="subscript"'.split(";"),["Rule","abstr-infixop","default.default",'[t] @role (grammar:localRole); [t] "mit"; [t] count(./children/*); [t] "Elementen"',"self::infixop"],'Rule,abstr-infixop,default.default,[t] @role (grammar:localRole); [t] "mit ver\u00e4nderlicher Anzahl an Elementen",self::infixop,count(./children/*)>2,./children/punctuation[@role="ellipsis"]'.split(","), +["Rule","abstr-infixop","mathspeak.brief","[t] @role (grammar:localRole)","self::infixop"],["SpecializedRule","abstr-infixop","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-addition,default.default,[t] "Summe mit"; [t] count(./children/*); [t] "Summanden",self::infixop,@role="addition"'.split(","),'Rule;abstr-addition;mathspeak.brief;[t] "Summe";self::infixop;@role="addition"'.split(";"),["SpecializedRule","abstr-addition","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-addition;default.default;[t] "Summe mit ver\u00e4nderlicher Anzahl an Summanden";self::infixop;@role="addition";count(./children/*)>2;./children/punctuation[@role="ellipsis"]'.split(";"), +'Rule,abstr-multiplication,default.default,[t] "Produkt mit"; [t] count(./children/*); [t] "Faktoren",self::infixop,@role="multiplication"'.split(","),'Rule;abstr-multiplication;mathspeak.brief;[t] "Produkt";self::infixop;@role="multiplication"'.split(";"),["SpecializedRule","abstr-multiplication","mathspeak.brief","mathspeak.sbrief"],["Aliases","abstr-multiplication","self::infixop",'@role="implicit"'],'Rule;abstr-var-multiplication;default.default;[t] "Produkt mit ver\u00e4nderlicher Anzahl an Faktoren";self::infixop;@role="multiplication";count(./children/*)>2;./children/punctuation[@role="ellipsis"]'.split(";"), +'Aliases abstr-var-multiplication self::infixop @role="implicit" count(./children/*)>2 ./children/punctuation[@role="ellipsis"]'.split(" "),["Rule","abstr-vector","default.default",'[t] count(./children/*) ; [t] "dimensionaler Vektor"',"self::vector"],["Rule","abstr-vector","mathspeak.brief",'[t] "Vektor"',"self::vector"],["SpecializedRule","abstr-vector","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-vector;default.default;[t] "n dimensionaler Vektor";self::vector;./children/*/children/punctuation[@role="ellipsis"]'.split(";"), +'Rule;abstr-binomial;default.default;[t] "Binomialkoeffizient";self::vector;@role="binomial"'.split(";"),["SpecializedRule","abstr-binomial","default.default","mathspeak.brief"],["SpecializedRule","abstr-binomial","default.default","mathspeak.sbrief"],'Rule,abstr-determinant,default.default,[t] count(./children/*); [t] "dimensionale Determinante",self::matrix,@role="determinant"'.split(","),'Rule;abstr-determinant;mathspeak.brief;[t] "Determinante";self::matrix;@role="determinant"'.split(";"),["SpecializedRule", +"abstr-determinant","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-determinant;default.default;[t] "n dimensionale Determinante";self::matrix;@role="determinant";./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(";"),'Rule,abstr-squarematrix,default.default,[t] count(./children/*); [t] "dimensionale quadratische Matrize",self::matrix,@role="squarematrix"'.split(","),'Rule;abstr-squarematrix;mathspeak.brief;[t] "quadratische Matrize";self::matrix;@role="squarematrix"'.split(";"), +["SpecializedRule","abstr-squarematrix","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-rowvector,default.default,[t] count(./children/row/children/*); [t] "dimensionaler Zeilenvektor",self::matrix,@role="rowvector"'.split(","),'Rule;abstr-rowvector;mathspeak.brief;[t] "Zeilenvektor";self::matrix;@role="rowvector"'.split(";"),["SpecializedRule","abstr-rowvector","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-matrix;default.default;[t] "n dimensionaler Zeilenvektor";self::matrix;@role="rowvector";./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(";"), +["Rule","abstr-matrix","default.default",'[t] count(children/*); [t] "mal";[t] count(children/*[1]/children/*); [t] "Matrize"',"self::matrix"],["Rule","abstr-matrix","mathspeak.brief",'[t] "Matrize"',"self::matrix"],["SpecializedRule","abstr-matrix","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-matrix;default.default;[t] "n mal m dimensionale Matrize";self::matrix;./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(";"),["Rule","abstr-cases","default.default",'[t] "Fallunterscheidung";[t] "mit"; [t] count(children/*); [t] "F\u00e4llen"', +"self::cases"],["Rule","abstr-cases","mathspeak.brief",'[t] "Fallunterscheidung"',"self::cases"],["SpecializedRule","abstr-cases","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-cases;default.default;[t] "Fallunterscheidung mit ver\u00e4nderlicher Anzahl an F\u00e4llen";self::cases;./children/row/children/cell/children/punctuation[@role="ellipsis"]or ./children/line/children/punctuation[@role="ellipsis"]'.split(";"),["Rule","abstr-punctuated","default.default",'[t] "mit"; [n] content/*[1]; [t] "getrennte Liste der L\u00e4nge"; [t] count(children/*) - count(content/*)', +"self::punctuated"],["Rule","abstr-punctuated","mathspeak.brief",'[t] "mit"; [n] content/*[1]; [t] "getrennte Liste";',"self::punctuated"],["SpecializedRule","abstr-punctuated","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-punctuated,default.default,[t] "mit"; [n] content/*[1]; [t] "getrennte Liste";[t] "ver\u00e4nderlicher L\u00e4nge",self::punctuated,./children/punctuation[@role="ellipsis"]'.split(","),["Rule","abstr-bigop","default.default","[n] content/*[1]","self::bigop"],["Rule","abstr-integral", +"default.default",'[t] "Integral"','@role="integral"'],"Rule,abstr-relation,default.default,[t] @role (grammar:localRole);,self::relseq,count(./children/*)=2".split(","),'Rule{abstr-relation-seq{default.default{[t] @role (grammar:localRole, join:""); [t] "ssequenz"; [t] "mit"; [t] count(./children/*); [t] "Elementen"{self::relseq{count(./children/*)>2'.split("{"),'Rule{abstr-relation-seq{mathspeak.brief{[t] @role (grammar:localRole, join:""); [t] "ssequenz"{self::relseq{count(./children/*)>2'.split("{"), +["SpecializedRule","abstr-relation-seq","mathspeak.brief","mathspeak.sbrief"],'Rule{abstr-var-relation{default.default{[t] @role (grammar:localRole, join:""); [t] "ssequenz";[t] "mit ver\u00e4nderlicher Anzahl an Elementen"{self::relseq{count(./children/*)>2{./children/punctuation[@role="ellipsis"]'.split("{"),'UniqueAlias abstr-relation default.default self::multirel @role!="unknown" count(./children/*)>2'.split(" "),'Aliases abstr-var-relation self::multirel @role!="unknown" count(./children/*)>2 ./children/punctuation[@role="ellipsis"]'.split(" "), +'Rule,abstr-multirel,default.default,[t] "Relationsequenz"; [t] "mit"; [t] count(./children/*); [t] "Elementen",self::multirel,count(./children/*)>2'.split(","),'Rule;abstr-multirel;mathspeak.brief;[t] "Relationsequenz";self::multirel;count(./children/*)>2'.split(";"),["SpecializedRule","abstr-multirel","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-multirel;default.default;[t] "Relationsequenz mit ver\u00e4nderlicher Anzahl an Elementen";self::multirel;count(./children/*)>2;./children/punctuation[@role="ellipsis"]'.split(";"), +["Rule","abstr-table","default.default",'[t] "Tabelle mit"; [t] count(children/*); [t] "Zeilen und";[t] count(children/*[1]/children/*); [t] "Spalten"',"self::table"],["Rule","abstr-line","default.default",'[t] "in"; [t] @role (grammar:localRole);',"self::line"],["Rule","abstr-row","default.default",'[t] "in"; [t] @role (grammar:localRole);[t] count(preceding-sibling::..); [t] "mit";[t] count(children/*); [t] "Spalten"',"self::row"],["Rule","abstr-cell","default.default",'[t] "in"; [t] @role (grammar:localRole);', +"self::cell"]]};sre.SummaryRules={modality:"summary",rules:['Rule;abstr-identifier;default.default;[t] "long identifier";self::identifier;contains(@grammar, "collapsed")'.split(";"),["Rule","abstr-identifier","default.default",'[t] "identifier"',"self::identifier"],'Rule;abstr-number;default.default;[t] "long number";self::number;contains(@grammar, "collapsed")'.split(";"),["Rule","abstr-number","default.default",'[t] "number"',"self::number"],'Rule;abstr-mixed-number;default.default;[t] "long mixed number";self::number;@role="mixed";contains(@grammar, "collapsed")'.split(";"), +'Rule;abstr-mixed-number;default.default;[t] "mixed number";self::number;@role="mixed"'.split(";"),["Rule","abstr-text","default.default",'[t] "text"',"self::text"],["Rule","abstr-function","default.default",'[t] "functional expression"',"self::function"],["Rule","abstr-function","mathspeak.brief",'[t] "function"',"self::function"],["SpecializedRule","abstr-function","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-lim;default.default;[t] "limit function";self::function;@role="limit function"'.split(";"), +'Rule;abstr-lim;mathspeak.brief;[t] "lim";self::function;@role="limit function"'.split(";"),["SpecializedRule","abstr-lim","mathspeak.brief","mathspeak.sbrief"],["Rule","abstr-fraction","default.default",'[t] "fraction"',"self::fraction"],["Rule","abstr-fraction","mathspeak.brief",'[t] "frac"',"self::fraction"],["SpecializedRule","abstr-fraction","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-continued-fraction;default.default;[t] "continued fraction";self::fraction;children/*[2]/descendant-or-self::*[@role="ellipsis"]'.split(";"), +'Rule;abstr-continued-fraction;mathspeak.brief;[t] "continued frac";self::fraction;children/*[2]/descendant-or-self::*[@role="ellipsis"]'.split(";"),["SpecializedRule","abstr-continued-fraction","mathspeak.brief","mathspeak.sbrief"],["Rule","abstr-sqrt","default.default",'[t] "square root"',"self::sqrt"],'Rule;abstr-sqrt-nested;default.default;[t] "nested square root";self::sqrt;children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(";"),'Rule{abstr-root{default.default{[t] "root of index"; [n] children/*[1] (engine:modality="speech"); [t] "endindex"{self::root{contains(@grammar, "collapsed"){following-sibling::* or ancestor::*/following-sibling::*'.split("{"), +["Rule","abstr-root","default.default",'[t] "root of index"; [n] children/*[1] (engine:modality=speech)',"self::root"],["Rule","abstr-root","mathspeak.brief",'[t] "root"',"self::root"],["SpecializedRule","abstr-root","mathspeak.brief","mathspeak.sbrief"],'Rule{abstr-root-nested{default.default{[t] "nested root of index"; [n] children/*[1] (engine:modality="speech"); [t] "endindex"{self::root{contains(@grammar, "collapsed"){children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root{following-sibling::* or ancestor::*/following-sibling::*'.split("{"), +'Rule,abstr-root-nested,default.default,[t] "nested root of index"; [n] children/*[1] (engine:modality="speech"),self::root,children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(","),'Rule;abstr-root-nested;mathspeak.brief;[t] "nested root";self::root;children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(";"),["SpecializedRule","abstr-root-nested","mathspeak.brief","mathspeak.sbrief"],["Rule","abstr-superscript","default.default",'[t] "power"', +"self::superscript"],["Rule","abstr-subscript","default.default",'[t] "subscript"',"self::subscript"],'Rule;abstr-subsup;default.default;[t] "power with subscript";self::superscript;name(children/*[1])="subscript"'.split(";"),["Rule","abstr-infixop","default.default",'[t] @role (grammar:localRole); [t] "with"; [t] count(./children/*); [t] "elements"',"self::infixop"],'Rule,abstr-infixop,default.default,[t] @role (grammar:localRole); [t] "with variable number of elements",self::infixop,count(./children/*)>2,./children/punctuation[@role="ellipsis"]'.split(","), +["Rule","abstr-infixop","mathspeak.brief","[t] @role (grammar:localRole)","self::infixop"],["SpecializedRule","abstr-infixop","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-addition,default.default,[t] "sum with"; [t] count(./children/*); [t] "summands",self::infixop,@role="addition"'.split(","),'Rule;abstr-addition;mathspeak.brief;[t] "sum";self::infixop;@role="addition"'.split(";"),["SpecializedRule","abstr-addition","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-addition;default.default;[t] "sum with variable number of summands";self::infixop;@role="addition";count(./children/*)>2;./children/punctuation[@role="ellipsis"]'.split(";"), +'Rule,abstr-multiplication,default.default,[t] "product with"; [t] count(./children/*); [t] "factors",self::infixop,@role="multiplication"'.split(","),'Rule;abstr-multiplication;mathspeak.brief;[t] "product";self::infixop;@role="multiplication"'.split(";"),["SpecializedRule","abstr-multiplication","mathspeak.brief","mathspeak.sbrief"],["Aliases","abstr-multiplication","self::infixop",'@role="implicit"'],'Rule;abstr-var-multiplication;default.default;[t] "product with variable number of factors";self::infixop;@role="multiplication";count(./children/*)>2;./children/punctuation[@role="ellipsis"]'.split(";"), +'Aliases abstr-var-multiplication self::infixop @role="implicit" count(./children/*)>2 ./children/punctuation[@role="ellipsis"]'.split(" "),["Rule","abstr-vector","default.default",'[t] count(./children/*) ; [t] "dimensional vector"',"self::vector"],["Rule","abstr-vector","mathspeak.brief",'[t] "vector"',"self::vector"],["SpecializedRule","abstr-vector","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-vector;default.default;[t] "n dimensional vector";self::vector;./children/*/children/punctuation[@role="ellipsis"]'.split(";"), +'Rule;abstr-binomial;default.default;[t] "binomial";self::vector;@role="binomial"'.split(";"),["SpecializedRule","abstr-binomial","default.default","mathspeak.brief"],["SpecializedRule","abstr-binomial","default.default","mathspeak.sbrief"],'Rule,abstr-determinant,default.default,[t] count(./children/*); [t] "dimensional determinant",self::matrix,@role="determinant"'.split(","),'Rule;abstr-determinant;mathspeak.brief;[t] "determinant";self::matrix;@role="determinant"'.split(";"),["SpecializedRule", +"abstr-determinant","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-determinant;default.default;[t] "n dimensional determinant";self::matrix;@role="determinant";./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(";"),'Rule,abstr-squarematrix,default.default,[t] count(./children/*); [t] "dimensional square matrix",self::matrix,@role="squarematrix"'.split(","),'Rule;abstr-squarematrix;mathspeak.brief;[t] "square matrix";self::matrix;@role="squarematrix"'.split(";"),["SpecializedRule", +"abstr-squarematrix","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-rowvector,default.default,[t] count(./children/row/children/*); [t] "dimensional row vector",self::matrix,@role="rowvector"'.split(","),'Rule;abstr-rowvector;mathspeak.brief;[t] "row vector";self::matrix;@role="rowvector"'.split(";"),["SpecializedRule","abstr-rowvector","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-matrix;default.default;[t] "n dimensional row vector";self::matrix;@role="rowvector";./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(";"), +["Rule","abstr-matrix","default.default",'[t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "matrix"',"self::matrix"],["Rule","abstr-matrix","mathspeak.brief",'[t] "matrix"',"self::matrix"],["SpecializedRule","abstr-matrix","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-matrix;default.default;[t] "n by m dimensional matrix";self::matrix;./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(";"),["Rule","abstr-cases","default.default",'[t] "case statement";[t] "with"; [t] count(children/*); [t] "cases"', +"self::cases"],["Rule","abstr-cases","mathspeak.brief",'[t] "case statement"',"self::cases"],["SpecializedRule","abstr-cases","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-cases;default.default;[t] "case statement with variable number of cases";self::cases;./children/row/children/cell/children/punctuation[@role="ellipsis"]or ./children/line/children/punctuation[@role="ellipsis"]'.split(";"),["Rule","abstr-punctuated","default.default",'[n] content/*[1]; [t] "separated list"; [t] "of length"; [t] count(children/*) - count(content/*)', +"self::punctuated"],["Rule","abstr-punctuated","mathspeak.brief",'[n] content/*[1]; [t] "separated list"',"self::punctuated"],["SpecializedRule","abstr-punctuated","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-punctuated,default.default,[n] content/*[1]; [t] "separated list";[t] "of variable length",self::punctuated,./children/punctuation[@role="ellipsis"]'.split(","),["Rule","abstr-bigop","default.default","[n] content/*[1]","self::bigop"],["Rule","abstr-integral","default.default",'[t] "integral"', +'@role="integral"'],"Rule,abstr-relation,default.default,[t] @role (grammar:localRole);,self::relseq,count(./children/*)=2".split(","),'Rule,abstr-relation-seq,default.default,[t] @role (grammar:localRole); [t] "sequence"; [t] "with"; [t] count(./children/*); [t] "elements",self::relseq,count(./children/*)>2'.split(","),'Rule,abstr-relation-seq,mathspeak.brief,[t] @role (grammar:localRole); [t] "sequence",self::relseq,count(./children/*)>2'.split(","),["SpecializedRule","abstr-relation-seq","mathspeak.brief", +"mathspeak.sbrief"],'Rule,abstr-var-relation,default.default,[t] @role (grammar:localRole); [t] "sequence"; [t] "with variable number of elements",self::relseq,count(./children/*)>2,./children/punctuation[@role="ellipsis"]'.split(","),'UniqueAlias abstr-relation default.default self::multirel @role!="unknown" count(./children/*)>2'.split(" "),'Aliases abstr-var-relation self::multirel @role!="unknown" count(./children/*)>2 ./children/punctuation[@role="ellipsis"]'.split(" "),'Rule,abstr-multirel,default.default,[t] "relation sequence"; [t] "with"; [t] count(./children/*); [t] "elements",self::multirel,count(./children/*)>2'.split(","), +'Rule;abstr-multirel;mathspeak.brief;[t] "relation sequence";self::multirel;count(./children/*)>2'.split(";"),["SpecializedRule","abstr-multirel","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-multirel;default.default;[t] "relation sequence with variable number of elements";self::multirel;count(./children/*)>2;./children/punctuation[@role="ellipsis"]'.split(";"),["Rule","abstr-table","default.default",'[t] "table with"; [t] count(children/*); [t] "rows and";[t] count(children/*[1]/children/*); [t] "columns"', +"self::table"],["Rule","abstr-line","default.default",'[t] "in"; [t] @role (grammar:localRole);',"self::line"],["Rule","abstr-row","default.default",'[t] "in"; [t] @role (grammar:localRole);[t] count(preceding-sibling::..); [t] "with";[t] count(children/*); [t] "columns"',"self::row"],["Rule","abstr-cell","default.default",'[t] "in"; [t] @role (grammar:localRole);',"self::cell"]]};sre.SummarySpanish={locale:"es",modality:"summary",rules:[["Rule","stree","default.default","[n] ./*[1]","self::stree"],'Rule;abstr-identifier;default.default;[t] "identificador largo";self::identifier;contains(@grammar, "collapsed")'.split(";"),["Rule","abstr-identifier","default.default",'[t] "identificador"',"self::identifier"],'Rule;abstr-number;default.default;[t] "n\u00famero largo";self::number;contains(@grammar, "collapsed")'.split(";"),["Rule","abstr-number","default.default",'[t] "n\u00famero"', +"self::number"],'Rule;abstr-mixed-number;default.default;[t] "n\u00famero largo mixto";self::number;@role="mixed";contains(@grammar, "collapsed")'.split(";"),'Rule;abstr-mixed-number;default.default;[t] "n\u00famero mixto";self::number;@role="mixed"'.split(";"),["Rule","abstr-text","default.default",'[t] "texto"',"self::text"],["Rule","abstr-function","default.default",'[t] "expresi\u00f3n funcional"',"self::function"],["Rule","abstr-function","mathspeak.brief",'[t] "funci\u00f3n"',"self::function"], +["SpecializedRule","abstr-function","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-lim;default.default;[t] "funci\u00f3n de l\u00edmite";self::function;@role="limit function"'.split(";"),'Rule;abstr-lim;mathspeak.brief;[t] "l\u00edmite";self::function;@role="limit function"'.split(";"),["SpecializedRule","abstr-lim","mathspeak.brief","mathspeak.sbrief"],["Rule","abstr-fraction","default.default",'[t] "fracci\u00f3n"',"self::fraction"],["Rule","abstr-fraction","mathspeak.brief",'[t] "frac"',"self::fraction"], +["SpecializedRule","abstr-fraction","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-continued-fraction;default.default;[t] "fracci\u00f3n continua";self::fraction;children/*[2]/descendant-or-self::*[@role="ellipsis"]'.split(";"),'Rule;abstr-continued-fraction;mathspeak.brief;[t] "frac continua";self::fraction;children/*[2]/descendant-or-self::*[@role="ellipsis"]'.split(";"),["SpecializedRule","abstr-continued-fraction","mathspeak.brief","mathspeak.sbrief"],["Rule","abstr-sqrt","default.default", +'[t] "ra\u00edz cuadrada"',"self::sqrt"],'Rule;abstr-sqrt-nested;default.default;[t] "ra\u00edz cuadrada anidada";self::sqrt;children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(";"),'Rule{abstr-root{default.default{[t] "ra\u00edz del \u00edndice"; [n] children/*[1] (engine:modality="speech"); [t] "finalizar de \u00edndice"{self::root{contains(@grammar, "collapsed"){following-sibling::* or ancestor::*/following-sibling::*'.split("{"),["Rule","abstr-root","default.default", +'[t] "ra\u00edz del \u00edndice"; [n] children/*[1] (engine:modality=speech)',"self::root"],["Rule","abstr-root","mathspeak.brief",'[t] "ra\u00edz"',"self::root"],["SpecializedRule","abstr-root","mathspeak.brief","mathspeak.sbrief"],'Rule{abstr-root-nested{default.default{[t] "ra\u00edz anidada del \u00edndice"; [n] children/*[1] (engine:modality="speech"); [t] "finalizar de \u00edndice"{self::root{contains(@grammar, "collapsed"){children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root{following-sibling::* or ancestor::*/following-sibling::*'.split("{"), +'Rule,abstr-root-nested,default.default,[t] "ra\u00edz anidada del \u00edndice"; [n] children/*[1] (engine:modality="speech"),self::root,children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(","),'Rule;abstr-root-nested;mathspeak.brief;[t] "ra\u00edz anidada";self::root;children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root'.split(";"),["SpecializedRule","abstr-root-nested","mathspeak.brief","mathspeak.sbrief"],["Rule","abstr-superscript","default.default", +'[t] "potencia"',"self::superscript"],["Rule","abstr-subscript","default.default",'[t] "sub\u00edndice"',"self::subscript"],'Rule;abstr-subsup;default.default;[t] "potencia con sub\u00edndice";self::superscript;name(children/*[1])="subscript"'.split(";"),["Rule","abstr-infixop","default.default",'[t] @role (grammar:localRole); [t] "con"; [t] count(./children/*); [t] "elementos"',"self::infixop"],'Rule,abstr-infixop,default.default,[t] @role (grammar:localRole); [t] "con una cantidad variable de elementos",self::infixop,count(./children/*)>2,./children/punctuation[@role="ellipsis"]'.split(","), +["Rule","abstr-infixop","mathspeak.brief","[t] @role (grammar:localRole)","self::infixop"],["SpecializedRule","abstr-infixop","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-addition,default.default,[t] "suma con"; [t] count(./children/*); [t] "sumandos",self::infixop,@role="addition"'.split(","),'Rule;abstr-addition;mathspeak.brief;[t] "suma";self::infixop;@role="addition"'.split(";"),["SpecializedRule","abstr-addition","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-addition;default.default;[t] "suma con n\u00famero variable de sumandos";self::infixop;@role="addition";count(./children/*)>2;./children/punctuation[@role="ellipsis"]'.split(";"), +'Rule,abstr-multiplication,default.default,[t] "producto con"; [t] count(./children/*); [t] "factores",self::infixop,@role="multiplication"'.split(","),'Rule;abstr-multiplication;mathspeak.brief;[t] "producto";self::infixop;@role="multiplication"'.split(";"),["SpecializedRule","abstr-multiplication","mathspeak.brief","mathspeak.sbrief"],["Aliases","abstr-multiplication","self::infixop",'@role="implicit"'],'Rule;abstr-var-multiplication;default.default;[t] "producto con una cantidad variable de factores";self::infixop;@role="multiplication";count(./children/*)>2;./children/punctuation[@role="ellipsis"]'.split(";"), +'Aliases abstr-var-multiplication self::infixop @role="implicit" count(./children/*)>2 ./children/punctuation[@role="ellipsis"]'.split(" "),["Rule","abstr-vector","default.default",'[t] "vector de dimensi\u00f3n"; [t] count(./children/*)',"self::vector"],["Rule","abstr-vector","mathspeak.brief",'[t] "vector"',"self::vector"],["SpecializedRule","abstr-vector","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-vector;default.default;[t] "vector de dimensi\u00f3n n";self::vector;./children/*/children/punctuation[@role="ellipsis"]'.split(";"), +'Rule;abstr-binomial;default.default;[t] "binomio";self::vector;@role="binomial"'.split(";"),["SpecializedRule","abstr-binomial","default.default","mathspeak.brief"],["SpecializedRule","abstr-binomial","default.default","mathspeak.sbrief"],'Rule,abstr-determinant,default.default,[t] "determinante de dimensi\u00f3n"; [t] count(./children/*),self::matrix,@role="determinant"'.split(","),'Rule;abstr-determinant;mathspeak.brief;[t] "determinante";self::matrix;@role="determinant"'.split(";"),["SpecializedRule", +"abstr-determinant","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-determinant;default.default;[t] "determinante de dimensi\u00f3n n";self::matrix;@role="determinant";./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(";"),'Rule,abstr-squarematrix,default.default,[t] "matriz cuadrada de dimensi\u00f3n"; [t] count(./children/*),self::matrix,@role="squarematrix"'.split(","),'Rule;abstr-squarematrix;mathspeak.brief;[t] "matriz cuadrada";self::matrix;@role="squarematrix"'.split(";"), +["SpecializedRule","abstr-squarematrix","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-rowvector,default.default,[t] "vector fila de dimensi\u00f3n"; [t] count(./children/row/children/*),self::matrix,@role="rowvector"'.split(","),'Rule;abstr-rowvector;mathspeak.brief;[t] "vector fila";self::matrix;@role="rowvector"'.split(";"),["SpecializedRule","abstr-rowvector","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-matrix;default.default;[t] "vector fila de dimensi\u00f3n n";self::matrix;@role="rowvector";./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(";"), +["Rule","abstr-matrix","default.default",'[t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [t] "matriz"',"self::matrix"],["Rule","abstr-matrix","mathspeak.brief",'[t] "matriz"',"self::matrix"],["SpecializedRule","abstr-matrix","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-matrix;default.default;[t] "matriz de dimensi\u00f3n n por m";self::matrix;./children/*/children/*/children/punctuation[@role="ellipsis"]'.split(";"),["Rule","abstr-cases","default.default",'[t] "declaraci\u00f3n de caso";[t] "con"; [t] count(children/*); [t] "casos"', +"self::cases"],["Rule","abstr-cases","mathspeak.brief",'[t] "declaraci\u00f3n de caso"',"self::cases"],["SpecializedRule","abstr-cases","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-cases;default.default;[t] "declaraci\u00f3n de caso con n\u00famero variable de casos";self::cases;./children/row/children/cell/children/punctuation[@role="ellipsis"]or ./children/line/children/punctuation[@role="ellipsis"]'.split(";"),["Rule","abstr-punctuated","default.default",'[t] "lista separada por"; [n] content/*[1]; [t] "de longitud"; [t] count(children/*) - count(content/*)', +"self::punctuated"],["Rule","abstr-punctuated","mathspeak.brief",'[t] "lista separada por"; [n] content/*[1]',"self::punctuated"],["SpecializedRule","abstr-punctuated","mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-punctuated,default.default,[t] "lista separada por"; [n] content/*[1],[t] "de longitud variable",self::punctuated,./children/punctuation[@role="ellipsis"]'.split(","),["Rule","abstr-bigop","default.default","[n] content/*[1]","self::bigop"],["Rule","abstr-integral","default.default", +'[t] "integral"','@role="integral"'],"Rule,abstr-relation,default.default,[t] @role (grammar:localRole);,self::relseq,count(./children/*)=2".split(","),'Rule,abstr-relation-seq,default.default,[t] "secuencia de"; [t] @role (grammar:localRole); [t] "con"; [t] count(./children/*); [t] "elementos",self::relseq,count(./children/*)>2'.split(","),'Rule,abstr-relation-seq,mathspeak.brief,[t] "secuencia de"; [t] @role (grammar:localRole),self::relseq,count(./children/*)>2'.split(","),["SpecializedRule","abstr-relation-seq", +"mathspeak.brief","mathspeak.sbrief"],'Rule,abstr-var-relation,default.default,[t] "secuencia de"; [t] @role (grammar:localRole); [t] "con una cantidad variable de elementos",self::relseq,count(./children/*)>2,./children/punctuation[@role="ellipsis"]'.split(","),'UniqueAlias abstr-relation default.default self::multirel @role!="unknown" count(./children/*)>2'.split(" "),'Aliases abstr-var-relation self::multirel @role!="unknown" count(./children/*)>2 ./children/punctuation[@role="ellipsis"]'.split(" "), +'Rule,abstr-multirel,default.default,[t] "secuencia de relaci\u00f3n"; [t] "con"; [t] count(./children/*); [t] "elementos",self::multirel,count(./children/*)>2'.split(","),'Rule;abstr-multirel;mathspeak.brief;[t] "secuencia de relaci\u00f3n";self::multirel;count(./children/*)>2'.split(";"),["SpecializedRule","abstr-multirel","mathspeak.brief","mathspeak.sbrief"],'Rule;abstr-var-multirel;default.default;[t] "secuencia de relaci\u00f3n con n\u00famero variable de elementos";self::multirel;count(./children/*)>2;./children/punctuation[@role="ellipsis"]'.split(";"), +["Rule","abstr-table","default.default",'[t] "mesa con"; [t] count(children/*); [t] "filas y";[t] count(children/*[1]/children/*); [t] "columnas"',"self::table"],["Rule","abstr-line","default.default",'[t] "en"; [t] @role (grammar:localRole);',"self::line"],["Rule","abstr-row","default.default",'[t] "en"; [t] @role (grammar:localRole);[t] count(preceding-sibling::..); [t] "con";[t] count(children/*); [t] "columnas"',"self::row"],["Rule","abstr-cell","default.default",'[t] "en"; [t] @role (grammar:localRole);', +"self::cell"]]};sre.SpeechRuleStores={}; +sre.SpeechRuleStores.RULE_SETS_={SemanticTreeRules:sre.SemanticTreeRules,MathspeakFrench:sre.MathspeakFrench,MathspeakGerman:sre.MathspeakGerman,MathspeakRules:sre.MathspeakRules,MathspeakSpanish:sre.MathspeakSpanish,NemethRules:sre.NemethRules,ClearspeakFrench:sre.ClearspeakFrench,ClearspeakGerman:sre.ClearspeakGerman,ClearspeakRules:sre.ClearspeakRules,EmacspeakRules:sre.EmacspeakRules,SummaryFrench:sre.SummaryFrench,SummaryGerman:sre.SummaryGerman,SummaryRules:sre.SummaryRules,SummarySpanish:sre.SummarySpanish, +PrefixFrench:sre.PrefixFrench,PrefixGerman:sre.PrefixGerman,PrefixRules:sre.PrefixRules,PrefixSpanish:sre.PrefixSpanish};sre.SpeechRuleStores.availableSets=function(){return Object.keys(sre.SpeechRuleStores.RULE_SETS_)};sre.SpeechRuleStores.getConstructor=function(a){return(a=sre.SpeechRuleStores.RULE_SETS_[a])?a:null};sre.SpeechRuleEngine=function(){this.activeStore_=null;this.cache_={};this.ready_=!0;this.combinedStores_={};this.evaluators_={};this.ruleSets_={};sre.Engine.registerTest(goog.bind(function(a){return this.ready_},this))};goog.addSingletonGetter(sre.SpeechRuleEngine); +sre.SpeechRuleEngine.prototype.parameterize=function(a){for(var b={},c=0,d=a.length;c=g.length&&d.push(g.shift());e=e.concat(g)}b.push(d);e.forEach(function(h){return b.push(h)})}else a.childNodes.forEach(function(h){return sre.ColorGenerator.visitStree_(h, +b,c)})}else c[a.id]||b.push(a.id)};sre.DirectSpeechGenerator=function(){sre.AbstractSpeechGenerator.call(this)};goog.inherits(sre.DirectSpeechGenerator,sre.AbstractSpeechGenerator);sre.DirectSpeechGenerator.prototype.getSpeech=function(a,b){return sre.WalkerUtil.getAttribute(a,this.modality)};sre.DummySpeechGenerator=function(){sre.AbstractSpeechGenerator.call(this)};goog.inherits(sre.DummySpeechGenerator,sre.AbstractSpeechGenerator);sre.DummySpeechGenerator.prototype.getSpeech=function(a,b){return""};sre.TreeSpeechGenerator=function(){sre.AbstractSpeechGenerator.call(this)};goog.inherits(sre.TreeSpeechGenerator,sre.AbstractSpeechGenerator); +sre.TreeSpeechGenerator.prototype.getSpeech=function(a,b){var c=this.generateSpeech(a,b);a.setAttribute(this.modality,c);var d=this.getRebuilt().nodeDict,e;for(e in d){var f=d[e],g=sre.WalkerUtil.getBySemanticId(b,e),h=sre.WalkerUtil.getBySemanticId(a,e);g&&h&&(sre.SpeechGeneratorUtil.addSpeech(h,f,this.modality),this.modality===sre.EnrichMathml.Attribute.SPEECH&&sre.SpeechGeneratorUtil.addPrefix(h,f))}return c};sre.NodeSpeechGenerator=function(){sre.TreeSpeechGenerator.call(this)};goog.inherits(sre.NodeSpeechGenerator,sre.TreeSpeechGenerator);sre.NodeSpeechGenerator.prototype.getSpeech=function(a,b){var c=sre.WalkerUtil.getAttribute(a,this.modality);return c?c:sre.NodeSpeechGenerator.superClass_.getSpeech.call(this,a,b)};sre.SummarySpeechGenerator=function(){sre.AbstractSpeechGenerator.call(this)};goog.inherits(sre.SummarySpeechGenerator,sre.AbstractSpeechGenerator);sre.SummarySpeechGenerator.prototype.getSpeech=function(a,b){sre.SpeechGeneratorUtil.connectAllMactions(b,this.getRebuilt().xml);return this.generateSpeech(a,b)};sre.SpeechGeneratorFactory={};sre.SpeechGeneratorFactory.generator=function(a){return new (sre.SpeechGeneratorFactory.generatorMapping_[a]||sre.SpeechGeneratorFactory.generatorMapping_.Direct)};sre.SpeechGeneratorFactory.generatorMapping_={Adhoc:sre.AdhocSpeechGenerator,Color:sre.ColorGenerator,Direct:sre.DirectSpeechGenerator,Dummy:sre.DummySpeechGenerator,Node:sre.NodeSpeechGenerator,Summary:sre.SummarySpeechGenerator,Tree:sre.TreeSpeechGenerator};sre.EventUtil={};sre.EventUtil.KeyCode={ENTER:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,TAB:9,LESS:188,GREATER:190,DASH:189,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90};sre.EventUtil.Move=function(){var a={},b;for(b in sre.EventUtil.KeyCode)a[sre.EventUtil.KeyCode[b]]=b;return a}(); +sre.EventUtil.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",SELECTSTART:"selectstart",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel"};sre.EventUtil.Event=function(a,b,c){this.src=a;this.type=b;this.callback=c};sre.EventUtil.Event.prototype.add=function(){this.src.addEventListener(this.type,this.callback)}; +sre.EventUtil.Event.prototype.remove=function(){this.src.removeEventListener(this.type,this.callback)};sre.Focus=function(a,b){this.semanticNodes_=a;this.semanticPrimary_=b;this.domNodes_=[];this.domPrimary_=null;this.allNodes_=[]};sre.Focus.prototype.getSemanticPrimary=function(){return this.semanticPrimary_};sre.Focus.prototype.getSemanticNodes=function(){return this.semanticNodes_};sre.Focus.prototype.getNodes=function(){return this.allNodes_};sre.Focus.prototype.getDomNodes=function(){return this.domNodes_};sre.Focus.prototype.getDomPrimary=function(){return this.domPrimary_}; +sre.Focus.prototype.toString=function(){return"Primary:"+this.domPrimary_+" Nodes:"+this.domNodes_};sre.Focus.prototype.clone=function(){var a=new sre.Focus(this.semanticNodes_,this.semanticPrimary_);a.domNodes_=this.domNodes_;a.domPrimary_=this.domPrimary_;a.allNodes_=this.allNodes_;return a}; +sre.Focus.factory=function(a,b,c,d){var e=function(h){return sre.WalkerUtil.getBySemanticId(d,h)},f=c.nodeDict;c=e(a);e=b.map(e);var g=b.map(function(h){return f[h]});a=new sre.Focus(g,f[a]);a.domNodes_=e;a.domPrimary_=c;a.allNodes_=sre.Focus.generateAllVisibleNodes_(b,e,f,d);return a}; +sre.Focus.generateAllVisibleNodes_=function(a,b,c,d){for(var e=function(m){return sre.WalkerUtil.getBySemanticId(d,m)},f=[],g=0,h=a.length;ga||a>=b.length?null:b[a]};sre.Levels.prototype.depth=function(){return this.level_.length};sre.Levels.prototype.clone=function(){var a=new sre.Levels;a.level_=this.level_.slice(0);return a};sre.Levels.prototype.toString=function(){for(var a="",b=0,c;c=this.level_[b];b++)a+="\n"+c.map(function(d){return d.toString()});return a};sre.Walker=function(){};sre.Walker.prototype.isActive=function(){};sre.Walker.prototype.activate=function(){};sre.Walker.prototype.deactivate=function(){};sre.Walker.prototype.speech=function(){};sre.Walker.prototype.getXml=function(){};sre.Walker.prototype.getRebuilt=function(){};sre.Walker.prototype.getFocus=function(a){};sre.Walker.prototype.setFocus=function(a){};sre.Walker.prototype.getDepth=function(){};sre.Walker.prototype.move=function(a){};sre.Walker.prototype.update=function(a){}; +sre.Walker.move={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",REPEAT:"repeat",DEPTH:"depth",ENTER:"enter",EXPAND:"expand",HOME:"home",SUMMARY:"summary",DETAIL:"detail",ROW:"row",CELL:"cell"};sre.Walker.STATE_={};sre.Walker.resetState=function(a){delete sre.Walker.STATE_[a]};sre.Walker.setState=function(a,b){sre.Walker.STATE_[a]=b};sre.Walker.getState=function(a){return sre.Walker.STATE_[a]};sre.AbstractWalker=function(a,b,c,d){this.node=a;this.node.id?this.id=this.node.id:this.node.hasAttribute(sre.AbstractWalker.SRE_ID_ATTR)?this.id=this.node.getAttribute(sre.AbstractWalker.SRE_ID_ATTR):(this.node.setAttribute(sre.AbstractWalker.SRE_ID_ATTR,sre.AbstractWalker.ID_COUNTER),this.id=sre.AbstractWalker.ID_COUNTER++);this.generator=b;this.highlighter=c;this.rootNode=sre.WalkerUtil.getSemanticRoot(a);this.rootId=this.rootNode.getAttribute(sre.EnrichMathml.Attribute.ID);this.xmlString_=d;this.focus_= +this.rebuilt_=this.xml_=null;this.keyMapping={};this.keyMapping[sre.EventUtil.KeyCode.UP]=goog.bind(this.up,this);this.keyMapping[sre.EventUtil.KeyCode.DOWN]=goog.bind(this.down,this);this.keyMapping[sre.EventUtil.KeyCode.RIGHT]=goog.bind(this.right,this);this.keyMapping[sre.EventUtil.KeyCode.LEFT]=goog.bind(this.left,this);this.keyMapping[sre.EventUtil.KeyCode.TAB]=goog.bind(this.repeat,this);this.keyMapping[sre.EventUtil.KeyCode.DASH]=goog.bind(this.expand,this);this.keyMapping[sre.EventUtil.KeyCode.SPACE]= +goog.bind(this.depth,this);this.keyMapping[sre.EventUtil.KeyCode.HOME]=goog.bind(this.home,this);this.keyMapping[sre.EventUtil.KeyCode.X]=goog.bind(this.summary,this);this.keyMapping[sre.EventUtil.KeyCode.Z]=goog.bind(this.detail,this);this.keyMapping[sre.EventUtil.KeyCode.V]=goog.bind(this.virtualize,this);this.keyMapping[sre.EventUtil.KeyCode.P]=goog.bind(this.previous,this);this.keyMapping[sre.EventUtil.KeyCode.U]=goog.bind(this.undo,this);this.keyMapping[sre.EventUtil.KeyCode.LESS]=goog.bind(this.previousRules, +this);this.keyMapping[sre.EventUtil.KeyCode.GREATER]=goog.bind(this.nextRules,this);this.active_=!1;this.moved=sre.Walker.move.ENTER;this.cursors=[]};sre.AbstractWalker.prototype.getXml=function(){this.xml_||(this.xml_=sre.DomUtil.parseInput(this.xmlString_));return this.xml_};sre.AbstractWalker.prototype.getRebuilt=function(){this.rebuilt_||(this.rebuilt_=this.rebuildStree());return this.rebuilt_};sre.AbstractWalker.ID_COUNTER=0;sre.AbstractWalker.SRE_ID_ATTR="sre-explorer-id"; +sre.AbstractWalker.prototype.isActive=function(){return this.active_};sre.AbstractWalker.prototype.toggleActive_=function(){this.active_=!this.active_};sre.AbstractWalker.prototype.activate=function(){this.isActive()||(this.generator.start(),this.toggleActive_())};sre.AbstractWalker.prototype.deactivate=function(){this.isActive()&&(sre.Walker.setState(this.id,this.primaryId()),this.generator.end(),this.toggleActive_())}; +sre.AbstractWalker.prototype.getFocus=function(a){this.focus_||(this.focus_=sre.Focus.factory(this.rootId,[this.rootId],this.getRebuilt(),this.node));a&&this.updateFocus();return this.focus_};sre.AbstractWalker.prototype.setFocus=function(a){this.focus_=a};sre.AbstractWalker.prototype.getDepth=function(){return this.levels.depth()-1};sre.AbstractWalker.prototype.isSpeech=function(){return this.generator.modality===sre.EnrichMathml.Attribute.SPEECH}; +sre.AbstractWalker.prototype.speech=function(){var a=this.getFocus().getDomNodes();if(!a.length)return"";var b=this.specialMove();if(null!==b)return b;switch(this.moved){case sre.Walker.move.DEPTH:return this.depth_();case sre.Walker.move.SUMMARY:return this.summary_();case sre.Walker.move.DETAIL:return this.detail_();default:b=[];for(var c=this.getFocus().getSemanticNodes(),d=0,e=a.length;d=a.length-1?a[0]:a[c+1]}if("clearspeak"===a){var d=sre.ClearspeakPreferences.getLocalePreferences().en;if(!d)return"default";a=sre.ClearspeakPreferences.relevantPreferences(this.getFocus().getSemanticPrimary());c=sre.ClearspeakPreferences.findPreference(b,a);d=d[a].map(function(e){return e.split("_")[1]});c=d.indexOf(c);return-1===c?b:sre.ClearspeakPreferences.addPreference(b, +a,c>=d.length-1?d[0]:d[c+1])}return b};sre.AbstractWalker.prototype.previousRules=function(){var a=this.generator.getOptions();if("speech"!==a.modality)return this.getFocus();a.style=this.nextStyle(a.domain,a.style);this.update(a);this.moved=sre.Walker.move.REPEAT;return this.getFocus().clone()};sre.DummyWalker=function(a,b,c,d){sre.AbstractWalker.call(this,a,b,c,d)};goog.inherits(sre.DummyWalker,sre.AbstractWalker);sre.DummyWalker.prototype.up=function(){};sre.DummyWalker.prototype.down=function(){};sre.DummyWalker.prototype.left=function(){};sre.DummyWalker.prototype.right=function(){};sre.DummyWalker.prototype.repeat=function(){};sre.DummyWalker.prototype.depth=function(){};sre.DummyWalker.prototype.home=function(){};sre.DummyWalker.prototype.getDepth=function(){return 0}; +sre.DummyWalker.prototype.initLevels=function(){};sre.SemanticWalker=function(a,b,c,d){sre.AbstractWalker.call(this,a,b,c,d);this.levels=null;this.restoreState()};goog.inherits(sre.SemanticWalker,sre.AbstractWalker);sre.SemanticWalker.prototype.initLevels=function(){var a=new sre.Levels;a.push([this.getFocus()]);return a}; +sre.SemanticWalker.prototype.up=function(){sre.SemanticWalker.superClass_.up.call(this);var a=this.previousLevel();if(!a)return null;this.levels.pop();return this.levels.find(function(b){return b.getSemanticNodes().some(function(c){return c.id.toString()===a})})};sre.SemanticWalker.prototype.down=function(){sre.SemanticWalker.superClass_.down.call(this);var a=this.nextLevel();if(0===a.length)return null;this.levels.push(a);return a[0]}; +sre.SemanticWalker.prototype.combineContentChildren=function(a,b,c,d){switch(a){case sre.SemanticAttr.Type.RELSEQ:case sre.SemanticAttr.Type.INFIXOP:case sre.SemanticAttr.Type.MULTIREL:return this.makePairList(d,c);case sre.SemanticAttr.Type.PREFIXOP:return[this.focusFromId(d[0],c.concat(d))];case sre.SemanticAttr.Type.POSTFIXOP:return[this.focusFromId(d[0],d.concat(c))];case sre.SemanticAttr.Type.MATRIX:case sre.SemanticAttr.Type.VECTOR:case sre.SemanticAttr.Type.FENCED:return[this.focusFromId(d[0], +[c[0],d[0],c[1]])];case sre.SemanticAttr.Type.CASES:return[this.focusFromId(d[0],[c[0],d[0]])];case sre.SemanticAttr.Type.PUNCTUATED:return b===sre.SemanticAttr.Role.TEXT?d.map(goog.bind(this.singletonFocus,this)):d.length===c.length?c.map(goog.bind(this.singletonFocus,this)):this.combinePunctuations(d,c,[],[]);case sre.SemanticAttr.Type.APPL:return[this.focusFromId(d[0],[d[0],c[0]]),this.singletonFocus(d[1])];case sre.SemanticAttr.Type.ROOT:return[this.singletonFocus(d[1]),this.singletonFocus(d[0])]; +default:return d.map(goog.bind(this.singletonFocus,this))}};sre.SemanticWalker.prototype.combinePunctuations=function(a,b,c,d){if(0===a.length)return d;var e=a.shift(),f=b.shift();if(e===f)return c.push(f),this.combinePunctuations(a,b,c,d);b.unshift(f);c.push(e);if(a.length===b.length)return d.push(this.focusFromId(e,c.concat(b))),d;d.push(this.focusFromId(e,c));return this.combinePunctuations(a,b,[],d)}; +sre.SemanticWalker.prototype.makePairList=function(a,b){if(0===a.length)return[];if(1===a.length)return[this.singletonFocus(a[0])];for(var c=[this.singletonFocus(a.shift())],d=0,e=a.length;dthis.currentTable_.childNodes.length)return this.getFocus();this.row_=a;this.moved=sre.Walker.move.ROW;return this.getFocus().clone()}; +sre.TableWalker.prototype.jumpCell_=function(a,b){this.firstJump?this.virtualize(!1):(this.firstJump=this.getFocus(),this.virtualize(!0));var c=this.currentTable_.id.toString();do var d=this.levels.pop();while(-1===d.indexOf(c));this.levels.push(d);this.setFocus(this.singletonFocus(c));this.levels.push(this.nextLevel());a=this.currentTable_.childNodes[a-1];this.setFocus(this.singletonFocus(a.id.toString()));this.levels.push(this.nextLevel());return this.singletonFocus(a.childNodes[b-1].id.toString())}; +sre.TableWalker.prototype.isLegalJump_=function(a,b){var c=sre.DomUtil.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",this.currentTable_.id.toString())[0];if(!c||c.hasAttribute("alternative"))return!1;a=this.currentTable_.childNodes[a-1];if(!a)return!1;c=sre.DomUtil.querySelectorAllByAttrValue(c,"id",a.id.toString())[0];return!c||c.hasAttribute("alternative")?!1:!(!a||!a.childNodes[b-1])}; +sre.TableWalker.prototype.isInTable_=function(){for(var a=this.getFocus().getSemanticPrimary();a;){if(-1!==sre.TableWalker.ELIGIBLE_TABLE_TYPES.indexOf(a.type))return this.currentTable_=a,!0;a=a.parent}return!1};sre.TableWalker.prototype.undo=function(){var a=sre.TableWalker.superClass_.undo.call(this);a===this.firstJump&&(this.firstJump=null);return a};sre.WalkerFactory={};sre.WalkerFactory.walker=function(a,b,c,d,e){return new (sre.WalkerFactory.walkerMapping_[a.toLowerCase()]||sre.WalkerFactory.walkerMapping_.dummy)(b,c,d,e)};sre.WalkerFactory.walkerMapping_={dummy:sre.DummyWalker,semantic:sre.SemanticWalker,syntax:sre.SyntaxWalker,table:sre.TableWalker};sre.ProcessorFactory={};sre.ProcessorFactory.PROCESSORS_={};sre.ProcessorFactory.get_=function(a){var b=sre.ProcessorFactory.PROCESSORS_[a.toLowerCase()];if(!b)throw new sre.Engine.Error("Unknown processor "+a);return b};sre.ProcessorFactory.process=function(a,b){return sre.ProcessorFactory.get_(a).processor(b)};sre.ProcessorFactory.print=function(a,b){a=sre.ProcessorFactory.get_(a);return sre.Engine.getInstance().pprint?a.pprint(b):a.print(b)}; +sre.ProcessorFactory.output=function(a,b){a=sre.ProcessorFactory.get_(a);b=a.processor(b);return sre.Engine.getInstance().pprint?a.pprint(b):a.print(b)};sre.ProcessorFactory.keypress=function(a,b){a=sre.ProcessorFactory.get_(a);b=a.key?a.key(b):b;b=a.processor(b);return sre.Engine.getInstance().pprint?a.pprint(b):a.print(b)}; +sre.Processor=function(a,b){this.name=a;this.processor=b.processor;this.print=b.print||sre.Processor.stringify_;this.pprint=b.pprint||this.print;sre.ProcessorFactory.PROCESSORS_[this.name]=this};sre.KeyProcessor=function(a,b){sre.Processor.call(this,a,b);this.key=b.key||sre.KeyProcessor.getKey_};goog.inherits(sre.KeyProcessor,sre.Processor);sre.KeyProcessor.getKey_=function(a){return"string"===typeof a?sre.EventUtil.KeyCode[a.toUpperCase()]:a}; +sre.Processor.LocalState_={walker:null,speechGenerator:null,highlighter:null};sre.Processor.stringify_=function(a){return a?a.toString():a};new sre.Processor("semantic",{processor:function(a){a=sre.DomUtil.parseInput(a);return sre.Semantic.xmlTree(a)},pprint:function(a){return sre.DomUtil.formatXml(a.toString())}}); +new sre.Processor("speech",{processor:function(a){a=sre.DomUtil.parseInput(a);a=sre.Semantic.xmlTree(a);a=sre.SpeechGeneratorUtil.computeSpeech(a);var b=sre.AuralRendering.getInstance();return b.finalize(b.markup(a))},pprint:function(a){a=a.toString();return sre.AuralRendering.ofType(sre.XmlRenderer)?sre.DomUtil.formatXml(a):a}}); +new sre.Processor("json",{processor:function(a){a=sre.DomUtil.parseInput(a,sre.Engine.Error);return sre.Semantic.getTree(a).toJson()},print:function(a){return JSON.stringify(a)},pprint:function(a){return JSON.stringify(a,null,2)}});new sre.Processor("description",{processor:function(a){a=sre.DomUtil.parseInput(a);a=sre.Semantic.xmlTree(a);return sre.SpeechGeneratorUtil.computeSpeech(a)},print:function(a){return JSON.stringify(a)},pprint:function(a){return JSON.stringify(a,null,2)}}); +new sre.Processor("enriched",{processor:function(a){a=sre.Enrich.semanticMathmlSync(a);var b=sre.WalkerUtil.getSemanticRoot(a);switch(sre.Engine.getInstance().speech){case sre.Engine.Speech.SHALLOW:var c=sre.SpeechGeneratorFactory.generator("Adhoc");c.getSpeech(b,a);break;case sre.Engine.Speech.DEEP:c=sre.SpeechGeneratorFactory.generator("Tree"),c.getSpeech(b,a)}return a},pprint:function(a){return sre.DomUtil.formatXml(a.toString())}}); +new sre.Processor("walker",{processor:function(a){var b=sre.SpeechGeneratorFactory.generator("Node");sre.Processor.LocalState_.speechGenerator=b;sre.Processor.LocalState_.highlighter=sre.HighlighterFactory.highlighter({color:"black"},{color:"white"},{renderer:"NativeMML"});a=sre.ProcessorFactory.process("enriched",a);var c=sre.ProcessorFactory.print("enriched",a);sre.Processor.LocalState_.walker=sre.WalkerFactory.walker(sre.Engine.getInstance().walker,a,b,sre.Processor.LocalState_.highlighter,c); +return sre.Processor.LocalState_.walker},print:function(a){return sre.Processor.LocalState_.walker.speech()}});new sre.KeyProcessor("move",{processor:function(a){return sre.Processor.LocalState_.walker?!1===sre.Processor.LocalState_.walker.move(a)?sre.AuralRendering.getInstance().error(a):sre.Processor.LocalState_.walker.speech():null}});sre.System=function(){this.version=sre.Variables.VERSION};goog.addSingletonGetter(sre.System); +sre.System.prototype.setupEngine=function(a){var b=sre.Engine.getInstance(),c=function(d){b[d]=a[d]||b[d]};c("mode");sre.System.prototype.configBlocks_(a);sre.Engine.BINARY_FEATURES.forEach(function(d){"undefined"!==typeof a[d]&&(b[d]=!!a[d])});sre.Engine.STRING_FEATURES.forEach(c);a.json&&(sre.SystemExternal.jsonPath=sre.BaseUtil.makePath(a.json));a.xpath&&(sre.SystemExternal.WGXpath=a.xpath);b.setupBrowsers();b.ruleSets=a.rules?a.rules:sre.SpeechRuleStores.availableSets();sre.SpeechRuleEngine.getInstance().parameterize(b.ruleSets); +b.setDynamicCstr();sre.L10n.setLocale()};sre.System.prototype.configBlocks_=function(a){if(!sre.Engine.getInstance().config&&sre.Engine.getInstance().mode===sre.Engine.Mode.HTTP){sre.Engine.getInstance().config=!0;for(var b=document.documentElement.querySelectorAll('script[type="text/x-sre-config"]'),c=0,d=b.length;c= 0; i--) { + var dependent = this.dependents[i]; + if (dependent.Disable) dependent.Disable(false,menu); + } + if (update) MathJax.Hub.Queue(["Reprocess",MathJax.Hub]); + }, + + // + // Register a dependent + // + Dependent: function (extension) { + this.dependents.push(extension); + } +}; + +(function () { + // + // Set up the a11y path,if it isn't already in place + // + var PATH = MathJax.Ajax.config.path; + if (!PATH.a11y) PATH.a11y = HUB.config.root + "/extensions/a11y"; + + // + // Load SRE and use the signal to tell MathJax when it is loaded. + // Since SRE waits for the mml element jax, load that too. + // + if (!PATH.SRE) PATH.SRE = MathJax.Ajax.fileURL(PATH.a11y); + MathJax.Ajax.Load("[SRE]/mathjax-sre.js"); + MathJax.Hub.Register.StartupHook("Sre Ready",["loadComplete",MathJax.Ajax,"[SRE]/mathjax-sre.js"]); +})(); + +// +// Make a queue so that the MathML jax and SRE are both loaded before +// we install the filter and signal that we are ready. The MathML config.js +// file must load before loading its jax.js file. +// +MathJax.Callback.Queue( + // + // Load mml jax + // + ["Require",MathJax.Ajax,"[MathJax]/jax/element/mml/jax.js"], + // + // Load MathML input jax (since we need Parse.MakeMML) + // + ["Require",MathJax.Ajax,"[MathJax]/jax/input/MathML/config.js"], + ["Require",MathJax.Ajax,"[MathJax]/jax/input/MathML/jax.js"], + // + // Load toMathML extension (if it isn't already) + // + ["Require",MathJax.Ajax,"[MathJax]/extensions/toMathML.js"], + // + // Wait for SRE (which waits for mml jax) before modifying mbase + // + MathJax.Hub.Register.StartupHook("Sre Ready",function () { + var MML = MathJax.ElementJax.mml, + ENRICH = MathJax.Extension["semantic-enrich"]; + + // + // Override toMathML's attribute function to include additional + // attributes inherited from mstyle (so SRE doesn't have to look them + // up itself). Eventually, this should be moved to toMathML.js directly. + // + MML.mbase.Augment({ + toMathMLattributes: function () { + var defaults = (this.type === "mstyle" ? MML.math.prototype.defaults : this.defaults); + var names = (this.attrNames||MML.copyAttributeNames), + skip = MML.skipAttributes, copy = MML.copyAttributes, + lookup = (ENRICH.running ? ENRICH.mstyleLookup[this.type]||[] : []); + var attr = [], ATTR = (this.attr||{}); + + if (this.type === "math" && (!this.attr || !('xmlns' in this.attr))) + attr.push('xmlns="http://www.w3.org/1998/Math/MathML"'); + if (!this.attrNames) { + for (var id in defaults) {if (!skip[id] && !copy[id] && defaults.hasOwnProperty(id)) { + if (this[id] != null && this[id] !== defaults[id]) { + if (this.Get(id,null,1) !== this[id]) this.toMathMLaddAttr(attr,id,this[id]); + } + }} + } + for (var i = 0, m = names.length; i < m; i++) { + if (copy[names[i]] === 1 && !defaults.hasOwnProperty(names[i])) continue; + value = ATTR[names[i]]; if (value == null) value = this[names[i]]; + if (value != null) this.toMathMLaddAttr(attr,names[i],value); + } + for (i = 0, m = lookup.length; i < m; i++) { + id = lookup[i]; + if (defaults.hasOwnProperty(id) && !attr["_"+id]) { + value = this.Get(id,1); + if (value != null) this.toMathMLaddAttr(attr,id,value); + } + } + this.toMathMLclass(attr); + if (attr.length) return " "+attr.join(" "); else return ""; + }, + toMathMLaddAttr: function (attr,id,value) { + attr.push(id+'="'+this.toMathMLquote(value)+'"'); + attr["_"+id] = 1; + } + }); + + // + // Adjust setTeXclass for so that added elements don't + // cause unwanted space. + // + var TEXCLASS = MML.mo.prototype.setTeXclass; + MML.mo.Augment({ + setTeXclass: function (prev) { + var values = this.getValues("form","lspace","rspace"); // sets useMMLspacing + if (this.useMMLspacing) { + this.texClass = MML.TEXCLASS.NONE; + return this; + } + if (this.attr && this.attr["data-semantic-added"]) { + this.texClass = this.prevClass = MML.TEXCLASS.NONE; + return prev; + } + return TEXCLASS.apply(this,arguments); + } + }); + }), + function () { + // + // Install enrichment filter, and signal that we are ready. + // + MathJax.Hub.postInputHooks.Add(["Filter",MathJax.Extension["semantic-enrich"]],50); + MathJax.Hub.Startup.signal.Post("Semantic Enrich Ready"); + MathJax.Ajax.loadComplete("[a11y]/semantic-enrich.js"); + } +); + + +// @license-end diff --git a/js/mathjax/extensions/a11y/wgxpath.install.js b/js/mathjax/extensions/a11y/wgxpath.install.js new file mode 100644 index 0000000..a983680 --- /dev/null +++ b/js/mathjax/extensions/a11y/wgxpath.install.js @@ -0,0 +1,77 @@ +(function(){'use strict';var k=this; +function aa(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function l(a){return"string"==typeof a}function ba(a,b,c){return a.call.apply(a.bind,arguments)}function ca(a,b,c){if(!a)throw Error();if(2b?1:0};var ha=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(l(a))return l(b)&&1==b.length?a.indexOf(b,c):-1;for(;cc?null:l(a)?a.charAt(c):a[c]}function la(a){return Array.prototype.concat.apply(Array.prototype,arguments)}function ma(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};var u;a:{var na=k.navigator;if(na){var oa=na.userAgent;if(oa){u=oa;break a}}u=""};var pa=q(u,"Opera")||q(u,"OPR"),v=q(u,"Trident")||q(u,"MSIE"),qa=q(u,"Edge"),ra=q(u,"Gecko")&&!(q(u.toLowerCase(),"webkit")&&!q(u,"Edge"))&&!(q(u,"Trident")||q(u,"MSIE"))&&!q(u,"Edge"),sa=q(u.toLowerCase(),"webkit")&&!q(u,"Edge");function ta(){var a=k.document;return a?a.documentMode:void 0}var ua; +a:{var va="",wa=function(){var a=u;if(ra)return/rv\:([^\);]+)(\)|;)/.exec(a);if(qa)return/Edge\/([\d\.]+)/.exec(a);if(v)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(sa)return/WebKit\/(\S+)/.exec(a);if(pa)return/(?:Version)[ \/]?(\S+)/.exec(a)}();wa&&(va=wa?wa[1]:"");if(v){var xa=ta();if(null!=xa&&xa>parseFloat(va)){ua=String(xa);break a}}ua=va}var ya={}; +function za(a){if(!ya[a]){for(var b=0,c=fa(String(ua)).split("."),d=fa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f",4,2,function(a,b,c){return O(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return O(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return O(function(a,b){return a>=b},a,b,c)});var Wa=P("=",3,2,function(a,b,c){return O(function(a,b){return a==b},a,b,c,!0)});P("!=",3,2,function(a,b,c){return O(function(a,b){return a!=b},a,b,c,!0)});P("and",2,2,function(a,b,c){return M(a,c)&&M(b,c)});P("or",1,2,function(a,b,c){return M(a,c)||M(b,c)});function Q(a,b,c){this.a=a;this.b=b||1;this.f=c||1};function Za(a,b){if(b.a.length&&4!=a.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");n.call(this,a.i);this.c=a;this.h=b;this.g=a.g;this.b=a.b}m(Za);Za.prototype.a=function(a){a=this.c.a(a);return $a(this.h,a)};Za.prototype.toString=function(){var a;a="Filter:"+J(this.c);return a+=J(this.h)};function ab(a,b){if(b.lengtha.v)throw Error("Function "+a.j+" expects at most "+a.v+" arguments, "+b.length+" given");a.B&&r(b,function(b,d){if(4!=b.i)throw Error("Argument "+d+" to function "+a.j+" is not of type Nodeset: "+b);});n.call(this,a.i);this.h=a;this.c=b;Ua(this,a.g||ja(b,function(a){return a.g}));Va(this,a.D&&!b.length||a.C&&!!b.length||ja(b,function(a){return a.b}))}m(ab); +ab.prototype.a=function(a){return this.h.m.apply(null,la(a,this.c))};ab.prototype.toString=function(){var a="Function: "+this.h;if(this.c.length)var b=t(this.c,function(a,b){return a+J(b)},"Arguments:"),a=a+J(b);return a};function bb(a,b,c,d,e,f,g,h,p){this.j=a;this.i=b;this.g=c;this.D=d;this.C=e;this.m=f;this.A=g;this.v=void 0!==h?h:g;this.B=!!p}bb.prototype.toString=function(){return this.j};var cb={}; +function R(a,b,c,d,e,f,g,h){if(cb.hasOwnProperty(a))throw Error("Function already created: "+a+".");cb[a]=new bb(a,b,c,d,!1,e,f,g,h)}R("boolean",2,!1,!1,function(a,b){return M(b,a)},1);R("ceiling",1,!1,!1,function(a,b){return Math.ceil(K(b,a))},1);R("concat",3,!1,!1,function(a,b){return t(ma(arguments,1),function(b,d){return b+L(d,a)},"")},2,null);R("contains",2,!1,!1,function(a,b,c){return q(L(b,a),L(c,a))},2);R("count",1,!1,!1,function(a,b){return b.a(a).l},1,1,!0); +R("false",2,!1,!1,function(){return!1},0);R("floor",1,!1,!1,function(a,b){return Math.floor(K(b,a))},1);R("id",4,!1,!1,function(a,b){function c(a){if(w){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ka(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),f=[];r(d,function(a){a=c(a);!a||0<=ha(f,a)||f.push(a)});f.sort(La);var g=new C;r(f,function(a){F(g,a)});return g},1); +R("lang",2,!1,!1,function(){return!1},1);R("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0);R("local-name",3,!1,!0,function(a,b){var c=b?Ra(b.a(a)):a.a;return c?c.localName||c.nodeName.toLowerCase():""},0,1,!0);R("name",3,!1,!0,function(a,b){var c=b?Ra(b.a(a)):a.a;return c?c.nodeName.toLowerCase():""},0,1,!0);R("namespace-uri",3,!0,!1,function(){return""},0,1,!0); +R("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):z(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);R("not",2,!1,!1,function(a,b){return!M(b,a)},1);R("number",1,!1,!0,function(a,b){return b?K(b,a):+z(a.a)},0,1);R("position",1,!0,!1,function(a){return a.b},0);R("round",1,!1,!1,function(a,b){return Math.round(K(b,a))},1);R("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,!1,!0,function(a,b){return b?L(b,a):z(a.a)},0,1); +R("string-length",1,!1,!0,function(a,b){return(b?L(b,a):z(a.a)).length},0,1);R("substring",3,!1,!1,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);R("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +R("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,!1,!1,function(a,b){for(var c=H(b.a(a)),d=0,e=I(c);e;e=I(c))d+=+z(e);return d},1,1,!0);R("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(d,a);a={};for(d=0;d]=|\s+|./g,hb=/^\s/;function S(a,b){return a.b[a.a+(b||0)]}function T(a){return a.b[a.a++]}function ib(a){return a.b.length<=a.a};function jb(a){n.call(this,3);this.c=a.substring(1,a.length-1)}m(jb);jb.prototype.a=function(){return this.c};jb.prototype.toString=function(){return"Literal: "+this.c};function E(a,b){this.j=a.toLowerCase();var c;c="*"==this.j?"*":"http://www.w3.org/1999/xhtml";this.c=b?b.toLowerCase():c}E.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=void 0!==a.localName?a.localName:a.nodeName;return"*"!=this.j&&this.j!=b.toLowerCase()?!1:"*"==this.c?!0:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};E.prototype.f=function(){return this.j}; +E.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.j};function kb(a,b){n.call(this,a.i);this.h=a;this.c=b;this.g=a.g;this.b=a.b;if(1==this.c.length){var c=this.c[0];c.u||c.c!=lb||(c=c.o,"*"!=c.f()&&(this.f={name:c.f(),s:null}))}}m(kb);function mb(){n.call(this,4)}m(mb);mb.prototype.a=function(a){var b=new C;a=a.a;9==a.nodeType?F(b,a):F(b,a.ownerDocument);return b};mb.prototype.toString=function(){return"Root Helper Expression"};function nb(){n.call(this,4)}m(nb);nb.prototype.a=function(a){var b=new C;F(b,a.a);return b};nb.prototype.toString=function(){return"Context Helper Expression"}; +function ob(a){return"/"==a||"//"==a}kb.prototype.a=function(a){var b=this.h.a(a);if(!(b instanceof C))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;ca.length)throw Error("Unclosed literal string");return new jb(a)} +function Hb(a){var b,c=[],d;if(ob(S(a.a))){b=T(a.a);d=S(a.a);if("/"==b&&(ib(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new mb;d=new mb;W(a,"Missing next location step.");b=Ib(a,b);c.push(b)}else{a:{b=S(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":T(a.a);b=Cb(a);W(a,'unclosed "("');Eb(a,")");break;case '"':case "'":b=Gb(a);break;default:if(isNaN(+b))if(!db(b)&&/(?![0-9])[\w]/.test(d)&&"("==S(a.a,1)){b=T(a.a); +b=cb[b]||null;T(a.a);for(d=[];")"!=S(a.a);){W(a,"Missing function argument list.");d.push(Cb(a));if(","!=S(a.a))break;T(a.a)}W(a,"Unclosed function argument list.");Fb(a);b=new ab(b,d)}else{b=null;break a}else b=new Ab(+T(a.a))}"["==S(a.a)&&(d=new sb(Jb(a)),b=new Za(b,d))}if(b)if(ob(S(a.a)))d=b;else return b;else b=Ib(a,"/"),d=new nb,c.push(b)}for(;ob(S(a.a));)b=T(a.a),W(a,"Missing next location step."),b=Ib(a,b),c.push(b);return new kb(d,c)} +function Ib(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==S(a.a))return d=new U(yb,new G("node")),T(a.a),d;if(".."==S(a.a))return d=new U(xb,new G("node")),T(a.a),d;var f;if("@"==S(a.a))f=lb,T(a.a),W(a,"Missing attribute name");else if("::"==S(a.a,1)){if(!/(?![0-9])[\w]/.test(S(a.a).charAt(0)))throw Error("Bad token: "+T(a.a));c=T(a.a);f=wb[c]||null;if(!f)throw Error("No axis with name: "+c);T(a.a);W(a,"Missing node name")}else f=tb;c=S(a.a);if(/(?![0-9])[\w\*]/.test(c.charAt(0)))if("("== +S(a.a,1)){if(!db(c))throw Error("Invalid node type: "+c);c=T(a.a);if(!db(c))throw Error("Invalid type name: "+c);Eb(a,"(");W(a,"Bad nodetype");e=S(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Gb(a);W(a,"Bad nodetype");Fb(a);c=new G(c,g)}else if(c=T(a.a),e=c.indexOf(":"),-1==e)c=new E(c);else{var g=c.substring(0,e),h;if("*"==g)h="*";else if(h=a.b(g),!h)throw Error("Namespace prefix not declared: "+g);c=c.substr(e+1);c=new E(c,h)}else throw Error("Bad token: "+T(a.a));e=new sb(Jb(a),f.a);return d|| +new U(f,c,e,"//"==b)}function Jb(a){for(var b=[];"["==S(a.a);){T(a.a);W(a,"Missing predicate expression.");var c=Cb(a);b.push(c);W(a,"Unclosed predicate expression.");Eb(a,"]")}return b}function Db(a){if("-"==S(a.a))return T(a.a),new zb(Db(a));var b=Hb(a);if("|"!=S(a.a))a=b;else{for(b=[b];"|"==T(a.a);)W(a,"Missing next union location path."),b.push(Hb(a));a.a.a--;a=new rb(b)}return a};function Kb(a){switch(a.nodeType){case 1:return ea(Lb,a);case 9:return Kb(a.documentElement);case 11:case 10:case 6:case 12:return Mb;default:return a.parentNode?Kb(a.parentNode):Mb}}function Mb(){return null}function Lb(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?Lb(a.parentNode,b):null};function Nb(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=fb(a);if(ib(c))throw Error("Invalid XPath expression.");b?"function"==aa(b)||(b=da(b.lookupNamespaceURI,b)):b=function(){return null};var d=Cb(new Bb(c,b));if(!ib(c))throw Error("Bad token: "+T(c));this.evaluate=function(a,b){var c=d.a(new Q(a));return new Y(c,b)}} +function Y(a,b){if(0==b)if(a instanceof C)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof C))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof C?Sa(a):""+a;break;case 1:this.numberValue=a instanceof C?+Sa(a):+a;break;case 3:this.booleanValue=a instanceof C?0=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=c.length|| +0>a?null:c[a]}}Y.ANY_TYPE=0;Y.NUMBER_TYPE=1;Y.STRING_TYPE=2;Y.BOOLEAN_TYPE=3;Y.UNORDERED_NODE_ITERATOR_TYPE=4;Y.ORDERED_NODE_ITERATOR_TYPE=5;Y.UNORDERED_NODE_SNAPSHOT_TYPE=6;Y.ORDERED_NODE_SNAPSHOT_TYPE=7;Y.ANY_UNORDERED_NODE_TYPE=8;Y.FIRST_ORDERED_NODE_TYPE=9;function Ob(a){this.lookupNamespaceURI=Kb(a)} +function Pb(a,b){var c=a||k,d=c.Document&&c.Document.prototype||c.document;if(!d.evaluate||b)c.XPathResult=Y,d.evaluate=function(a,b,c,d){return(new Nb(a,c)).evaluate(b,d)},d.createExpression=function(a,b){return new Nb(a,b)},d.createNSResolver=function(a){return new Ob(a)}}var Qb=["wgxpath","install"],Z=k;Qb[0]in Z||!Z.execScript||Z.execScript("var "+Qb[0]);for(var Rb;Qb.length&&(Rb=Qb.shift());)Qb.length||void 0===Pb?Z[Rb]?Z=Z[Rb]:Z=Z[Rb]={}:Z[Rb]=Pb;}).call(this) -- cgit v1.2.3