ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,i,g){"use strict";var a=e("../lib/oop"),t=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),n=function(o){o||(o="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:o,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:o,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+o,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell."+o,regex:"\\s+"},{token:"nospell."+o,regex:"\\w+"}]}};a.inherits(n,t),i.TexHighlightRules=n}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,i,g){"use strict";var a=e("../range").Range,c=function(){};(function(){this.checkOutdent=function(t,n){return!!/^\s+$/.test(t)&&/^\s*\}/.test(n)},this.autoOutdent=function(t,n){var r=t.getLine(n).match(/^(\s*\})/);if(!r)return 0;var l=r[1].length,u=t.findMatchingBracket({row:n,column:l});if(!u||u.row==n)return 0;var h=this.$getIndent(t.getLine(u.row));t.replace(new a(n,0,n,l-1),h)},this.$getIndent=function(t){return t.match(/^\s*/)[0]}}).call(c.prototype),i.MatchingBraceOutdent=c}),ace.define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"],function(e,i,g){"use strict";var a=e("../lib/oop"),c=e("./text").Mode,t=e("./text_highlight_rules").TextHighlightRules,n=e("./tex_highlight_rules").TexHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,r=function(l){this.HighlightRules=l?t:n,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour};a.inherits(r,c),function(){this.lineCommentStart="%",this.getNextLineIndent=function(l,u,h){return this.$getIndent(u)},this.allowAutoInsert=function(){return!1},this.$id="ace/mode/tex",this.snippetFileId="ace/snippets/tex"}.call(r.prototype),i.Mode=r}),ace.require(["ace/mode/tex"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)});