mathjax
Version:
Beautiful and accessible math in all browsers. MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all browsers. This package includes the packaged components (install mathjax-full to get the source
1 lines • 2.27 kB
JavaScript
(()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.r(t),e.d(t,{BboxConfiguration:()=>f});const o=("undefined"!=typeof window?window:e.g).MathJax._.components.global,n=(o.GLOBAL,o.isObject,o.combineConfig,o.combineDefaults,o.combineWithMathJax),a=(o.MathJax,MathJax._.input.tex.HandlerTypes),i=a.ConfigurationType,r=a.HandlerType,c=MathJax._.input.tex.Configuration,l=c.Configuration,p=(c.ConfigurationHandler,c.ParserConfiguration,MathJax._.input.tex.TokenMap),s=(p.parseResult,p.AbstractTokenMap,p.RegExpMap,p.AbstractParseMap,p.CharacterMap,p.DelimiterMap,p.MacroMap,p.CommandMap),d=(p.EnvironmentMap,MathJax._.input.tex.TexError.default),b={BBox(e,t){const o=e.GetBrackets(t,"");let n=e.ParseArg(t);const a=o.split(/,/);let i,r,c;for(let e=0,o=a.length;e<o;e++){const o=a[e].trim(),n=o.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);if(n){if(i)throw new d("MultipleBBoxProperty","%1 specified twice in %2","Padding",t);const e=n[1]+n[3];e&&(i={height:"+"+e,depth:"+"+e,lspace:e,width:"+"+2*parseInt(n[1],10)+n[3]})}else if(o.match(/^([a-z0-9]+|#[0-9a-f]{6}|#[0-9a-f]{3})$/i)){if(r)throw new d("MultipleBBoxProperty","%1 specified twice in %2","Background",t);r=o}else if(o.match(/^[-a-z]+:/i)){if(c)throw new d("MultipleBBoxProperty","%1 specified twice in %2","Style",t);c=o}else if(""!==o)throw new d("InvalidBBoxProperty",'"%1" doesn\'t look like a color, a padding dimension, or a style',o)}i&&(n=e.create("node","mpadded",[n],i)),(r||c)&&(i={},r&&Object.assign(i,{mathbackground:r}),c&&Object.assign(i,{style:c}),n=e.create("node","mstyle",[n],i)),e.Push(n)}};new s("bbox",{bbox:b.BBox});const f=l.create("bbox",{[i.HANDLER]:{[r.MACRO]:["bbox"]}});MathJax.loader&&MathJax.loader.checkVersion("[tex]/bbox","4.1.0","tex-extension"),n({_:{input:{tex:{bbox:{BboxConfiguration:t}}}}})})();