backy-docs/public/js/mathjax/input/tex/extensions/textmacros.js

1 line
15 KiB
JavaScript
Raw Normal View History

2023-02-20 04:21:20 +00:00
!function(){"use strict";var t,e,a,n,o={762:function(t,e,a){var n;Object.defineProperty(e,"__esModule",{value:!0}),e.TextMacrosConfiguration=e.TextBaseConfiguration=void 0;var o=a(251),r=a(278),s=a(680),i=a(935),c=a(787),l=a(807);function u(t,e,a,n){var o=t.configuration.packageData.get("textmacros");return t instanceof c.TextParser||(o.texParser=t),[new c.TextParser(e,n?{mathvariant:n}:{},o.parseOptions,a).mml()]}a(557),e.TextBaseConfiguration=o.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!==l.TextMacrosMethods.Macro&&t.Error("MathMacro","%1 is only supported in math mode","\\"+e),a.parse("macro",[t,e])}},items:(n={},n[i.StartItem.prototype.kind]=i.StartItem,n[i.StopItem.prototype.kind]=i.StopItem,n[i.MmlItem.prototype.kind]=i.MmlItem,n[i.StyleItem.prototype.kind]=i.StyleItem,n)}),e.TextMacrosConfiguration=o.Configuration.create("textmacros",{config:function(t,e){var a=new o.ParserConfiguration(e.parseOptions.options.textmacros.packages,["tex","text"]);a.init();var n=new r.default(a,[]);n.options=e.parseOptions.options,a.config(e),s.TagsFactory.addTags(a.tags),n.tags=s.TagsFactory.getDefault(),n.tags.configuration=n,n.packageData=e.parseOptions.packageData,n.packageData.set("textmacros",{parseOptions:n,jax:e,texParser:null}),n.options.internalMath=u},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],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",mspace:"Hskip",mkern:"Hskip",rule:"rule",Rule:["Rule"],Space:["Rule","blank"],color:"CheckAutoload",textcolor:"CheckAutoload",colorbox:"CheckAutoload",fcolorbox:"CheckAutoload",href:"CheckAuto