/* * /MathJax/extensions/TeX/begingroup.js * * Copyright (c) 2009-2013 The MathJax Consortium * * Part of the MathJax library. * See http://www.mathjax.org for details. * * Licensed under the Apache License, Version 2.0; * you may not use this file except in compliance with the License. * * http://www.apache.org/licenses/LICENSE-2.0 */MathJax.Extension["TeX/begingroup"]={version:"2.2"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX,e=b.Definitions,d=MathJax.Object.Subclass({macros:null,environments:null,Init:function(a,c){this.macros=a||{};this.environments=c||{}},Find:function(a,c){if(this[c][a])return this[c][a]},Def:function(a,c,b){this[b][a]=c},Undef:function(a,c){delete this[c][a]},Merge:function(a){MathJax.Hub.Insert(this.macros,a.macros);MathJax.Hub.Insert(this.environments,a.environments)},MergeGlobals:function(a){var c=this.macros,b;for(b in c)c.hasOwnProperty(b)&&c[b].global&&(a.Def(b,c[b],"macros",!0),delete c[b].global,delete c[b])},Clear:function(a){this.environments={};if(a)this.macros={};else{a=this.macros;for(var b in a)a.hasOwnProperty(b)&&!a[b].global&&delete a[b]}return this}}),g=b.nsStack=MathJax.Object.Subclass({stack:null,top:0,isEqn:!1,Init:function(a){this.isEqn=a;this.stack=[];a?this.Push(d()):this.Push(d(e.macros,e.environment))},Def:function(a,b,f,e){var d=this.top-1;if(e){for(;0