Path: blob/main/extensions/latex/syntaxes/TeX.tmLanguage.json
3291 views
{1"information_for_contributors": [2"This file has been converted from https://github.com/jlelong/vscode-latex-basics/blob/master/syntaxes/TeX.tmLanguage.json",3"If you want to provide a fix or improvement, please create a pull request against the original repository.",4"Once accepted there, we are happy to receive an update request."5],6"version": "https://github.com/jlelong/vscode-latex-basics/commit/6bd99800f7b2cbd0e36cecb56fe1936da5affadb",7"name": "TeX",8"scopeName": "text.tex",9"patterns": [10{11"include": "#iffalse-block"12},13{14"include": "#macro-control"15},16{17"include": "#catcode"18},19{20"include": "#comment"21},22{23"match": "[\\[\\]]",24"name": "punctuation.definition.brackets.tex"25},26{27"include": "#dollar-math"28},29{30"match": "\\\\\\\\",31"name": "keyword.control.newline.tex"32},33{34"include": "#macro-general"35}36],37"repository": {38"catcode": {39"match": "((\\\\)catcode)`(?:\\\\)?.(=)(\\d+)",40"captures": {41"1": {42"name": "keyword.control.catcode.tex"43},44"2": {45"name": "punctuation.definition.keyword.tex"46},47"3": {48"name": "punctuation.separator.key-value.tex"49},50"4": {51"name": "constant.numeric.category.tex"52}53},54"name": "meta.catcode.tex"55},56"iffalse-block": {57"begin": "(?<=^\\s*)((\\\\)iffalse)(?!\\s*[{}]\\s*\\\\fi\\b)",58"beginCaptures": {59"1": {60"name": "keyword.control.tex"61},62"2": {63"name": "punctuation.definition.keyword.tex"64}65},66"contentName": "comment.line.percentage.tex",67"end": "((\\\\)(?:else|fi)\\b)",68"endCaptures": {69"1": {70"name": "keyword.control.tex"71},72"2": {73"name": "punctuation.definition.keyword.tex"74}75},76"patterns": [77{78"include": "#comment"79},80{81"include": "#braces"82},83{84"include": "#conditionals"85}86]87},88"macro-control": {89"match": "(\\\\)(backmatter|csname|else|endcsname|fi|frontmatter|mainmatter|unless|if(case|cat|csname|defined|dim|eof|false|fontchar|hbox|hmode|inner|mmode|num|odd|true|vbox|vmode|void|x)?)(?![a-zA-Z@])",90"captures": {91"1": {92"name": "punctuation.definition.keyword.tex"93}94},95"name": "keyword.control.tex"96},97"braces": {98"begin": "(?<!\\\\)\\{",99"beginCaptures": {100"0": {101"name": "punctuation.group.begin.tex"102}103},104"end": "(?<!\\\\)\\}",105"endCaptures": {106"0": {107"name": "punctuation.group.end.tex"108}109},110"name": "meta.group.braces.tex",111"patterns": [112{113"include": "#braces"114}115]116},117"comment": {118"begin": "(^[ \\t]+)?(?=%)",119"beginCaptures": {120"1": {121"name": "punctuation.whitespace.comment.leading.tex"122}123},124"end": "(?!\\G)",125"patterns": [126{127"begin": "%:?",128"beginCaptures": {129"0": {130"name": "punctuation.definition.comment.tex"131}132},133"end": "$\\n?",134"name": "comment.line.percentage.tex"135},136{137"begin": "^(%!TEX) (\\S*) =",138"beginCaptures": {139"1": {140"name": "punctuation.definition.comment.tex"141}142},143"end": "$\\n?",144"name": "comment.line.percentage.directive.tex"145}146]147},148"conditionals": {149"begin": "(?<=^\\s*)\\\\if[a-z]*",150"end": "(?<=^\\s*)\\\\fi",151"patterns": [152{153"include": "#comment"154},155{156"include": "#conditionals"157}158]159},160"dollar-math": {161"begin": "(\\$\\$|\\$)",162"beginCaptures": {163"1": {164"name": "punctuation.definition.string.begin.tex"165}166},167"end": "(\\1)",168"endCaptures": {169"1": {170"name": "punctuation.definition.string.end.tex"171}172},173"name": "meta.math.block.tex support.class.math.block.tex",174"patterns": [175{176"match": "\\\\\\$",177"name": "constant.character.escape.tex"178},179{180"include": "#math-content"181},182{183"include": "$self"184}185]186},187"math-content": {188"patterns": [189{190"begin": "((\\\\)(?:text|mbox))(\\{)",191"beginCaptures": {192"1": {193"name": "constant.other.math.tex"194},195"2": {196"name": "punctuation.definition.function.tex"197},198"3": {199"name": "punctuation.definition.arguments.begin.tex meta.text.normal.tex"200}201},202"contentName": "meta.text.normal.tex",203"end": "\\}",204"endCaptures": {205"0": {206"name": "punctuation.definition.arguments.end.tex meta.text.normal.tex"207}208},209"patterns": [210{211"include": "#math-content"212},213{214"include": "$self"215}216]217},218{219"match": "\\\\{|\\\\}",220"name": "punctuation.math.bracket.pair.tex"221},222{223"match": "\\\\(left|right|((big|bigg|Big|Bigg)[lr]?))([\\(\\[\\<\\>\\]\\)\\.\\|]|\\\\[{}|]|\\\\[lr]?[Vv]ert|\\\\[lr]angle)",224"name": "punctuation.math.bracket.pair.big.tex"225},226{227"match": "(\\\\)(s(s(earrow|warrow|lash)|h(ort(downarrow|uparrow|parallel|leftarrow|rightarrow|mid)|arp)|tar|i(gma|m(eq)?)|u(cc(sim|n(sim|approx)|curlyeq|eq|approx)?|pset(neq(q)?|plus(eq)?|eq(q)?)?|rd|m|bset(neq(q)?|plus(eq)?|eq(q)?)?)|p(hericalangle|adesuit)|e(tminus|arrow)|q(su(pset(eq)?|bset(eq)?)|c(up|ap)|uare)|warrow|m(ile|all(s(etminus|mile)|frown)))|h(slash|ook(leftarrow|rightarrow)|eartsuit|bar)|R(sh|ightarrow|e|bag)|Gam(e|ma)|n(s(hort(parallel|mid)|im|u(cc(eq)?|pseteq(q)?|bseteq))|Rightarrow|n(earrow|warrow)|cong|triangle(left(eq(slant)?)?|right(eq(slant)?)?)|i(plus)?|u|p(lus|arallel|rec(eq)?)|e(q|arrow|g|xists)|v(dash|Dash)|warrow|le(ss|q(slant|q)?|ft(arrow|rightarrow))|a(tural|bla)|VDash|rightarrow|g(tr|eq(slant|q)?)|mid|Left(arrow|rightarrow))|c(hi|irc(eq|le(d(circ|S|dash|ast)|arrow(left|right)))?|o(ng|prod|lon|mplement)|dot(s|p)?|u(p|r(vearrow(left|right)|ly(eq(succ|prec)|vee(downarrow|uparrow)?|wedge(downarrow|uparrow)?)))|enterdot|lubsuit|ap)|Xi|Maps(to(char)?|from(char)?)|B(ox|umpeq|bbk)|t(h(ick(sim|approx)|e(ta|refore))|imes|op|wohead(leftarrow|rightarrow)|a(u|lloblong)|riangle(down|q|left(eq(slant)?)?|right(eq(slant)?)?)?)|i(n(t(er(cal|leave))?|plus|fty)?|ota|math)|S(igma|u(pset|bset))|zeta|o(slash|times|int|dot|plus|vee|wedge|lessthan|greaterthan|m(inus|ega)|b(slash|long|ar))|d(i(v(ideontimes)?|a(g(down|up)|mond(suit)?)|gamma)|o(t(plus|eq(dot)?)|ublebarwedge|wn(harpoon(left|right)|downarrows|arrow))|d(ots|agger)|elta|a(sh(v|leftarrow|rightarrow)|leth|gger))|Y(down|up|left|right)|C(up|ap)|u(n(lhd|rhd)|p(silon|harpoon(left|right)|downarrow|uparrows|lus|arrow)|lcorner|rcorner)|jmath|Theta|Im|p(si|hi|i(tchfork)?|erp|ar(tial|allel)|r(ime|o(d|pto)|ec(sim|n(sim|approx)|curlyeq|eq|approx)?)|m)|e(t(h|a)|psilon|q(slant(less|gtr)|circ|uiv)|ll|xists|mptyset)|Omega|D(iamond|ownarrow|elta)|v(d(ots|ash)|ee(bar)?|Dash|ar(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|curly(vee|wedge)|t(heta|imes|riangle(left|right)?)|o(slash|circle|times|dot|plus|vee|wedge|lessthan|ast|greaterthan|minus|b(slash|ar))|p(hi|i|ropto)|epsilon|kappa|rho|bigcirc))|kappa|Up(silon|downarrow|arrow)|Join|f(orall|lat|a(t(s(emi|lash)|bslash)|llingdotseq)|rown)|P(si|hi|i)|w(p|edge|r)|l(hd|n(sim|eq(q)?|approx)|ceil|times|ightning|o(ng(left(arrow|rightarrow)|rightarrow|maps(to|from))|zenge|oparrow(left|right))|dot(s|p)|e(ss(sim|dot|eq(qgtr|gtr)|approx|gtr)|q(slant|q)?|ft(slice|harpoon(down|up)|threetimes|leftarrows|arrow(t(ail|riangle))?|right(squigarrow|harpoons|arrow(s|triangle|eq)?))|adsto)|vertneqq|floor|l(c(orner|eil)|floor|l|bracket)?|a(ngle|mbda)|rcorner|bag)|a(s(ymp|t)|ngle|pprox(eq)?|l(pha|eph)|rrownot|malg)|V(dash|vdash)|r(h(o|d)|ceil|times|i(singdotseq|ght(s(quigarrow|lice)|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(t(ail|riangle))?|rightarrows))|floor|angle|r(ceil|parenthesis|floor|bracket)|bag)|g(n(sim|eq(q)?|approx)|tr(sim|dot|eq(qless|less)|less|approx)|imel|eq(slant|q)?|vertneqq|amma|g(g)?)|Finv|xi|m(ho|i(nuso|d)|o(o|dels)|u(ltimap)?|p|e(asuredangle|rge)|aps(to|from(char)?))|b(i(n(dnasrepma|ampersand)|g(s(tar|qc(up|ap))|nplus|c(irc|u(p|rly(vee|wedge))|ap)|triangle(down|up)|interleave|o(times|dot|plus)|uplus|parallel|vee|wedge|box))|o(t|wtie|x(slash|circle|times|dot|plus|empty|ast|minus|b(slash|ox|ar)))|u(llet|mpeq)|e(cause|t(h|ween|a))|lack(square|triangle(down|left|right)?|lozenge)|a(ck(s(im(eq)?|lash)|prime|epsilon)|r(o|wedge))|bslash)|L(sh|ong(left(arrow|rightarrow)|rightarrow|maps(to|from))|eft(arrow|rightarrow)|leftarrow|ambda|bag)|Arrownot)(?![a-zA-Z@])",228"captures": {229"1": {230"name": "punctuation.definition.constant.math.tex"231}232},233"name": "constant.character.math.tex"234},235{236"match": "(\\\\)(sum|prod|coprod|int|oint|bigcap|bigcup|bigsqcup|bigvee|bigwedge|bigodot|bigotimes|bogoplus|biguplus)\\b",237"captures": {238"1": {239"name": "punctuation.definition.constant.math.tex"240}241},242"name": "constant.character.math.tex"243},244{245"match": "(\\\\)(arccos|arcsin|arctan|arg|cos|cosh|cot|coth|csc|deg|det|dim|exp|gcd|hom|inf|ker|lg|lim|liminf|limsup|ln|log|max|min|pr|sec|sin|sinh|sup|tan|tanh)\\b",246"captures": {247"1": {248"name": "punctuation.definition.constant.math.tex"249}250},251"name": "constant.other.math.tex"252},253{254"begin": "((\\\\)Sexpr(\\{))",255"beginCaptures": {256"1": {257"name": "support.function.sexpr.math.tex"258},259"2": {260"name": "punctuation.definition.function.math.tex"261},262"3": {263"name": "punctuation.section.embedded.begin.math.tex"264}265},266"contentName": "support.function.sexpr.math.tex",267"end": "(((\\})))",268"endCaptures": {269"1": {270"name": "support.function.sexpr.math.tex"271},272"2": {273"name": "punctuation.section.embedded.end.math.tex"274},275"3": {276"name": "source.r"277}278},279"name": "meta.embedded.line.r",280"patterns": [281{282"begin": "\\G(?!\\})",283"end": "(?=\\})",284"name": "source.r",285"patterns": [286{287"include": "source.r"288}289]290}291]292},293{294"captures": {295"1": {296"name": "punctuation.definition.constant.math.tex"297}298},299"match": "(\\\\)(?!begin\\{|verb)([A-Za-z]+)",300"name": "constant.other.general.math.tex"301},302{303"match": "(?<!\\\\)\\{",304"name": "punctuation.math.begin.bracket.curly.tex"305},306{307"match": "(?<!\\\\)\\}",308"name": "punctuation.math.end.bracket.curly.tex"309},310{311"match": "(?<!\\\\)\\(",312"name": "punctuation.math.begin.bracket.round.tex"313},314{315"match": "(?<!\\\\)\\)",316"name": "punctuation.math.end.bracket.round.tex"317},318{319"match": "(([0-9]*[\\.][0-9]+)|[0-9]+)",320"name": "constant.numeric.math.tex"321},322{323"match": "[\\+\\*/-]|(?:(?<!\\^)\\^(?!\\^))|(?:(?<!\\_)\\_(?!\\_))",324"name": "punctuation.math.operator.tex"325}326]327},328"macro-general": {329"patterns": [330{331"match": "(\\\\)_*[\\p{Alphabetic}@]+(?:_[\\p{Alphabetic}@]+)*:[NncVvoxefTFpwD]*",332"captures": {333"1": {334"name": "punctuation.definition.function.tex"335}336},337"name": "support.class.general.latex3.tex"338},339{340"match": "(\\.)[\\p{Alphabetic}@]+(?:_[\\p{Alphabetic}@]+)*:[NncVvoxefTFpwD]*",341"captures": {342"1": {343"name": "punctuation.definition.function.tex"344}345},346"name": "support.class.general.latex3.tex"347},348{349"match": "(\\\\)(?:[,;]|(?:[\\p{Alphabetic}@]+))",350"captures": {351"1": {352"name": "punctuation.definition.function.tex"353}354},355"name": "support.function.general.tex"356},357{358"match": "(\\\\)[^a-zA-Z@]",359"captures": {360"1": {361"name": "punctuation.definition.keyword.tex"362}363},364"name": "constant.character.escape.tex"365}366]367}368}369}370371