mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-14 00:40:32 +00:00
1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
|
!function(){"use strict";var t,e,a,n,o,r={667:function(t,e){e.q=void 0,e.q="3.2.2"},762:function(t,e,a){var n,o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TextMacrosConfiguration=e.TextBaseConfiguration=void 0;var r=a(251),s=o(a(278)),i=a(680),c=a(935),l=a(787),u=a(807);function p(t,e,a,n){var o=t.configuration.packageData.get("textmacros");return t instanceof l.TextParser||(o.texParser=t),[new l.TextParser(e,n?{mathvariant:n}:{},o.parseOptions,a).mml()]}a(557),e.TextBaseConfiguration=r.Configuration.create("text-base",{parser:"text",handler:{character:["command","text-special"],macro:["text-macros"]},fallback:{character:function(t,e){t.text+=e},macro:function(t,e){var a=t.texParser,n=a.lookup("macro",e);n&&n._func!==u.TextMacrosMethods.Macro&&t.Error("MathMacro","%1 is only supported in math mode","\\"+e),a.parse("macro",[t,e])}},items:(n={},n[c.StartItem.prototype.kind]=c.StartItem,n[c.StopItem.prototype.kind]=c.StopItem,n[c.MmlItem.prototype.kind]=c.MmlItem,n[c.StyleItem.prototype.kind]=c.StyleItem,n)}),e.TextMacrosConfiguration=r.Configuration.create("textmacros",{config:function(t,e){var a=new r.ParserConfiguration(e.parseOptions.options.textmacros.packages,["tex","text"]);a.init();var n=new s.default(a,[]);n.options=e.parseOptions.options,a.config(e),i.TagsFactory.addTags(a.tags),n.tags=i.TagsFactory.getDefault(),n.tags.configuration=n,n.packageData=e.parseOptions.packageData,n.packageData.set("textmacros",{parseOptions:n,jax:e,texParser:null}),n.options.internalMath=p},preprocessors:[function(t){var e=t.data.packageData.get("textmacros");e.parseOptions.nodeFactory.setMmlFactory(e.jax.mmlFactory)}],options:{textmacros:{packages:["text-base"]}}})},557:function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0});var n=a(871),o=a(108),r=a(807),s=a(230);new n.MacroMap("text-special",{$:"Math","%":"Comment","^":"MathModeOnly",_:"MathModeOnly","&":"Misplaced","#":"Misplaced","~":"Tilde"," ":"Space","\t":"Space","\r":"Space","\n":"Space","\xa0":"Tilde","{":"OpenBrace","}":"CloseBrace","`":"OpenQuote","'":"CloseQuote"},r.TextMacrosMethods),new n.CommandMap("text-macros",{"(":"Math",$:"SelfQuote",_:"SelfQuote","%":"SelfQuote","{":"SelfQuote","}":"SelfQuote"," ":"SelfQuote","&":"SelfQuote","#":"SelfQuote","\\":"SelfQuote","'":["Accent","\xb4"],"\u2019":["Accent","\xb4"],"`":["Accent","`"],"\u2018":["Accent","`"],"^":["Accent","^"],'"':["Accent","\xa8"],"~":["Accent","~"],"=":["Accent","\xaf"],".":["Accent","\u02d9"],u:["Accent","\u02d8"],v:["Accent","\u02c7"],emph:"Emph",rm:["SetFont",o.TexConstant.Variant.NORMAL],mit:["SetFont",o.TexConstant.Variant.ITALIC],oldstyle:["SetFont",o.TexConstant.Variant.OLDSTYLE],cal:["SetFont",o.TexConstant.Variant.CALLIGRAPHIC],it:["SetFont","-tex-mathit"],bf:["SetFont",o.TexConstant.Variant.BOLD],bbFont:["SetFont",o.TexConstant.Variant.DOUBLESTRUCK],scr:["SetFont",o.TexConstant.Variant.SCRIPT],frak:["SetFont",o.TexConstant.Variant.FRAKTUR],sf:["SetFont",o.TexConstant.Variant.SANSSERIF],tt:["SetFont",o.TexConstant.Variant.MONOSPACE],tiny:["SetSize",.5],Tiny:["SetSize",.6],scriptsize:["SetSize",.7],small:["SetSize",.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],Bbb:["Macro","{\\bbFont #1}",1],textnormal:["Macro","{\\rm #1}",1],textup:["Macro","{\\rm #1}",1],textrm:["Macro","{\\rm #1}",1],textit:["Macro","{\\it #1}",1],textbf:["Macro","{\\bf #1}",1],textsf:["Macro","{\\sf #1}",1],texttt:["Macro","{\\tt #1}",1],dagger:["Insert","\u2020"],ddagger:["Insert","\u2021"],S:["Insert","\xa7"],",":["Spacer",s.MATHSPACE.thinmathspace],":":["Spacer",s.MATHSPACE.mediummathspace],">":["Spacer",s.MATHSPACE.mediummathspace],";":["Spacer",s.MATHSPACE.thickmathspace],"!":["Spacer",s.MATHSPACE.negativethinmathspace],enspace:["Spacer",.5],quad:["Spacer",1],qquad:["Spacer",2],thinspace:["Spacer",s.MATHSPACE.thinmathspace],negthinspace:["Spacer",s.MATHSPACE.negativethinmathspace],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip"
|