Current File : /home/pacjaorg/public_html/kmm/media/vendor/codemirror/mode/stex/stex.min.js
(function(u){typeof exports=="object"&&typeof module=="object"?u(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],u):u(CodeMirror)})(function(u){"use strict";u.defineMode("stex",function(y,k){"use strict";function h(t,e){t.cmdState.push(e)}function g(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function s(t){var e=t.cmdState.pop();e&&e.closeBracket()}function p(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var i=e[n];if(i.name!="DEFAULT")return i}return{styleIdentifier:function(){return null}}}function a(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var r={};r.importmodule=a("importmodule","tag",["string","builtin"]),r.documentclass=a("documentclass","tag",["","atom"]),r.usepackage=a("usepackage","tag",["atom"]),r.begin=a("begin","tag",["atom"]),r.end=a("end","tag",["atom"]),r.label=a("label","tag",["atom"]),r.ref=a("ref","tag",["atom"]),r.eqref=a("eqref","tag",["atom"]),r.cite=a("cite","tag",["atom"]),r.bibitem=a("bibitem","tag",["atom"]),r.Bibitem=a("Bibitem","tag",["atom"]),r.RBibitem=a("RBibitem","tag",["atom"]),r.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function f(t,e){t.f=e}function l(t,e){var n;if(t.match(/^\\[a-zA-Z@]+/)){var i=t.current().slice(1);return n=r.hasOwnProperty(i)?r[i]:r.DEFAULT,n=new n,h(e,n),f(e,b),n.style}if(t.match(/^\\[$&%#{}_]/)||t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return f(e,function(m,o){return d(m,o,"\\]")}),"keyword";if(t.match("\\("))return f(e,function(m,o){return d(m,o,"\\)")}),"keyword";if(t.match("$$"))return f(e,function(m,o){return d(m,o,"$$")}),"keyword";if(t.match("$"))return f(e,function(m,o){return d(m,o,"$")}),"keyword";var c=t.next();if(c=="%")return t.skipToEnd(),"comment";if(c=="}"||c=="]"){if(n=g(e),n)n.closeBracket(c),f(e,b);else return"error";return"bracket"}else return c=="{"||c=="["?(n=r.DEFAULT,n=new n,h(e,n),"bracket"):/\d/.test(c)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),n=p(e),n.name=="begin"&&(n.argument=t.current()),n.styleIdentifier())}function d(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return f(e,l),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/)||t.match(/^\\[,;!\/]/)||t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=t.next();return i=="{"||i=="}"||i=="["||i=="]"||i=="("||i==")"?"bracket":i=="%"?(t.skipToEnd(),"comment"):"error"}function b(t,e){var n=t.peek(),i;return n=="{"||n=="["?(i=g(e),i.openBracket(n),t.eat(n),f(e,l),"bracket"):/[ \t\r]/.test(n)?(t.eat(n),null):(f(e,l),s(e),l(t,e))}return{startState:function(){var t=k.inMathMode?function(e,n){return d(e,n)}:l;return{cmdState:[],f:t}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=l,t.cmdState.length=0},lineComment:"%"}}),u.defineMIME("text/x-stex","stex"),u.defineMIME("text/x-latex","stex")});
Site is undergoing maintenance

PACJA Events

Maintenance mode is on

Site will be available soon. Thank you for your patience!