PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.11.0
Code Block Pro – Beautiful Syntax Highlighting v1.11.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / latex.tmLanguage.json

latex.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.11.0, at build/shiki/languages/latex.tmLanguage.json

2,333 lines 62.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "information_for_contributors": [
3 "This file has been converted from https://github.com/jlelong/vscode-latex-basics/blob/master/syntaxes/LaTeX.tmLanguage.json",
4 "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5 "Once accepted there, we are happy to receive an update request."
6 ],
7 "version": "https://github.com/jlelong/vscode-latex-basics/commit/7497a8c9ae12324ac3df3bb5053a2a0c43f80315",
8 "name": "latex",
9 "scopeName": "text.tex.latex",
10 "patterns": [
11 {
12 "comment": "This scope identifies partially typed commands such as `\\tab`. We use this to trigger “Command Completion” only when it makes sense.",
13 "match": "(?<=\\\\[\\w@]|\\\\[\\w@]{2}|\\\\[\\w@]{3}|\\\\[\\w@]{4}|\\\\[\\w@]{5}|\\\\[\\w@]{6})\\s",
14 "name": "meta.space-after-command.latex"
15 },
16 {
17 "begin": "((\\\\)(?:usepackage|documentclass))\\b(?=\\[|\\{)",
18 "beginCaptures": {
19 "1": {
20 "name": "keyword.control.preamble.latex"
21 },
22 "2": {
23 "name": "punctuation.definition.function.latex"
24 }
25 },
26 "end": "(?<=\\})",
27 "endCaptures": {
28 "0": {
29 "name": "punctuation.definition.arguments.end.latex"
30 }
31 },
32 "name": "meta.preamble.latex",
33 "patterns": [
34 {
35 "include": "#multiline-optional-arg"
36 },
37 {
38 "begin": "((?:\\G|(?<=\\]))\\{)",
39 "beginCaptures": {
40 "0": {
41 "name": "punctuation.definition.arguments.begin.latex"
42 }
43 },
44 "end": "(\\})",
45 "endCaptures": {
46 "0": {
47 "name": "punctuation.definition.arguments.end.latex"
48 }
49 },
50 "contentName": "support.class.latex",
51 "patterns": [
52 {
53 "include": "$self"
54 }
55 ]
56 }
57 ]
58 },
59 {
60 "begin": "((\\\\)(?:include|input))(\\{)",
61 "beginCaptures": {
62 "1": {
63 "name": "keyword.control.include.latex"
64 },
65 "2": {
66 "name": "punctuation.definition.function.latex"
67 },
68 "3": {
69 "name": "punctuation.definition.arguments.begin.latex"
70 }
71 },
72 "end": "\\}",
73 "endCaptures": {
74 "0": {
75 "name": "punctuation.definition.arguments.end.latex"
76 }
77 },
78 "name": "meta.include.latex",
79 "patterns": [
80 {
81 "include": "$self"
82 }
83 ]
84 },
85 {
86 "begin": "((\\\\)((?:sub){0,2}section|(?:sub)?paragraph|chapter|part|addpart|addchap|addsec|minisec|frametitle)(?:\\*)?)((?:\\[[^\\[]*?\\]){0,2})(\\{)",
87 "beginCaptures": {
88 "1": {
89 "name": "support.function.section.latex"
90 },
91 "2": {
92 "name": "punctuation.definition.function.latex"
93 },
94 "4": {
95 "patterns": [
96 {
97 "include": "#optional-arg"
98 }
99 ]
100 },
101 "5": {
102 "name": "punctuation.definition.arguments.begin.latex"
103 }
104 },
105 "comment": "this works OK with all kinds of crazy stuff as long as section is one line",
106 "contentName": "entity.name.section.latex",
107 "end": "\\}",
108 "endCaptures": {
109 "0": {
110 "name": "punctuation.definition.arguments.end.latex"
111 }
112 },
113 "name": "meta.function.section.$3.latex",
114 "patterns": [
115 {
116 "include": "text.tex#braces"
117 },
118 {
119 "include": "$base"
120 }
121 ]
122 },
123 {
124 "name": "meta.function.environment.songs.latex",
125 "begin": "((?:\\s*)\\\\begin\\{songs\\}\\{.*\\})",
126 "end": "(\\\\end\\{songs\\}(?:\\s*\\n)?)",
127 "captures": {
128 "1": {
129 "patterns": [
130 {
131 "include": "#begin-env-tokenizer"
132 }
133 ]
134 }
135 },
136 "contentName": "meta.data.environment.songs.latex",
137 "patterns": [
138 {
139 "name": "meta.chord.block.latex support.class.chord.block.environment.latex",
140 "begin": "\\\\\\[",
141 "end": "\\]",
142 "patterns": [
143 {
144 "include": "$base"
145 }
146 ]
147 },
148 {
149 "name": "meta.chord.block.latex support.class.chord.block.environment.latex",
150 "match": "\\^"
151 },
152 {
153 "include": "$self"
154 }
155 ]
156 },
157 {
158 "begin": "(^\\s*)?\\\\begin\\{(lstlisting|minted|pyglist)\\}(?=\\[|\\{)",
159 "end": "\\\\end\\{(?:minted|lstlisting|pyglist)\\}",
160 "captures": {
161 "0": {
162 "patterns": [
163 {
164 "include": "#begin-env-tokenizer"
165 }
166 ]
167 }
168 },
169 "patterns": [
170 {
171 "include": "#multiline-optional-arg-no-highlight"
172 },
173 {
174 "begin": "(?:\\G|(?<=\\]))(\\{)((?:c|cpp))(\\})",
175 "beginCaptures": {
176 "1": {
177 "name": "punctuation.definition.arguments.begin.latex"
178 },
179 "2": {
180 "name": "variable.parameter.function.latex"
181 },
182 "3": {
183 "name": "punctuation.definition.arguments.end.latex"
184 }
185 },
186 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
187 "contentName": "source.cpp.embedded.latex",
188 "patterns": [
189 {
190 "include": "source.cpp.embedded.latex"
191 }
192 ]
193 },
194 {
195 "begin": "(?:\\G|(?<=\\]))(\\{)((?:asy|asymptote))(\\})",
196 "beginCaptures": {
197 "1": {
198 "name": "punctuation.definition.arguments.begin.latex"
199 },
200 "2": {
201 "name": "variable.parameter.function.latex"
202 },
203 "3": {
204 "name": "punctuation.definition.arguments.end.latex"
205 }
206 },
207 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
208 "contentName": "source.asy",
209 "patterns": [
210 {
211 "include": "source.asy"
212 }
213 ]
214 },
215 {
216 "begin": "(?:\\G|(?<=\\]))(\\{)((?:css))(\\})",
217 "beginCaptures": {
218 "1": {
219 "name": "punctuation.definition.arguments.begin.latex"
220 },
221 "2": {
222 "name": "variable.parameter.function.latex"
223 },
224 "3": {
225 "name": "punctuation.definition.arguments.end.latex"
226 }
227 },
228 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
229 "contentName": "source.css",
230 "patterns": [
231 {
232 "include": "source.css"
233 }
234 ]
235 },
236 {
237 "begin": "(?:\\G|(?<=\\]))(\\{)((?:hs|haskell))(\\})",
238 "beginCaptures": {
239 "1": {
240 "name": "punctuation.definition.arguments.begin.latex"
241 },
242 "2": {
243 "name": "variable.parameter.function.latex"
244 },
245 "3": {
246 "name": "punctuation.definition.arguments.end.latex"
247 }
248 },
249 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
250 "contentName": "source.haskell",
251 "patterns": [
252 {
253 "include": "source.haskell"
254 }
255 ]
256 },
257 {
258 "begin": "(?:\\G|(?<=\\]))(\\{)((?:html))(\\})",
259 "beginCaptures": {
260 "1": {
261 "name": "punctuation.definition.arguments.begin.latex"
262 },
263 "2": {
264 "name": "variable.parameter.function.latex"
265 },
266 "3": {
267 "name": "punctuation.definition.arguments.end.latex"
268 }
269 },
270 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
271 "contentName": "text.html",
272 "patterns": [
273 {
274 "include": "text.html.basic"
275 }
276 ]
277 },
278 {
279 "begin": "(?:\\G|(?<=\\]))(\\{)((?:xml))(\\})",
280 "beginCaptures": {
281 "1": {
282 "name": "punctuation.definition.arguments.begin.latex"
283 },
284 "2": {
285 "name": "variable.parameter.function.latex"
286 },
287 "3": {
288 "name": "punctuation.definition.arguments.end.latex"
289 }
290 },
291 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
292 "contentName": "text.xml",
293 "patterns": [
294 {
295 "include": "text.xml"
296 }
297 ]
298 },
299 {
300 "begin": "(?:\\G|(?<=\\]))(\\{)((?:java))(\\})",
301 "beginCaptures": {
302 "1": {
303 "name": "punctuation.definition.arguments.begin.latex"
304 },
305 "2": {
306 "name": "variable.parameter.function.latex"
307 },
308 "3": {
309 "name": "punctuation.definition.arguments.end.latex"
310 }
311 },
312 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
313 "contentName": "source.java",
314 "patterns": [
315 {
316 "include": "source.java"
317 }
318 ]
319 },
320 {
321 "begin": "(?:\\G|(?<=\\]))(\\{)((?:lua))(\\})",
322 "beginCaptures": {
323 "1": {
324 "name": "punctuation.definition.arguments.begin.latex"
325 },
326 "2": {
327 "name": "variable.parameter.function.latex"
328 },
329 "3": {
330 "name": "punctuation.definition.arguments.end.latex"
331 }
332 },
333 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
334 "contentName": "source.lua",
335 "patterns": [
336 {
337 "include": "source.lua"
338 }
339 ]
340 },
341 {
342 "begin": "(?:\\G|(?<=\\]))(\\{)((?:jl|julia))(\\})",
343 "beginCaptures": {
344 "1": {
345 "name": "punctuation.definition.arguments.begin.latex"
346 },
347 "2": {
348 "name": "variable.parameter.function.latex"
349 },
350 "3": {
351 "name": "punctuation.definition.arguments.end.latex"
352 }
353 },
354 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
355 "contentName": "source.julia",
356 "patterns": [
357 {
358 "include": "source.julia"
359 }
360 ]
361 },
362 {
363 "begin": "(?:\\G|(?<=\\]))(\\{)((?:rb|ruby))(\\})",
364 "beginCaptures": {
365 "1": {
366 "name": "punctuation.definition.arguments.begin.latex"
367 },
368 "2": {
369 "name": "variable.parameter.function.latex"
370 },
371 "3": {
372 "name": "punctuation.definition.arguments.end.latex"
373 }
374 },
375 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
376 "contentName": "source.ruby",
377 "patterns": [
378 {
379 "include": "source.ruby"
380 }
381 ]
382 },
383 {
384 "begin": "(?:\\G|(?<=\\]))(\\{)((?:js|javascript))(\\})",
385 "beginCaptures": {
386 "1": {
387 "name": "punctuation.definition.arguments.begin.latex"
388 },
389 "2": {
390 "name": "variable.parameter.function.latex"
391 },
392 "3": {
393 "name": "punctuation.definition.arguments.end.latex"
394 }
395 },
396 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
397 "contentName": "source.js",
398 "patterns": [
399 {
400 "include": "source.js"
401 }
402 ]
403 },
404 {
405 "begin": "(?:\\G|(?<=\\]))(\\{)((?:ts|typescript))(\\})",
406 "beginCaptures": {
407 "1": {
408 "name": "punctuation.definition.arguments.begin.latex"
409 },
410 "2": {
411 "name": "variable.parameter.function.latex"
412 },
413 "3": {
414 "name": "punctuation.definition.arguments.end.latex"
415 }
416 },
417 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
418 "contentName": "source.ts",
419 "patterns": [
420 {
421 "include": "source.ts"
422 }
423 ]
424 },
425 {
426 "begin": "(?:\\G|(?<=\\]))(\\{)((?:py|python))(\\})",
427 "beginCaptures": {
428 "1": {
429 "name": "punctuation.definition.arguments.begin.latex"
430 },
431 "2": {
432 "name": "variable.parameter.function.latex"
433 },
434 "3": {
435 "name": "punctuation.definition.arguments.end.latex"
436 }
437 },
438 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
439 "contentName": "source.python",
440 "patterns": [
441 {
442 "include": "source.python"
443 }
444 ]
445 },
446 {
447 "begin": "(?:\\G|(?<=\\]))(\\{)((?:yaml))(\\})",
448 "beginCaptures": {
449 "1": {
450 "name": "punctuation.definition.arguments.begin.latex"
451 },
452 "2": {
453 "name": "variable.parameter.function.latex"
454 },
455 "3": {
456 "name": "punctuation.definition.arguments.end.latex"
457 }
458 },
459 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
460 "contentName": "source.yaml",
461 "patterns": [
462 {
463 "include": "source.yaml"
464 }
465 ]
466 },
467 {
468 "begin": "(?:\\G|(?<=\\]))(\\{)((?:rust))(\\})",
469 "beginCaptures": {
470 "1": {
471 "name": "punctuation.definition.arguments.begin.latex"
472 },
473 "2": {
474 "name": "variable.parameter.function.latex"
475 },
476 "3": {
477 "name": "punctuation.definition.arguments.end.latex"
478 }
479 },
480 "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})",
481 "contentName": "source.rust",
482 "patterns": [
483 {
484 "include": "source.rust"
485 }
486 ]
487 },
488 {
489 "begin": "(?:\\G|(?<=\\]))(\\{)([a-zA-Z]*)(\\})",
490 "beginCaptures": {
491 "1": {
492 "name": "punctuation.definition.arguments.begin.latex"
493 },
494 "2": {
495 "name": "variable.parameter.function.latex"
496 },
497 "3": {
498 "name": "punctuation.definition.arguments.end.latex"
499 }
500 },
501 "contentName": "meta.function.embedded.latex",
502 "end": "^\\s*(?=\\\\end\\{(?:lstlisting|minted|pyglist)\\})",
503 "name": "meta.embedded.block.generic.latex"
504 }
505 ]
506 },
507 {
508 "begin": "\\s*\\\\begin\\{(?:cppcode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
509 "end": "\\s*\\\\end\\{(?:cppcode)\\*?\\}",
510 "captures": {
511 "0": {
512 "patterns": [
513 {
514 "include": "#begin-env-tokenizer"
515 }
516 ]
517 }
518 },
519 "patterns": [
520 {
521 "include": "#multiline-optional-arg-no-highlight"
522 },
523 {
524 "begin": "(?:\\G|(?<=\\]))(\\{)",
525 "beginCaptures": {
526 "1": {
527 "name": "punctuation.definition.arguments.begin.latex"
528 }
529 },
530 "end": "(\\})",
531 "endCaptures": {
532 "1": {
533 "name": "punctuation.definition.arguments.end.latex"
534 }
535 },
536 "contentName": "variable.parameter.function.latex"
537 },
538 {
539 "begin": "^(?=\\s*)",
540 "end": "^\\s*(?=\\\\end\\{(?:cppcode)\\*?\\})",
541 "contentName": "source.cpp.embedded.latex",
542 "patterns": [
543 {
544 "include": "source.cpp.embedded.latex"
545 }
546 ]
547 }
548 ]
549 },
550 {
551 "begin": "\\s*\\\\begin\\{(?:hscode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
552 "end": "\\s*\\\\end\\{(?:hscode)\\*?\\}",
553 "captures": {
554 "0": {
555 "patterns": [
556 {
557 "include": "#begin-env-tokenizer"
558 }
559 ]
560 }
561 },
562 "patterns": [
563 {
564 "include": "#multiline-optional-arg-no-highlight"
565 },
566 {
567 "begin": "(?:\\G|(?<=\\]))(\\{)",
568 "beginCaptures": {
569 "1": {
570 "name": "punctuation.definition.arguments.begin.latex"
571 }
572 },
573 "end": "(\\})",
574 "endCaptures": {
575 "1": {
576 "name": "punctuation.definition.arguments.end.latex"
577 }
578 },
579 "contentName": "variable.parameter.function.latex"
580 },
581 {
582 "begin": "^(?=\\s*)",
583 "end": "^\\s*(?=\\\\end\\{(?:hscode)\\*?\\})",
584 "contentName": "source.haskell",
585 "patterns": [
586 {
587 "include": "source.haskell"
588 }
589 ]
590 }
591 ]
592 },
593 {
594 "begin": "\\s*\\\\begin\\{(?:luacode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
595 "end": "\\s*\\\\end\\{(?:luacode)\\*?\\}",
596 "captures": {
597 "0": {
598 "patterns": [
599 {
600 "include": "#begin-env-tokenizer"
601 }
602 ]
603 }
604 },
605 "patterns": [
606 {
607 "include": "#multiline-optional-arg-no-highlight"
608 },
609 {
610 "begin": "(?:\\G|(?<=\\]))(\\{)",
611 "beginCaptures": {
612 "1": {
613 "name": "punctuation.definition.arguments.begin.latex"
614 }
615 },
616 "end": "(\\})",
617 "endCaptures": {
618 "1": {
619 "name": "punctuation.definition.arguments.end.latex"
620 }
621 },
622 "contentName": "variable.parameter.function.latex"
623 },
624 {
625 "begin": "^(?=\\s*)",
626 "end": "^\\s*(?=\\\\end\\{(?:luacode)\\*?\\})",
627 "contentName": "source.lua",
628 "patterns": [
629 {
630 "include": "source.lua"
631 }
632 ]
633 }
634 ]
635 },
636 {
637 "begin": "\\s*\\\\begin\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
638 "end": "\\s*\\\\end\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}",
639 "captures": {
640 "0": {
641 "patterns": [
642 {
643 "include": "#begin-env-tokenizer"
644 }
645 ]
646 }
647 },
648 "patterns": [
649 {
650 "include": "#multiline-optional-arg-no-highlight"
651 },
652 {
653 "begin": "(?:\\G|(?<=\\]))(\\{)",
654 "beginCaptures": {
655 "1": {
656 "name": "punctuation.definition.arguments.begin.latex"
657 }
658 },
659 "end": "(\\})",
660 "endCaptures": {
661 "1": {
662 "name": "punctuation.definition.arguments.end.latex"
663 }
664 },
665 "contentName": "variable.parameter.function.latex"
666 },
667 {
668 "begin": "^(?=\\s*)",
669 "end": "^\\s*(?=\\\\end\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\})",
670 "contentName": "source.julia",
671 "patterns": [
672 {
673 "include": "source.julia"
674 }
675 ]
676 }
677 ]
678 },
679 {
680 "begin": "\\s*\\\\begin\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
681 "end": "\\s*\\\\end\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\}",
682 "captures": {
683 "0": {
684 "patterns": [
685 {
686 "include": "#begin-env-tokenizer"
687 }
688 ]
689 }
690 },
691 "patterns": [
692 {
693 "include": "#multiline-optional-arg-no-highlight"
694 },
695 {
696 "begin": "(?:\\G|(?<=\\]))(\\{)",
697 "beginCaptures": {
698 "1": {
699 "name": "punctuation.definition.arguments.begin.latex"
700 }
701 },
702 "end": "(\\})",
703 "endCaptures": {
704 "1": {
705 "name": "punctuation.definition.arguments.end.latex"
706 }
707 },
708 "contentName": "variable.parameter.function.latex"
709 },
710 {
711 "begin": "^(?=\\s*)",
712 "end": "^\\s*(?=\\\\end\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\})",
713 "contentName": "source.julia",
714 "patterns": [
715 {
716 "include": "source.julia"
717 }
718 ]
719 }
720 ]
721 },
722 {
723 "begin": "\\s*\\\\begin\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
724 "end": "\\s*\\\\end\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\}",
725 "captures": {
726 "0": {
727 "patterns": [
728 {
729 "include": "#begin-env-tokenizer"
730 }
731 ]
732 }
733 },
734 "patterns": [
735 {
736 "include": "#multiline-optional-arg-no-highlight"
737 },
738 {
739 "begin": "(?:\\G|(?<=\\]))(\\{)",
740 "beginCaptures": {
741 "1": {
742 "name": "punctuation.definition.arguments.begin.latex"
743 }
744 },
745 "end": "(\\})",
746 "endCaptures": {
747 "1": {
748 "name": "punctuation.definition.arguments.end.latex"
749 }
750 },
751 "contentName": "variable.parameter.function.latex"
752 },
753 {
754 "begin": "^(?=\\s*)",
755 "end": "^\\s*(?=\\\\end\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\})",
756 "contentName": "source.python",
757 "patterns": [
758 {
759 "include": "source.python"
760 }
761 ]
762 }
763 ]
764 },
765 {
766 "begin": "\\s*\\\\begin\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
767 "end": "\\s*\\\\end\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\}",
768 "captures": {
769 "0": {
770 "patterns": [
771 {
772 "include": "#begin-env-tokenizer"
773 }
774 ]
775 }
776 },
777 "patterns": [
778 {
779 "include": "#multiline-optional-arg-no-highlight"
780 },
781 {
782 "begin": "(?:\\G|(?<=\\]))(\\{)",
783 "beginCaptures": {
784 "1": {
785 "name": "punctuation.definition.arguments.begin.latex"
786 }
787 },
788 "end": "(\\})",
789 "endCaptures": {
790 "1": {
791 "name": "punctuation.definition.arguments.end.latex"
792 }
793 },
794 "contentName": "variable.parameter.function.latex"
795 },
796 {
797 "begin": "^(?=\\s*)",
798 "end": "^\\s*(?=\\\\end\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\})",
799 "contentName": "source.python",
800 "patterns": [
801 {
802 "include": "source.python"
803 }
804 ]
805 }
806 ]
807 },
808 {
809 "begin": "\\s*\\\\begin\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
810 "end": "\\s*\\\\end\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\}",
811 "captures": {
812 "0": {
813 "patterns": [
814 {
815 "include": "#begin-env-tokenizer"
816 }
817 ]
818 }
819 },
820 "patterns": [
821 {
822 "include": "#multiline-optional-arg-no-highlight"
823 },
824 {
825 "begin": "(?:\\G|(?<=\\]))(\\{)",
826 "beginCaptures": {
827 "1": {
828 "name": "punctuation.definition.arguments.begin.latex"
829 }
830 },
831 "end": "(\\})",
832 "endCaptures": {
833 "1": {
834 "name": "punctuation.definition.arguments.end.latex"
835 }
836 },
837 "contentName": "variable.parameter.function.latex"
838 },
839 {
840 "begin": "^(?=\\s*)",
841 "end": "^\\s*(?=\\\\end\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\})",
842 "contentName": "source.python",
843 "patterns": [
844 {
845 "include": "source.python"
846 }
847 ]
848 }
849 ]
850 },
851 {
852 "begin": "\\s*\\\\begin\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
853 "end": "\\s*\\\\end\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\}",
854 "captures": {
855 "0": {
856 "patterns": [
857 {
858 "include": "#begin-env-tokenizer"
859 }
860 ]
861 }
862 },
863 "patterns": [
864 {
865 "include": "#multiline-optional-arg-no-highlight"
866 },
867 {
868 "begin": "(?:\\G|(?<=\\]))(\\{)",
869 "beginCaptures": {
870 "1": {
871 "name": "punctuation.definition.arguments.begin.latex"
872 }
873 },
874 "end": "(\\})",
875 "endCaptures": {
876 "1": {
877 "name": "punctuation.definition.arguments.end.latex"
878 }
879 },
880 "contentName": "variable.parameter.function.latex"
881 },
882 {
883 "begin": "^(?=\\s*)",
884 "end": "^\\s*(?=\\\\end\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\})",
885 "contentName": "source.python",
886 "patterns": [
887 {
888 "include": "source.python"
889 }
890 ]
891 }
892 ]
893 },
894 {
895 "begin": "\\s*\\\\begin\\{(?:scalacode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
896 "end": "\\s*\\\\end\\{(?:scalacode)\\*?\\}",
897 "captures": {
898 "0": {
899 "patterns": [
900 {
901 "include": "#begin-env-tokenizer"
902 }
903 ]
904 }
905 },
906 "patterns": [
907 {
908 "include": "#multiline-optional-arg-no-highlight"
909 },
910 {
911 "begin": "(?:\\G|(?<=\\]))(\\{)",
912 "beginCaptures": {
913 "1": {
914 "name": "punctuation.definition.arguments.begin.latex"
915 }
916 },
917 "end": "(\\})",
918 "endCaptures": {
919 "1": {
920 "name": "punctuation.definition.arguments.end.latex"
921 }
922 },
923 "contentName": "variable.parameter.function.latex"
924 },
925 {
926 "begin": "^(?=\\s*)",
927 "end": "^\\s*(?=\\\\end\\{(?:scalacode)\\*?\\})",
928 "contentName": "source.scala",
929 "patterns": [
930 {
931 "include": "source.scala"
932 }
933 ]
934 }
935 ]
936 },
937 {
938 "begin": "\\s*\\\\begin\\{(?:asy|asycode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
939 "end": "\\s*\\\\end\\{(?:asy|asycode)\\*?\\}",
940 "captures": {
941 "0": {
942 "patterns": [
943 {
944 "include": "#begin-env-tokenizer"
945 }
946 ]
947 }
948 },
949 "patterns": [
950 {
951 "include": "#multiline-optional-arg-no-highlight"
952 },
953 {
954 "begin": "(?:\\G|(?<=\\]))(\\{)",
955 "beginCaptures": {
956 "1": {
957 "name": "punctuation.definition.arguments.begin.latex"
958 }
959 },
960 "end": "(\\})",
961 "endCaptures": {
962 "1": {
963 "name": "punctuation.definition.arguments.end.latex"
964 }
965 },
966 "contentName": "variable.parameter.function.latex"
967 },
968 {
969 "begin": "^(?=\\s*)",
970 "end": "^\\s*(?=\\\\end\\{(?:asy|asycode)\\*?\\})",
971 "contentName": "source.asymptote",
972 "patterns": [
973 {
974 "include": "source.asymptote"
975 }
976 ]
977 }
978 ]
979 },
980 {
981 "begin": "\\s*\\\\begin\\{(?:dot2tex|dotcode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
982 "end": "\\s*\\\\end\\{(?:dot2tex|dotcode)\\*?\\}",
983 "captures": {
984 "0": {
985 "patterns": [
986 {
987 "include": "#begin-env-tokenizer"
988 }
989 ]
990 }
991 },
992 "patterns": [
993 {
994 "include": "#multiline-optional-arg-no-highlight"
995 },
996 {
997 "begin": "(?:\\G|(?<=\\]))(\\{)",
998 "beginCaptures": {
999 "1": {
1000 "name": "punctuation.definition.arguments.begin.latex"
1001 }
1002 },
1003 "end": "(\\})",
1004 "endCaptures": {
1005 "1": {
1006 "name": "punctuation.definition.arguments.end.latex"
1007 }
1008 },
1009 "contentName": "variable.parameter.function.latex"
1010 },
1011 {
1012 "begin": "^(?=\\s*)",
1013 "end": "^\\s*(?=\\\\end\\{(?:dot2tex|dotcode)\\*?\\})",
1014 "contentName": "source.dot",
1015 "patterns": [
1016 {
1017 "include": "source.dot"
1018 }
1019 ]
1020 }
1021 ]
1022 },
1023 {
1024 "begin": "\\s*\\\\begin\\{(?:gnuplot)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{)",
1025 "end": "\\s*\\\\end\\{(?:gnuplot)\\*?\\}",
1026 "captures": {
1027 "0": {
1028 "patterns": [
1029 {
1030 "include": "#begin-env-tokenizer"
1031 }
1032 ]
1033 }
1034 },
1035 "patterns": [
1036 {
1037 "include": "#multiline-optional-arg-no-highlight"
1038 },
1039 {
1040 "begin": "(?:\\G|(?<=\\]))(\\{)",
1041 "beginCaptures": {
1042 "1": {
1043 "name": "punctuation.definition.arguments.begin.latex"
1044 }
1045 },
1046 "end": "(\\})",
1047 "endCaptures": {
1048 "1": {
1049 "name": "punctuation.definition.arguments.end.latex"
1050 }
1051 },
1052 "contentName": "variable.parameter.function.latex"
1053 },
1054 {
1055 "begin": "^(?=\\s*)",
1056 "end": "^\\s*(?=\\\\end\\{(?:gnuplot)\\*?\\})",
1057 "contentName": "source.gnuplot",
1058 "patterns": [
1059 {
1060 "include": "source.gnuplot"
1061 }
1062 ]
1063 }
1064 ]
1065 },
1066 {
1067 "begin": "((?:\\s*)\\\\begin\\{([a-z]*code(?:\\*)?)\\}(?:\\[.*\\])?(?:\\{.*\\})?)",
1068 "captures": {
1069 "1": {
1070 "patterns": [
1071 {
1072 "include": "#begin-env-tokenizer"
1073 }
1074 ]
1075 }
1076 },
1077 "end": "(\\\\end\\{\\2\\}(?:\\s*\\n)?)"
1078 },
1079 {
1080 "begin": "((\\\\)addplot)(?:\\+?)((?:\\[[^\\[]*\\]))*\\s*(gnuplot)\\s*((?:\\[[^\\[]*\\]))*\\s*(\\{)",
1081 "captures": {
1082 "1": {
1083 "name": "support.function.be.latex"
1084 },
1085 "2": {
1086 "name": "punctuation.definition.function.latex"
1087 },
1088 "3": {
1089 "patterns": [
1090 {
1091 "include": "#optional-arg"
1092 }
1093 ]
1094 },
1095 "4": {
1096 "name": "variable.parameter.function.latex"
1097 },
1098 "5": {
1099 "patterns": [
1100 {
1101 "include": "#optional-arg"
1102 }
1103 ]
1104 },
1105 "6": {
1106 "name": "punctuation.definition.arguments.begin.latex"
1107 }
1108 },
1109 "patterns": [
1110 {
1111 "begin": "%",
1112 "beginCaptures": {
1113 "0": {
1114 "name": "punctuation.definition.comment.latex"
1115 }
1116 },
1117 "end": "$\\n?",
1118 "name": "comment.line.percentage.latex"
1119 },
1120 {
1121 "include": "source.gnuplot"
1122 }
1123 ],
1124 "end": "\\s*(\\};)"
1125 },
1126 {
1127 "begin": "(\\s*\\\\begin\\{((?:fboxv|boxedv|V|v|spv)erbatim\\*?)\\})",
1128 "captures": {
1129 "1": {
1130 "patterns": [
1131 {
1132 "include": "#begin-env-tokenizer"
1133 }
1134 ]
1135 }
1136 },
1137 "contentName": "markup.raw.verbatim.latex",
1138 "end": "(\\\\end\\{\\2\\})",
1139 "name": "meta.function.verbatim.latex"
1140 },
1141 {
1142 "begin": "(\\s*\\\\begin\\{VerbatimOut\\}\\{[^\\}]*\\})",
1143 "captures": {
1144 "1": {
1145 "patterns": [
1146 {
1147 "include": "#begin-env-tokenizer"
1148 }
1149 ]
1150 }
1151 },
1152 "contentName": "markup.raw.verbatim.latex",
1153 "end": "(\\\\end\\{\\VerbatimOut\\})",
1154 "name": "meta.function.verbatim.latex"
1155 },
1156 {
1157 "begin": "(\\s*\\\\begin\\{alltt\\})",
1158 "captures": {
1159 "1": {
1160 "patterns": [
1161 {
1162 "include": "#begin-env-tokenizer"
1163 }
1164 ]
1165 }
1166 },
1167 "contentName": "markup.raw.verbatim.latex",
1168 "end": "(\\\\end\\{alltt\\})",
1169 "name": "meta.function.alltt.latex",
1170 "patterns": [
1171 {
1172 "captures": {
1173 "1": {
1174 "name": "punctuation.definition.function.latex"
1175 }
1176 },
1177 "match": "(\\\\)[A-Za-z]+",
1178 "name": "support.function.general.latex"
1179 }
1180 ]
1181 },
1182 {
1183 "begin": "(\\s*\\\\begin\\{([Cc]omment)\\})",
1184 "captures": {
1185 "1": {
1186 "patterns": [
1187 {
1188 "include": "#begin-env-tokenizer"
1189 }
1190 ]
1191 }
1192 },
1193 "contentName": "punctuation.definition.comment.latex",
1194 "end": "(\\\\end\\{\\2\\})",
1195 "name": "meta.function.verbatim.latex"
1196 },
1197 {
1198 "captures": {
1199 "1": {
1200 "name": "support.function.url.latex"
1201 },
1202 "2": {
1203 "name": "punctuation.definition.function.latex"
1204 },
1205 "3": {
1206 "name": "punctuation.definition.arguments.begin.latex"
1207 },
1208 "4": {
1209 "name": "markup.underline.link.latex"
1210 },
1211 "5": {
1212 "name": "punctuation.definition.arguments.end.latex"
1213 }
1214 },
1215 "match": "(?:\\s*)((\\\\)(?:url|href))(\\{)([^}]*)(\\})",
1216 "name": "meta.function.link.url.latex"
1217 },
1218 {
1219 "comment": "These two patterns match the \\begin{document} and \\end{document} commands, so that the environment matching pattern following them will ignore those commands.",
1220 "match": "(\\s*\\\\begin\\{document\\})",
1221 "name": "meta.function.begin-document.latex",
1222 "captures": {
1223 "1": {
1224 "patterns": [
1225 {
1226 "include": "#begin-env-tokenizer"
1227 }
1228 ]
1229 }
1230 }
1231 },
1232 {
1233 "match": "(\\s*\\\\end\\{document\\})",
1234 "name": "meta.function.end-document.latex",
1235 "captures": {
1236 "1": {
1237 "patterns": [
1238 {
1239 "include": "#begin-env-tokenizer"
1240 }
1241 ]
1242 }
1243 }
1244 },
1245 {
1246 "begin": "(?:\\s*)((\\\\)begin)(\\{)((?:\\+?array|equation|(?:IEEE)?eqnarray|multline|align|aligned|alignat|alignedat|flalign|flaligned|flalignat|split|gather|gathered|\\+?cases|(?:display)?math|\\+?[a-zA-Z]*matrix|[pbBvV]?NiceMatrix|[pbBvV]?NiceArray|(?:(?:arg)?(?:mini|maxi)))(?:\\*|!)?)(\\})(\\s*\\n)?",
1247 "captures": {
1248 "1": {
1249 "name": "support.function.be.latex"
1250 },
1251 "2": {
1252 "name": "punctuation.definition.function.latex"
1253 },
1254 "3": {
1255 "name": "punctuation.definition.arguments.begin.latex"
1256 },
1257 "4": {
1258 "name": "variable.parameter.function.latex"
1259 },
1260 "5": {
1261 "name": "punctuation.definition.arguments.end.latex"
1262 }
1263 },
1264 "contentName": "meta.math.block.latex support.class.math.block.environment.latex",
1265 "end": "(?:\\s*)((\\\\)end)(\\{)(\\4)(\\})(?:\\s*\\n)?",
1266 "name": "meta.function.environment.math.latex",
1267 "patterns": [
1268 {
1269 "match": "(?<!\\\\)&",
1270 "name": "keyword.control.equation.align.latex"
1271 },
1272 {
1273 "match": "\\\\\\\\",
1274 "name": "keyword.control.equation.newline.latex"
1275 },
1276 {
1277 "include": "#definition-label"
1278 },
1279 {
1280 "include": "text.tex#math"
1281 },
1282 {
1283 "include": "$base"
1284 }
1285 ]
1286 },
1287 {
1288 "begin": "(?:\\s*)(\\\\begin\\{empheq\\}(?:\\[.*\\])?)",
1289 "captures": {
1290 "1": {
1291 "patterns": [
1292 {
1293 "include": "#begin-env-tokenizer"
1294 }
1295 ]
1296 }
1297 },
1298 "contentName": "meta.math.block.latex support.class.math.block.environment.latex",
1299 "end": "(?:\\s*)(\\\\end\\{empheq\\})",
1300 "name": "meta.function.environment.math.latex",
1301 "patterns": [
1302 {
1303 "match": "(?<!\\\\)&",
1304 "name": "keyword.control.equation.align.latex"
1305 },
1306 {
1307 "match": "\\\\\\\\",
1308 "name": "keyword.control.equation.newline.latex"
1309 },
1310 {
1311 "include": "#definition-label"
1312 },
1313 {
1314 "include": "text.tex#math"
1315 },
1316 {
1317 "include": "$base"
1318 }
1319 ]
1320 },
1321 {
1322 "begin": "(\\s*\\\\begin\\{(tabular[xy*]?|xltabular|longtable|(?:long)?tabu|(?:long|tall)?tblr|NiceTabular[X*]?)\\}(\\s*\\n)?)",
1323 "captures": {
1324 "1": {
1325 "patterns": [
1326 {
1327 "include": "#begin-env-tokenizer"
1328 }
1329 ]
1330 }
1331 },
1332 "contentName": "meta.data.environment.tabular.latex",
1333 "end": "(\\s*\\\\end\\{(\\2)\\}(?:\\s*\\n)?)",
1334 "name": "meta.function.environment.tabular.latex",
1335 "patterns": [
1336 {
1337 "match": "(?<!\\\\)&",
1338 "name": "keyword.control.table.cell.latex"
1339 },
1340 {
1341 "match": "\\\\\\\\",
1342 "name": "keyword.control.table.newline.latex"
1343 },
1344 {
1345 "include": "$base"
1346 }
1347 ]
1348 },
1349 {
1350 "begin": "(\\s*\\\\begin\\{(itemize|enumerate|description|list)\\})",
1351 "captures": {
1352 "1": {
1353 "patterns": [
1354 {
1355 "include": "#begin-env-tokenizer"
1356 }
1357 ]
1358 }
1359 },
1360 "end": "(\\\\end\\{\\2\\}(?:\\s*\\n)?)",
1361 "name": "meta.function.environment.list.latex",
1362 "patterns": [
1363 {
1364 "include": "$base"
1365 }
1366 ]
1367 },
1368 {
1369 "begin": "(\\s*\\\\begin\\{tikzpicture\\})",
1370 "captures": {
1371 "1": {
1372 "patterns": [
1373 {
1374 "include": "#begin-env-tokenizer"
1375 }
1376 ]
1377 }
1378 },
1379 "end": "(\\\\end\\{tikzpicture\\}(?:\\s*\\n)?)",
1380 "name": "meta.function.environment.latex.tikz",
1381 "patterns": [
1382 {
1383 "include": "$base"
1384 }
1385 ]
1386 },
1387 {
1388 "begin": "(\\s*\\\\begin\\{frame\\})",
1389 "captures": {
1390 "1": {
1391 "patterns": [
1392 {
1393 "include": "#begin-env-tokenizer"
1394 }
1395 ]
1396 }
1397 },
1398 "end": "(\\\\end\\{frame\\})",
1399 "name": "meta.function.environment.frame.latex",
1400 "patterns": [
1401 {
1402 "include": "$base"
1403 }
1404 ]
1405 },
1406 {
1407 "begin": "(\\s*\\\\begin\\{(mpost\\*?)\\})",
1408 "captures": {
1409 "1": {
1410 "patterns": [
1411 {
1412 "include": "#begin-env-tokenizer"
1413 }
1414 ]
1415 }
1416 },
1417 "end": "(\\\\end\\{\\2\\}(?:\\s*\\n)?)",
1418 "name": "meta.function.environment.latex.mpost"
1419 },
1420 {
1421 "begin": "(\\s*\\\\begin\\{markdown\\})",
1422 "captures": {
1423 "1": {
1424 "patterns": [
1425 {
1426 "include": "#begin-env-tokenizer"
1427 }
1428 ]
1429 }
1430 },
1431 "end": "(\\\\end\\{markdown\\})",
1432 "contentName": "meta.embedded.markdown_latex_combined",
1433 "patterns": [
1434 {
1435 "include": "text.tex.markdown_latex_combined"
1436 }
1437 ]
1438 },
1439 {
1440 "begin": "(\\s*\\\\begin\\{(\\w+\\*?)\\})",
1441 "captures": {
1442 "1": {
1443 "patterns": [
1444 {
1445 "include": "#begin-env-tokenizer"
1446 }
1447 ]
1448 }
1449 },
1450 "end": "(\\\\end\\{\\2\\}(?:\\s*\\n)?)",
1451 "name": "meta.function.environment.general.latex",
1452 "patterns": [
1453 {
1454 "include": "$base"
1455 }
1456 ]
1457 },
1458 {
1459 "captures": {
1460 "1": {
1461 "name": "storage.type.function.latex"
1462 },
1463 "2": {
1464 "name": "punctuation.definition.function.latex"
1465 },
1466 "3": {
1467 "name": "punctuation.definition.begin.latex"
1468 },
1469 "4": {
1470 "name": "support.function.general.latex"
1471 },
1472 "5": {
1473 "name": "punctuation.definition.function.latex"
1474 },
1475 "6": {
1476 "name": "punctuation.definition.end.latex"
1477 }
1478 },
1479 "match": "((\\\\)(?:newcommand|renewcommand|(?:re)?newrobustcmd|DeclareRobustCommand))\\*?({)((\\\\)[^}]*)(})"
1480 },
1481 {
1482 "begin": "((\\\\)marginpar)((?:\\[[^\\[]*?\\])*)(\\{)",
1483 "beginCaptures": {
1484 "1": {
1485 "name": "support.function.marginpar.latex"
1486 },
1487 "2": {
1488 "name": "punctuation.definition.function.latex"
1489 },
1490 "3": {
1491 "patterns": [
1492 {
1493 "include": "#optional-arg"
1494 }
1495 ]
1496 },
1497 "4": {
1498 "name": "punctuation.definition.marginpar.begin.latex"
1499 }
1500 },
1501 "contentName": "meta.paragraph.margin.latex",
1502 "end": "\\}",
1503 "endCaptures": {
1504 "0": {
1505 "name": "punctuation.definition.marginpar.end.latex"
1506 }
1507 },
1508 "patterns": [
1509 {
1510 "include": "text.tex#braces"
1511 },
1512 {
1513 "include": "$base"
1514 }
1515 ]
1516 },
1517 {
1518 "begin": "((\\\\)footnote)((?:\\[[^\\[]*?\\])*)(\\{)",
1519 "beginCaptures": {
1520 "1": {
1521 "name": "support.function.footnote.latex"
1522 },
1523 "2": {
1524 "name": "punctuation.definition.function.latex"
1525 },
1526 "3": {
1527 "patterns": [
1528 {
1529 "include": "#optional-arg"
1530 }
1531 ]
1532 },
1533 "4": {
1534 "name": "punctuation.definition.footnote.begin.latex"
1535 }
1536 },
1537 "contentName": "entity.name.footnote.latex",
1538 "end": "\\}",
1539 "endCaptures": {
1540 "0": {
1541 "name": "punctuation.definition.footnote.end.latex"
1542 }
1543 },
1544 "patterns": [
1545 {
1546 "include": "text.tex#braces"
1547 },
1548 {
1549 "include": "$base"
1550 }
1551 ]
1552 },
1553 {
1554 "begin": "((\\\\)emph)(\\{)",
1555 "beginCaptures": {
1556 "1": {
1557 "name": "support.function.emph.latex"
1558 },
1559 "2": {
1560 "name": "punctuation.definition.function.latex"
1561 },
1562 "3": {
1563 "name": "punctuation.definition.emph.begin.latex"
1564 }
1565 },
1566 "contentName": "markup.italic.emph.latex",
1567 "end": "\\}",
1568 "endCaptures": {
1569 "0": {
1570 "name": "punctuation.definition.emph.end.latex"
1571 }
1572 },
1573 "name": "meta.function.emph.latex",
1574 "patterns": [
1575 {
1576 "include": "text.tex#braces"
1577 },
1578 {
1579 "include": "$base"
1580 }
1581 ]
1582 },
1583 {
1584 "begin": "((\\\\)textit)(\\{)",
1585 "captures": {
1586 "1": {
1587 "name": "support.function.textit.latex"
1588 },
1589 "2": {
1590 "name": "punctuation.definition.function.latex"
1591 },
1592 "3": {
1593 "name": "punctuation.definition.textit.begin.latex"
1594 }
1595 },
1596 "comment": "We put the keyword in a capture and name this capture, so that disabling spell checking for “keyword” won't be inherited by the argument to \\textit{...}.\n\nPut specific matches for particular LaTeX keyword.functions before the last two more general functions",
1597 "contentName": "markup.italic.textit.latex",
1598 "end": "\\}",
1599 "endCaptures": {
1600 "0": {
1601 "name": "punctuation.definition.textit.end.latex"
1602 }
1603 },
1604 "name": "meta.function.textit.latex",
1605 "patterns": [
1606 {
1607 "include": "text.tex#braces"
1608 },
1609 {
1610 "include": "$base"
1611 }
1612 ]
1613 },
1614 {
1615 "begin": "((\\\\)textbf)(\\{)",
1616 "captures": {
1617 "1": {
1618 "name": "support.function.textbf.latex"
1619 },
1620 "2": {
1621 "name": "punctuation.definition.function.latex"
1622 },
1623 "3": {
1624 "name": "punctuation.definition.textbf.begin.latex"
1625 }
1626 },
1627 "contentName": "markup.bold.textbf.latex",
1628 "end": "\\}",
1629 "endCaptures": {
1630 "0": {
1631 "name": "punctuation.definition.textbf.end.latex"
1632 }
1633 },
1634 "name": "meta.function.textbf.latex",
1635 "patterns": [
1636 {
1637 "include": "text.tex#braces"
1638 },
1639 {
1640 "include": "$base"
1641 }
1642 ]
1643 },
1644 {
1645 "begin": "((\\\\)texttt)(\\{)",
1646 "captures": {
1647 "1": {
1648 "name": "support.function.texttt.latex"
1649 },
1650 "2": {
1651 "name": "punctuation.definition.function.latex"
1652 },
1653 "3": {
1654 "name": "punctuation.definition.texttt.begin.latex"
1655 }
1656 },
1657 "contentName": "markup.raw.texttt.latex",
1658 "end": "\\}",
1659 "endCaptures": {
1660 "0": {
1661 "name": "punctuation.definition.texttt.end.latex"
1662 }
1663 },
1664 "name": "meta.function.texttt.latex",
1665 "patterns": [
1666 {
1667 "include": "text.tex#braces"
1668 },
1669 {
1670 "include": "$base"
1671 }
1672 ]
1673 },
1674 {
1675 "captures": {
1676 "0": {
1677 "name": "keyword.other.item.latex"
1678 },
1679 "1": {
1680 "name": "punctuation.definition.keyword.latex"
1681 }
1682 },
1683 "match": "(\\\\)item\\b",
1684 "name": "meta.scope.item.latex"
1685 },
1686 {
1687 "begin": "((\\\\)(?:[aA]uto|foot|full|no|short|[tT]ext|[pP]aren|[sS]mart)?[cC]ite(?:al)?(?:p|s|t|author|year(?:par)?|title)?[ANP]*\\*?)((?:(?:\\([^\\)]*\\)){0,2}(?:\\[[^\\]]*\\]){0,2}\\{[\\w:.]*\\})*)(?:([<\\[])[^\\]<>]*([>\\]]))?(?:(\\[)[^\\]]*(\\]))?(\\{)",
1688 "captures": {
1689 "1": {
1690 "name": "keyword.control.cite.latex"
1691 },
1692 "2": {
1693 "name": "punctuation.definition.keyword.latex"
1694 },
1695 "3": {
1696 "patterns": [
1697 {
1698 "include": "#autocites-arg"
1699 }
1700 ]
1701 },
1702 "4": {
1703 "name": "punctuation.definition.arguments.optional.begin.latex"
1704 },
1705 "5": {
1706 "name": "punctuation.definition.arguments.optional.end.latex"
1707 },
1708 "6": {
1709 "name": "punctuation.definition.arguments.optional.begin.latex"
1710 },
1711 "7": {
1712 "name": "punctuation.definition.arguments.optional.end.latex"
1713 },
1714 "8": {
1715 "name": "punctuation.definition.arguments.begin.latex"
1716 }
1717 },
1718 "end": "\\}",
1719 "endCaptures": {
1720 "0": {
1721 "name": "punctuation.definition.arguments.end.latex"
1722 }
1723 },
1724 "name": "meta.citation.latex",
1725 "patterns": [
1726 {
1727 "captures": {
1728 "1": {
1729 "name": "comment.line.percentage.tex"
1730 },
1731 "2": {
1732 "name": "punctuation.definition.comment.tex"
1733 }
1734 },
1735 "match": "((%).*)$"
1736 },
1737 {
1738 "match": "[\\w:.-]+",
1739 "name": "constant.other.reference.citation.latex"
1740 }
1741 ]
1742 },
1743 {
1744 "begin": "((\\\\)bibentry)(\\{)",
1745 "captures": {
1746 "1": {
1747 "name": "keyword.control.cite.latex"
1748 },
1749 "2": {
1750 "name": "punctuation.definition.keyword.latex"
1751 },
1752 "3": {
1753 "name": "punctuation.definition.arguments.begin.latex"
1754 }
1755 },
1756 "end": "\\}",
1757 "endCaptures": {
1758 "0": {
1759 "name": "punctuation.definition.arguments.end.latex"
1760 }
1761 },
1762 "name": "meta.citation.latex",
1763 "patterns": [
1764 {
1765 "match": "[\\w:.]+",
1766 "name": "constant.other.reference.citation.latex"
1767 }
1768 ]
1769 },
1770 {
1771 "begin": "((\\\\)(?:\\w*[rR]ef\\*?))(\\{)",
1772 "beginCaptures": {
1773 "1": {
1774 "name": "keyword.control.ref.latex"
1775 },
1776 "2": {
1777 "name": "punctuation.definition.keyword.latex"
1778 },
1779 "3": {
1780 "name": "punctuation.definition.arguments.begin.latex"
1781 }
1782 },
1783 "end": "\\}",
1784 "endCaptures": {
1785 "0": {
1786 "name": "punctuation.definition.arguments.end.latex"
1787 }
1788 },
1789 "name": "meta.reference.label.latex",
1790 "patterns": [
1791 {
1792 "match": "[a-zA-Z0-9\\.,:/*!^_-]",
1793 "name": "constant.other.reference.label.latex"
1794 }
1795 ]
1796 },
1797 {
1798 "include": "#definition-label"
1799 },
1800 {
1801 "begin": "((\\\\)(?:verb|Verb|spverb)\\*?)\\s*((\\\\)scantokens)(\\{)",
1802 "beginCaptures": {
1803 "1": {
1804 "name": "support.function.verb.latex"
1805 },
1806 "2": {
1807 "name": "punctuation.definition.function.latex"
1808 },
1809 "3": {
1810 "name": "support.function.verb.latex"
1811 },
1812 "4": {
1813 "name": "punctuation.definition.verb.latex"
1814 },
1815 "5": {
1816 "name": "punctuation.definition.begin.latex"
1817 }
1818 },
1819 "contentName": "markup.raw.verb.latex",
1820 "end": "(\\})",
1821 "endCaptures": {
1822 "1": {
1823 "name": "punctuation.definition.end.latex"
1824 }
1825 },
1826 "name": "meta.function.verb.latex",
1827 "patterns": [
1828 {
1829 "include": "$self"
1830 }
1831 ]
1832 },
1833 {
1834 "captures": {
1835 "1": {
1836 "name": "support.function.verb.latex"
1837 },
1838 "2": {
1839 "name": "punctuation.definition.function.latex"
1840 },
1841 "3": {
1842 "name": "punctuation.definition.verb.latex"
1843 },
1844 "4": {
1845 "name": "markup.raw.verb.latex"
1846 },
1847 "5": {
1848 "name": "punctuation.definition.verb.latex"
1849 }
1850 },
1851 "match": "((\\\\)(?:verb|Verb|spverb)\\*?)\\s*((?<=\\s)\\S|[^a-zA-Z])(.*?)(\\3|$)",
1852 "name": "meta.function.verb.latex"
1853 },
1854 {
1855 "captures": {
1856 "1": {
1857 "name": "support.function.verb.latex"
1858 },
1859 "2": {
1860 "name": "punctuation.definition.function.latex"
1861 },
1862 "3": {
1863 "patterns": [
1864 {
1865 "include": "#optional-arg"
1866 }
1867 ]
1868 },
1869 "4": {
1870 "name": "punctuation.definition.arguments.begin.latex"
1871 },
1872 "5": {
1873 "name": "punctuation.definition.arguments.end.latex"
1874 },
1875 "6": {
1876 "name": "punctuation.definition.verb.latex"
1877 },
1878 "7": {
1879 "name": "markup.raw.verb.latex"
1880 },
1881 "8": {
1882 "name": "punctuation.definition.verb.latex"
1883 },
1884 "9": {
1885 "name": "punctuation.definition.verb.latex"
1886 },
1887 "10": {
1888 "name": "markup.raw.verb.latex"
1889 },
1890 "11": {
1891 "name": "punctuation.definition.verb.latex"
1892 }
1893 },
1894 "match": "((\\\\)(?:mint|mintinline))((?:\\[[^\\[]*?\\])?)(\\{)[a-zA-Z]*(\\})(?:(?:([^a-zA-Z\\{])(.*?)(\\6))|(?:(\\{)(.*?)(\\})))",
1895 "name": "meta.function.verb.latex"
1896 },
1897 {
1898 "captures": {
1899 "1": {
1900 "name": "support.function.verb.latex"
1901 },
1902 "2": {
1903 "name": "punctuation.definition.function.latex"
1904 },
1905 "3": {
1906 "patterns": [
1907 {
1908 "include": "#optional-arg"
1909 }
1910 ]
1911 },
1912 "4": {
1913 "name": "punctuation.definition.verb.latex"
1914 },
1915 "5": {
1916 "name": "markup.raw.verb.latex"
1917 },
1918 "6": {
1919 "name": "punctuation.definition.verb.latex"
1920 },
1921 "7": {
1922 "name": "punctuation.definition.verb.latex"
1923 },
1924 "8": {
1925 "name": "markup.raw.verb.latex"
1926 },
1927 "9": {
1928 "name": "punctuation.definition.verb.latex"
1929 }
1930 },
1931 "match": "((\\\\)[a-z]+inline)((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))",
1932 "name": "meta.function.verb.latex"
1933 },
1934 {
1935 "captures": {
1936 "1": {
1937 "name": "support.function.verb.latex"
1938 },
1939 "2": {
1940 "name": "punctuation.definition.function.latex"
1941 },
1942 "3": {
1943 "patterns": [
1944 {
1945 "include": "#optional-arg"
1946 }
1947 ]
1948 },
1949 "4": {
1950 "name": "punctuation.definition.verb.latex"
1951 },
1952 "5": {
1953 "name": "source.python",
1954 "patterns": [
1955 {
1956 "include": "source.python"
1957 }
1958 ]
1959 },
1960 "6": {
1961 "name": "punctuation.definition.verb.latex"
1962 },
1963 "7": {
1964 "name": "punctuation.definition.verb.latex"
1965 },
1966 "8": {
1967 "name": "source.python",
1968 "patterns": [
1969 {
1970 "include": "source.python"
1971 }
1972 ]
1973 },
1974 "9": {
1975 "name": "punctuation.definition.verb.latex"
1976 }
1977 },
1978 "match": "((\\\\)(?:(?:py|pycon|pylab|pylabcon|sympy|sympycon)[cv]?|pyq|pycq|pyif))((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))",
1979 "name": "meta.function.verb.latex"
1980 },
1981 {
1982 "captures": {
1983 "1": {
1984 "name": "support.function.verb.latex"
1985 },
1986 "2": {
1987 "name": "punctuation.definition.function.latex"
1988 },
1989 "3": {
1990 "patterns": [
1991 {
1992 "include": "#optional-arg"
1993 }
1994 ]
1995 },
1996 "4": {
1997 "name": "punctuation.definition.verb.latex"
1998 },
1999 "5": {
2000 "name": "source.julia",
2001 "patterns": [
2002 {
2003 "include": "source.julia"
2004 }
2005 ]
2006 },
2007 "6": {
2008 "name": "punctuation.definition.verb.latex"
2009 },
2010 "7": {
2011 "name": "punctuation.definition.verb.latex"
2012 },
2013 "8": {
2014 "name": "source.julia",
2015 "patterns": [
2016 {
2017 "include": "source.julia"
2018 }
2019 ]
2020 },
2021 "9": {
2022 "name": "punctuation.definition.verb.latex"
2023 }
2024 },
2025 "match": "((\\\\)(?:jl|julia)[cv]?)((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))",
2026 "name": "meta.function.verb.latex"
2027 },
2028 {
2029 "match": "\\\\(?:newline|pagebreak|clearpage|linebreak|pause)(?:\\b)",
2030 "name": "keyword.control.layout.latex"
2031 },
2032 {
2033 "begin": "\\\\\\(",
2034 "beginCaptures": {
2035 "0": {
2036 "name": "punctuation.definition.string.begin.latex"
2037 }
2038 },
2039 "end": "\\\\\\)",
2040 "endCaptures": {
2041 "0": {
2042 "name": "punctuation.definition.string.end.latex"
2043 }
2044 },
2045 "name": "meta.math.block.latex support.class.math.block.environment.latex",
2046 "patterns": [
2047 {
2048 "include": "text.tex#math"
2049 },
2050 {
2051 "include": "$base"
2052 }
2053 ]
2054 },
2055 {
2056 "begin": "\\$\\$",
2057 "beginCaptures": {
2058 "0": {
2059 "name": "punctuation.definition.string.begin.latex"
2060 }
2061 },
2062 "end": "\\$\\$",
2063 "endCaptures": {
2064 "0": {
2065 "name": "punctuation.definition.string.end.latex"
2066 }
2067 },
2068 "name": "meta.math.block.latex support.class.math.block.environment.latex",
2069 "patterns": [
2070 {
2071 "match": "\\\\\\$",
2072 "name": "constant.character.escape.latex"
2073 },
2074 {
2075 "include": "text.tex#math"
2076 },
2077 {
2078 "include": "$base"
2079 }
2080 ]
2081 },
2082 {
2083 "begin": "\\$",
2084 "beginCaptures": {
2085 "0": {
2086 "name": "punctuation.definition.string.begin.tex"
2087 }
2088 },
2089 "end": "\\$",
2090 "endCaptures": {
2091 "0": {
2092 "name": "punctuation.definition.string.end.tex"
2093 }
2094 },
2095 "name": "meta.math.block.tex support.class.math.block.tex",
2096 "patterns": [
2097 {
2098 "match": "\\\\\\$",
2099 "name": "constant.character.escape.latex"
2100 },
2101 {
2102 "include": "text.tex#math"
2103 },
2104 {
2105 "include": "$base"
2106 }
2107 ]
2108 },
2109 {
2110 "begin": "\\\\\\[",
2111 "beginCaptures": {
2112 "0": {
2113 "name": "punctuation.definition.string.begin.latex"
2114 }
2115 },
2116 "end": "\\\\\\]",
2117 "endCaptures": {
2118 "0": {
2119 "name": "punctuation.definition.string.end.latex"
2120 }
2121 },
2122 "name": "meta.math.block.latex support.class.math.block.environment.latex",
2123 "patterns": [
2124 {
2125 "include": "text.tex#math"
2126 },
2127 {
2128 "include": "$base"
2129 }
2130 ]
2131 },
2132 {
2133 "captures": {
2134 "1": {
2135 "name": "punctuation.definition.constant.latex"
2136 }
2137 },
2138 "match": "(\\\\)(text(s(terling|ixoldstyle|urd|e(ction|venoldstyle|rvicemark))|yen|n(ineoldstyle|umero|aira)|c(ircledP|o(py(left|right)|lonmonetary)|urrency|e(nt(oldstyle)?|lsius))|t(hree(superior|oldstyle|quarters(emdash)?)|i(ldelow|mes)|w(o(superior|oldstyle)|elveudash)|rademark)|interrobang(down)?|zerooldstyle|o(hm|ne(superior|half|oldstyle|quarter)|penbullet|rd(feminine|masculine))|d(i(scount|ed|v(orced)?)|o(ng|wnarrow|llar(oldstyle)?)|egree|agger(dbl)?|blhyphen(char)?)|uparrow|p(ilcrow|e(so|r(t(housand|enthousand)|iodcentered))|aragraph|m)|e(stimated|ightoldstyle|uro)|quotes(traight(dblbase|base)|ingle)|f(iveoldstyle|ouroldstyle|lorin|ractionsolidus)|won|l(not|ira|e(ftarrow|af)|quill|angle|brackdbl)|a(s(cii(caron|dieresis|acute|grave|macron|breve)|teriskcentered)|cutedbl)|r(ightarrow|e(cipe|ferencemark|gistered)|quill|angle|brackdbl)|g(uarani|ravedbl)|m(ho|inus|u(sicalnote)?|arried)|b(igcircle|orn|ullet|lank|a(ht|rdbl)|rokenbar)))\\b",
2139 "name": "constant.character.latex"
2140 },
2141 {
2142 "captures": {
2143 "1": {
2144 "name": "punctuation.definition.column-specials.begin.latex"
2145 },
2146 "2": {
2147 "name": "punctuation.definition.column-specials.end.latex"
2148 }
2149 },
2150 "match": "(?:<|>)(\\{)\\$(\\})",
2151 "name": "meta.column-specials.latex"
2152 },
2153 {
2154 "include": "text.tex"
2155 }
2156 ],
2157 "repository": {
2158 "optional-arg": {
2159 "patterns": [
2160 {
2161 "captures": {
2162 "1": {
2163 "name": "punctuation.definition.arguments.optional.begin.latex"
2164 },
2165 "2": {
2166 "name": "variable.parameter.function.latex"
2167 },
2168 "3": {
2169 "name": "punctuation.definition.arguments.optional.end.latex"
2170 }
2171 },
2172 "match": "(\\[)([^\\[]*?)(\\])",
2173 "name": "meta.parameter.optional.latex"
2174 }
2175 ]
2176 },
2177 "multiline-optional-arg-no-highlight": {
2178 "begin": "\\G\\[",
2179 "beginCaptures": {
2180 "0": {
2181 "name": "punctuation.definition.arguments.optional.begin.latex"
2182 }
2183 },
2184 "end": "\\]",
2185 "endCaptures": {
2186 "0": {
2187 "name": "punctuation.definition.arguments.optional.end.latex"
2188 }
2189 },
2190 "name": "meta.parameter.optional.latex",
2191 "patterns": [
2192 {
2193 "include": "$self"
2194 }
2195 ]
2196 },
2197 "multiline-optional-arg": {
2198 "begin": "\\G\\[",
2199 "beginCaptures": {
2200 "0": {
2201 "name": "punctuation.definition.arguments.optional.begin.latex"
2202 }
2203 },
2204 "end": "\\]",
2205 "endCaptures": {
2206 "0": {
2207 "name": "punctuation.definition.arguments.optional.end.latex"
2208 }
2209 },
2210 "name": "meta.parameter.optional.latex",
2211 "contentName": "variable.parameter.function.latex",
2212 "patterns": [
2213 {
2214 "include": "$self"
2215 }
2216 ]
2217 },
2218 "autocites-arg": {
2219 "patterns": [
2220 {
2221 "captures": {
2222 "1": {
2223 "name": "punctuation.definition.arguments.optional.begin.latex"
2224 },
2225 "2": {
2226 "name": "punctuation.definition.arguments.optional.end.latex"
2227 },
2228 "3": {
2229 "name": "punctuation.definition.arguments.optional.begin.latex"
2230 },
2231 "4": {
2232 "name": "punctuation.definition.arguments.optional.end.latex"
2233 },
2234 "5": {
2235 "name": "punctuation.definition.arguments.begin.latex"
2236 },
2237 "6": {
2238 "name": "constant.other.reference.citation.latex"
2239 },
2240 "7": {
2241 "name": "punctuation.definition.arguments.end.latex"
2242 },
2243 "8": {
2244 "patterns": [
2245 {
2246 "include": "#autocites-arg"
2247 }
2248 ]
2249 }
2250 },
2251 "match": "(?:(\\()[^\\)]*(\\))){0,2}(?:(\\[)[^\\]]*(\\])){0,2}(\\{)([\\w:.]+)(\\})(.*)"
2252 }
2253 ]
2254 },
2255 "begin-env-tokenizer": {
2256 "captures": {
2257 "1": {
2258 "name": "support.function.be.latex"
2259 },
2260 "2": {
2261 "name": "punctuation.definition.function.latex"
2262 },
2263 "3": {
2264 "name": "punctuation.definition.arguments.begin.latex"
2265 },
2266 "4": {
2267 "name": "variable.parameter.function.latex"
2268 },
2269 "5": {
2270 "name": "punctuation.definition.arguments.end.latex"
2271 },
2272 "6": {
2273 "name": "punctuation.definition.arguments.optional.begin.latex"
2274 },
2275 "7": {
2276 "patterns": [
2277 {
2278 "include": "$base"
2279 }
2280 ]
2281 },
2282 "8": {
2283 "name": "punctuation.definition.arguments.optional.end.latex"
2284 },
2285 "9": {
2286 "name": "punctuation.definition.arguments.begin.latex"
2287 },
2288 "10": {
2289 "name": "variable.parameter.function.latex"
2290 },
2291 "11": {
2292 "name": "punctuation.definition.arguments.end.latex"
2293 }
2294 },
2295 "match": "\\s*((\\\\)(?:begin|end))(\\{)([a-zA-Z]*\\*?)(\\})(?:(\\[)(.*)(\\]))?(?:(\\{)([^{}]*)(\\}))?"
2296 },
2297 "definition-label": {
2298 "begin": "((\\\\)label)((?:\\[[^\\[]*?\\])*)(\\{)",
2299 "beginCaptures": {
2300 "1": {
2301 "name": "keyword.control.label.latex"
2302 },
2303 "2": {
2304 "name": "punctuation.definition.keyword.latex"
2305 },
2306 "3": {
2307 "patterns": [
2308 {
2309 "include": "#optional-arg"
2310 }
2311 ]
2312 },
2313 "4": {
2314 "name": "punctuation.definition.arguments.begin.latex"
2315 }
2316 },
2317 "end": "\\}",
2318 "endCaptures": {
2319 "0": {
2320 "name": "punctuation.definition.arguments.end.latex"
2321 }
2322 },
2323 "name": "meta.definition.label.latex",
2324 "patterns": [
2325 {
2326 "match": "[a-zA-Z0-9\\.,:/*!^_-]",
2327 "name": "variable.parameter.definition.label.latex"
2328 }
2329 ]
2330 }
2331 }
2332 }
2333