2 * extensions/underset-overset.js
4 * Part of the jsMath package for mathematics on the web.
6 * This file implements \underset and \overset macros. It will be loaded
7 * automatically when needed, or can be loaded by
9 * jsMath.Extension.Require('underset-overset');
11 * ---------------------------------------------------------------------
13 * Copyright 200-20065 by Davide P. Cervone
15 * Licensed under the Apache License, Version 2.0 (the "License");
16 * you may not use this file except in compliance with the License.
17 * You may obtain a copy of the License at
19 * http://www.apache.org/licenses/LICENSE-2.0
21 * Unless required by applicable law or agreed to in writing, software
22 * distributed under the License is distributed on an "AS IS" BASIS,
23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 * See the License for the specific language governing permissions and
25 * limitations under the License.
28 /********************************************************************/
30 jsMath.Package(jsMath.Parser,{
37 Overset: function (name) {
38 var top = this.ProcessArg(this.cmd+name); if (this.error) return;
39 var bot = this.ProcessArg(this.cmd+name); if (this.error) return;
40 var op = jsMath.mItem.Atom('op',bot);
41 op.limits = 1; op.sup = top;
45 Underset: function (name) {
46 var bot = this.ProcessArg(this.cmd+name); if (this.error) return;
47 var top = this.ProcessArg(this.cmd+name); if (this.error) return;
48 var op = jsMath.mItem.Atom('op',top);
49 op.limits = 1; op.sub = bot;