textpow 0.10.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +7 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +30 -0
- data/{History.txt → History.rdoc} +10 -0
- data/{README.txt → MIT-LICENSE.txt} +0 -30
- data/README.rdoc +82 -0
- data/Rakefile +42 -49
- data/bin/plist2syntax +0 -0
- data/bin/plist2yaml +0 -0
- data/examples/benchmark_js.rb +13 -0
- data/examples/jquery.js +9046 -0
- data/lib/textpow.rb +43 -3
- data/lib/textpow/debug_processor.rb +35 -35
- data/lib/textpow/recording_processor.rb +13 -0
- data/lib/textpow/score_manager.rb +60 -60
- data/lib/textpow/syntax.rb +303 -262
- data/lib/textpow/syntax/broken/markdown.syntax +519 -0
- data/lib/textpow/syntax/broken/php.syntax +1253 -0
- data/lib/textpow/syntax/buggy/nemerle.syntax +74 -0
- data/lib/textpow/syntax/old/YAML.yaml +160 -0
- data/lib/textpow/syntax/old/txt2tags.yaml +139 -0
- data/lib/textpow/syntax/source.actionscript.syntax +97 -0
- data/lib/textpow/syntax/source.active4d.library.syntax +21 -0
- data/lib/textpow/syntax/source.active4d.syntax +276 -0
- data/lib/textpow/syntax/source.ada.syntax +33 -0
- data/lib/textpow/syntax/source.antlr.syntax +151 -0
- data/lib/textpow/syntax/source.apache-config.mod_perl.syntax +50 -0
- data/lib/textpow/syntax/source.apache-config.syntax +191 -0
- data/lib/textpow/syntax/source.applescript.syntax +384 -0
- data/lib/textpow/syntax/source.asp.syntax +70 -0
- data/lib/textpow/syntax/source.asp.vb.net.syntax +129 -0
- data/lib/textpow/syntax/source.c++.qt.syntax +26 -0
- data/lib/textpow/syntax/source.c++.syntax +186 -0
- data/lib/textpow/syntax/source.c-sharp.syntax +59 -0
- data/lib/textpow/syntax/source.c.ragel.syntax +201 -0
- data/lib/textpow/syntax/source.c.syntax +414 -0
- data/lib/textpow/syntax/source.camlp4.ocaml.syntax +36 -0
- data/lib/textpow/syntax/source.cm.syntax +32 -0
- data/lib/textpow/syntax/source.coffee.syntax +216 -0
- data/lib/textpow/syntax/source.context-free.syntax +176 -0
- data/lib/textpow/syntax/source.css.beta.syntax +1925 -0
- data/lib/textpow/syntax/source.css.syntax +195 -0
- data/lib/textpow/syntax/source.d.syntax +142 -0
- data/lib/textpow/syntax/source.diff.syntax +81 -0
- data/lib/textpow/syntax/source.dot.syntax +47 -0
- data/lib/textpow/syntax/source.dylan.syntax +62 -0
- data/lib/textpow/syntax/source.eiffel.syntax +78 -0
- data/lib/textpow/syntax/source.erlang.syntax +922 -0
- data/lib/textpow/syntax/source.fortran.syntax +141 -0
- data/lib/textpow/syntax/source.fscript.syntax +80 -0
- data/lib/textpow/syntax/source.fxscript.syntax +142 -0
- data/lib/textpow/syntax/source.gri.syntax +83 -0
- data/lib/textpow/syntax/source.groovy.groovy.syntax +191 -0
- data/lib/textpow/syntax/source.haskell.syntax +88 -0
- data/lib/textpow/syntax/source.icalendar.syntax +32 -0
- data/lib/textpow/syntax/source.inform.syntax +48 -0
- data/lib/textpow/syntax/source.ini.syntax +55 -0
- data/lib/textpow/syntax/source.io.syntax +81 -0
- data/lib/textpow/syntax/source.java-props.syntax +20 -0
- data/lib/textpow/syntax/source.java.syntax +211 -0
- data/lib/textpow/syntax/source.js.greasemonkey.syntax +34 -0
- data/lib/textpow/syntax/source.js.jquery.syntax +114 -0
- data/lib/textpow/syntax/source.js.mootools.syntax +572 -0
- data/lib/textpow/syntax/source.js.prototype.bracketed.syntax +140 -0
- data/lib/textpow/syntax/source.js.prototype.syntax +72 -0
- data/lib/textpow/syntax/source.js.syntax +256 -0
- data/lib/textpow/syntax/source.js.yui.syntax +176 -0
- data/lib/textpow/syntax/source.json.syntax +136 -0
- data/lib/textpow/syntax/source.lex.syntax +219 -0
- data/lib/textpow/syntax/source.lighttpd-config.syntax +54 -0
- data/lib/textpow/syntax/source.lilypond.syntax +492 -0
- data/lib/textpow/syntax/source.lisp.syntax +61 -0
- data/lib/textpow/syntax/source.logo.syntax +29 -0
- data/lib/textpow/syntax/source.logtalk.syntax +152 -0
- data/lib/textpow/syntax/source.lua.syntax +86 -0
- data/lib/textpow/syntax/source.makefile.syntax +36 -0
- data/lib/textpow/syntax/source.matlab.syntax +142 -0
- data/lib/textpow/syntax/source.mel.syntax +92 -0
- data/lib/textpow/syntax/source.mips.syntax +66 -0
- data/lib/textpow/syntax/source.ml.syntax +121 -0
- data/lib/textpow/syntax/source.modula-3.syntax +47 -0
- data/lib/textpow/syntax/source.nant-build.syntax +53 -0
- data/lib/textpow/syntax/source.objc++.syntax +18 -0
- data/lib/textpow/syntax/source.objc.syntax +233 -0
- data/lib/textpow/syntax/source.ocaml.syntax +764 -0
- data/lib/textpow/syntax/source.ocamllex.syntax +167 -0
- data/lib/textpow/syntax/source.ocamlyacc.syntax +184 -0
- data/lib/textpow/syntax/source.open-gl.syntax +14 -0
- data/lib/textpow/syntax/source.pascal.syntax +77 -0
- data/lib/textpow/syntax/source.pascal.vectorscript.syntax +57 -0
- data/lib/textpow/syntax/source.perl.syntax +1113 -0
- data/lib/textpow/syntax/source.php.cake.syntax +55 -0
- data/lib/textpow/syntax/source.plist.tm-grammar.syntax +708 -0
- data/lib/textpow/syntax/source.postscript.syntax +114 -0
- data/lib/textpow/syntax/source.processing.syntax +106 -0
- data/lib/textpow/syntax/source.prolog.syntax +40 -0
- data/lib/textpow/syntax/source.python.django.syntax +21 -0
- data/lib/textpow/syntax/source.python.syntax +868 -0
- data/lib/textpow/syntax/source.qmake.syntax +114 -0
- data/lib/textpow/syntax/source.quake-config.syntax +32 -0
- data/lib/textpow/syntax/source.r-console.syntax +16 -0
- data/lib/textpow/syntax/source.r.syntax +81 -0
- data/lib/textpow/syntax/source.regexp.oniguruma.syntax +107 -0
- data/lib/textpow/syntax/source.regexp.python.syntax +109 -0
- data/lib/textpow/syntax/source.regexp.syntax +50 -0
- data/lib/textpow/syntax/source.remind.syntax +253 -0
- data/lib/textpow/syntax/source.rez.syntax +80 -0
- data/lib/textpow/syntax/source.ruby.experimental.syntax +145 -0
- data/lib/textpow/syntax/source.ruby.rails.syntax +88 -0
- data/lib/textpow/syntax/source.ruby.syntax +1035 -0
- data/lib/textpow/syntax/source.s5.syntax +69 -0
- data/lib/textpow/syntax/source.sass.syntax +45 -0
- data/lib/textpow/syntax/source.scheme.syntax +347 -0
- data/lib/textpow/syntax/source.scilab.syntax +41 -0
- data/lib/textpow/syntax/source.scss.syntax +527 -0
- data/lib/textpow/syntax/source.shell.syntax +384 -0
- data/lib/textpow/syntax/source.slate.syntax +149 -0
- data/lib/textpow/syntax/source.smarty.syntax +63 -0
- data/lib/textpow/syntax/source.sql.ruby.syntax +18 -0
- data/lib/textpow/syntax/source.sql.syntax +237 -0
- data/lib/textpow/syntax/source.ssh-config.syntax +33 -0
- data/lib/textpow/syntax/source.strings.syntax +39 -0
- data/lib/textpow/syntax/source.swig.syntax +57 -0
- data/lib/textpow/syntax/source.tcl.macports.syntax +163 -0
- data/lib/textpow/syntax/source.tcl.syntax +152 -0
- data/lib/textpow/syntax/source.yaml.syntax +160 -0
- data/lib/textpow/syntax/text.active4d-ini.syntax +50 -0
- data/lib/textpow/syntax/text.bbcode.syntax +287 -0
- data/lib/textpow/syntax/text.bibtex.syntax +151 -0
- data/lib/textpow/syntax/text.blog.html.syntax +41 -0
- data/lib/textpow/syntax/text.blog.markdown.syntax +42 -0
- data/lib/textpow/syntax/text.blog.syntax +27 -0
- data/lib/textpow/syntax/text.blog.textile.syntax +27 -0
- data/lib/textpow/syntax/text.gtdalt.syntax +143 -0
- data/lib/textpow/syntax/text.haml.syntax +88 -0
- data/lib/textpow/syntax/text.html.asp.net.syntax +424 -0
- data/lib/textpow/syntax/text.html.asp.syntax +27 -0
- data/lib/textpow/syntax/text.html.basic.syntax +362 -0
- data/lib/textpow/syntax/text.html.cfm.syntax +119 -0
- data/lib/textpow/syntax/text.html.django.syntax +36 -0
- data/lib/textpow/syntax/text.html.dokuwiki.syntax +204 -0
- data/lib/textpow/syntax/text.html.doxygen.syntax +43 -0
- data/lib/textpow/syntax/text.html.markdown.multimarkdown.syntax +39 -0
- data/lib/textpow/syntax/text.html.mason.syntax +119 -0
- data/lib/textpow/syntax/text.html.mediawiki.syntax +567 -0
- data/lib/textpow/syntax/text.html.mt.syntax +162 -0
- data/lib/textpow/syntax/text.html.ruby.syntax +40 -0
- data/lib/textpow/syntax/text.html.strict.active4d.syntax +311 -0
- data/lib/textpow/syntax/text.html.tcl.syntax +26 -0
- data/lib/textpow/syntax/text.html.textile.syntax +215 -0
- data/lib/textpow/syntax/text.html.tt.syntax +121 -0
- data/lib/textpow/syntax/text.html.twiki.syntax +241 -0
- data/lib/textpow/syntax/text.html.xhtml.1-strict.syntax +4027 -0
- data/lib/textpow/syntax/text.log.latex.syntax +50 -0
- data/lib/textpow/syntax/text.mail.markdown.syntax +118 -0
- data/lib/textpow/syntax/text.man.syntax +17 -0
- data/lib/textpow/syntax/text.moinmoin.syntax +189 -0
- data/lib/textpow/syntax/text.plain.gtd.syntax +22 -0
- data/lib/textpow/syntax/text.plain.release-notes.syntax +46 -0
- data/lib/textpow/syntax/text.plain.syntax +32 -0
- data/lib/textpow/syntax/text.plist.syntax +635 -0
- data/lib/textpow/syntax/text.pmwiki.syntax +113 -0
- data/lib/textpow/syntax/text.restructuredtext.syntax +250 -0
- data/lib/textpow/syntax/text.setext.syntax +147 -0
- data/lib/textpow/syntax/text.subversion-commit.syntax +36 -0
- data/lib/textpow/syntax/text.tabular.csv.syntax +68 -0
- data/lib/textpow/syntax/text.tabular.tsv.syntax +50 -0
- data/lib/textpow/syntax/text.tex.latex.beamer.syntax +41 -0
- data/lib/textpow/syntax/text.tex.latex.haskell.syntax +24 -0
- data/lib/textpow/syntax/text.tex.latex.memoir.syntax +64 -0
- data/lib/textpow/syntax/text.tex.latex.rd.syntax +91 -0
- data/lib/textpow/syntax/text.tex.latex.sweave.syntax +84 -0
- data/lib/textpow/syntax/text.tex.latex.syntax +566 -0
- data/lib/textpow/syntax/text.tex.math.syntax +49 -0
- data/lib/textpow/syntax/text.tex.syntax +86 -0
- data/lib/textpow/syntax/text.txt2tags.syntax +79 -0
- data/lib/textpow/syntax/text.xml.apple-dist.syntax +77 -0
- data/lib/textpow/syntax/text.xml.strict.syntax +92 -0
- data/lib/textpow/syntax/text.xml.syntax +180 -0
- data/lib/textpow/syntax/text.xml.xsl.syntax +60 -0
- data/lib/textpow/version.rb +3 -0
- data/spec/fixtures/objeck.plist +107 -0
- data/spec/fixtures/utf8.txt +1 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/textpow/score_manager_spec.rb +20 -0
- data/spec/textpow/syntax_files_spec.rb +26 -0
- data/spec/textpow/syntax_spec.rb +225 -0
- data/spec/textpow_spec.rb +57 -0
- data/textpow.gemspec +19 -0
- metadata +246 -68
- data/Manifest.txt +0 -13
- data/mm/manual.mm +0 -266
- data/test/test_textpow.rb +0 -25
@@ -0,0 +1,566 @@
|
|
1
|
+
---
|
2
|
+
name: LaTeX
|
3
|
+
fileTypes:
|
4
|
+
- tex
|
5
|
+
firstLineMatch: ^\\documentclass(?!.*\{beamer\})
|
6
|
+
scopeName: text.tex.latex
|
7
|
+
uuid: 3BEEA00C-6B1D-11D9-B8AD-000D93589AF6
|
8
|
+
foldingStartMarker: \\begin\{.*\}|%.*\(fold\)\s*$
|
9
|
+
patterns:
|
10
|
+
- name: meta.space-after-command.latex
|
11
|
+
match: (?=\s)(?<=\\[\w@]|\\[\w@]{2}|\\[\w@]{3}|\\[\w@]{4}|\\[\w@]{5}|\\[\w@]{6})\s
|
12
|
+
- name: meta.preamble.latex
|
13
|
+
endCaptures:
|
14
|
+
"0":
|
15
|
+
name: punctuation.definition.arguments.end.latex
|
16
|
+
begin: ((\\)(?:usepackage|documentclass))(?:(\[)([^\]]*)(\]))?(\{)
|
17
|
+
contentName: support.class.latex
|
18
|
+
beginCaptures:
|
19
|
+
"6":
|
20
|
+
name: punctuation.definition.arguments.begin.latex
|
21
|
+
"1":
|
22
|
+
name: keyword.control.preamble.latex
|
23
|
+
"2":
|
24
|
+
name: punctuation.definition.function.latex
|
25
|
+
"3":
|
26
|
+
name: punctuation.definition.arguments.begin.latex
|
27
|
+
"4":
|
28
|
+
name: variable.parameter.latex
|
29
|
+
"5":
|
30
|
+
name: punctuation.definition.arguments.end.latex
|
31
|
+
end: \}
|
32
|
+
patterns:
|
33
|
+
- include: $self
|
34
|
+
- name: meta.include.latex
|
35
|
+
endCaptures:
|
36
|
+
"0":
|
37
|
+
name: punctuation.definition.arguments.end.latex
|
38
|
+
begin: ((\\)(?:include|input))(\{)
|
39
|
+
contentName: support.class.latex
|
40
|
+
beginCaptures:
|
41
|
+
"1":
|
42
|
+
name: keyword.control.include.latex
|
43
|
+
"2":
|
44
|
+
name: punctuation.definition.function.latex
|
45
|
+
"3":
|
46
|
+
name: punctuation.definition.arguments.begin.latex
|
47
|
+
end: \}
|
48
|
+
patterns:
|
49
|
+
- include: $self
|
50
|
+
- name: meta.function.section.latex
|
51
|
+
endCaptures:
|
52
|
+
"0":
|
53
|
+
name: punctuation.definition.arguments.end.latex
|
54
|
+
begin: "(?x)\n\
|
55
|
+
\t\t\t\t(\t\t\t\t\t\t\t\t\t\t\t\t\t# Capture 1\n\
|
56
|
+
\t\t\t\t\t(\\\\)\t\t\t\t\t\t\t\t\t\t\t# Marker\n\
|
57
|
+
\t\t\t\t\t(?:\n\
|
58
|
+
\t\t\t\t\t\t(?:sub){0,2}section\t\t\t\t\t\t\t# Functions\n\
|
59
|
+
\t\t\t\t\t | (?:sub)?paragraph\n\
|
60
|
+
\t\t\t\t\t | chapter|part|addpart\n\
|
61
|
+
\t\t\t\t\t | addchap|addsec|minisec\n\
|
62
|
+
\t\t\t\t\t)\n\
|
63
|
+
\t\t\t\t\t(?:\\*)?\t\t\t\t\t\t\t\t\t\t\t# Optional Unnumbered\n\
|
64
|
+
\t\t\t\t)\n\
|
65
|
+
\t\t\t\t(?:\n\
|
66
|
+
\t\t\t\t\t(\\[)([^\\[]*?)(\\])\t\t\t\t\t\t\t\t# Optional Title\n\
|
67
|
+
\t\t\t\t)??\n\
|
68
|
+
\t\t\t\t(\\{)\t\t\t\t\t\t\t\t\t\t\t\t# Opening Bracket\n\
|
69
|
+
\t\t\t\t"
|
70
|
+
contentName: entity.name.section.latex
|
71
|
+
beginCaptures:
|
72
|
+
"6":
|
73
|
+
name: punctuation.definition.arguments.begin.latex
|
74
|
+
"1":
|
75
|
+
name: support.function.section.latex
|
76
|
+
"2":
|
77
|
+
name: punctuation.definition.function.latex
|
78
|
+
"3":
|
79
|
+
name: punctuation.definition.arguments.optional.begin.latex
|
80
|
+
"4":
|
81
|
+
name: entity.name.section.latex
|
82
|
+
"5":
|
83
|
+
name: punctuation.definition.arguments.optional.end.latex
|
84
|
+
end: \}
|
85
|
+
patterns:
|
86
|
+
- include: $self
|
87
|
+
comment: this works OK with all kinds of crazy stuff as long as section is one line
|
88
|
+
- name: meta.function.embedded.java.latex
|
89
|
+
captures:
|
90
|
+
"6":
|
91
|
+
name: punctuation.definition.arguments.optional.begin.latex
|
92
|
+
"7":
|
93
|
+
name: punctuation.definition.arguments.optional.end.latex
|
94
|
+
"8":
|
95
|
+
name: comment.line.percentage.latex
|
96
|
+
"1":
|
97
|
+
name: support.function.be.latex
|
98
|
+
"2":
|
99
|
+
name: punctuation.definition.function.latex
|
100
|
+
"3":
|
101
|
+
name: punctuation.definition.arguments.begin.latex
|
102
|
+
"4":
|
103
|
+
name: variable.parameter.function.latex
|
104
|
+
"5":
|
105
|
+
name: punctuation.definition.arguments.end.latex
|
106
|
+
begin: (?:\s*)((\\)begin)(\{)(lstlisting)(\})(?:(\[).*(\]))?(\s*%\s*(?i:Java)\n?)
|
107
|
+
contentName: source.java.embedded
|
108
|
+
end: ((\\)end)(\{)(lstlisting)(\})
|
109
|
+
patterns:
|
110
|
+
- include: source.java
|
111
|
+
- name: meta.function.embedded.python.latex
|
112
|
+
captures:
|
113
|
+
"6":
|
114
|
+
name: punctuation.definition.arguments.optional.begin.latex
|
115
|
+
"7":
|
116
|
+
name: punctuation.definition.arguments.optional.end.latex
|
117
|
+
"8":
|
118
|
+
name: comment.line.percentage.latex
|
119
|
+
"1":
|
120
|
+
name: support.function.be.latex
|
121
|
+
"2":
|
122
|
+
name: punctuation.definition.function.latex
|
123
|
+
"3":
|
124
|
+
name: punctuation.definition.arguments.begin.latex
|
125
|
+
"4":
|
126
|
+
name: variable.parameter.function.latex
|
127
|
+
"5":
|
128
|
+
name: punctuation.definition.arguments.end.latex
|
129
|
+
begin: (?:\s*)((\\)begin)(\{)(lstlisting)(\})(?:(\[).*(\]))?(\s*%.*\n?)?
|
130
|
+
contentName: source.python.embedded
|
131
|
+
end: ((\\)end)(\{)(lstlisting)(\})
|
132
|
+
patterns:
|
133
|
+
- include: source.python
|
134
|
+
comment: Put the lstlisting match before the more general environment listing. Someday it would be nice to make this rule general enough to figure out which language is inside the lstlisting environment rather than my own personal use for python. --Brad
|
135
|
+
- name: meta.function.verbatim.latex
|
136
|
+
captures:
|
137
|
+
"1":
|
138
|
+
name: support.function.be.latex
|
139
|
+
"2":
|
140
|
+
name: punctuation.definition.function.latex
|
141
|
+
"3":
|
142
|
+
name: punctuation.definition.arguments.begin.latex
|
143
|
+
"4":
|
144
|
+
name: variable.parameter.function.latex
|
145
|
+
"5":
|
146
|
+
name: punctuation.definition.arguments.end.latex
|
147
|
+
begin: (?:\s*)((\\)begin)(\{)((?:V|v)erbatim)(\})
|
148
|
+
contentName: markup.raw.verbatim.latex
|
149
|
+
end: ((\\)end)(\{)(\4)(\})
|
150
|
+
- name: meta.function.begin-document.latex
|
151
|
+
captures:
|
152
|
+
"1":
|
153
|
+
name: support.function.be.latex
|
154
|
+
"2":
|
155
|
+
name: punctuation.definition.function.latex
|
156
|
+
"3":
|
157
|
+
name: punctuation.definition.arguments.begin.latex
|
158
|
+
"4":
|
159
|
+
name: variable.parameter.function.latex
|
160
|
+
"5":
|
161
|
+
name: punctuation.definition.arguments.end.latex
|
162
|
+
match: (?:\s*)((\\)begin)(\{)(document)(\})
|
163
|
+
comment: These two patterns match the \begin{document} and \end{document} commands, so that the environment matching pattern following them will ignore those commands.
|
164
|
+
- name: meta.function.end-document.latex
|
165
|
+
captures:
|
166
|
+
"1":
|
167
|
+
name: support.function.be.latex
|
168
|
+
"2":
|
169
|
+
name: punctuation.definition.function.latex
|
170
|
+
"3":
|
171
|
+
name: punctuation.definition.arguments.begin.latex
|
172
|
+
"4":
|
173
|
+
name: variable.parameter.function.latex
|
174
|
+
"5":
|
175
|
+
name: punctuation.definition.arguments.end.latex
|
176
|
+
match: (?:\s*)((\\)end)(\{)(document)(\})
|
177
|
+
- name: meta.function.environment.math.latex
|
178
|
+
captures:
|
179
|
+
"1":
|
180
|
+
name: support.function.be.latex
|
181
|
+
"2":
|
182
|
+
name: punctuation.definition.function.latex
|
183
|
+
"3":
|
184
|
+
name: punctuation.definition.arguments.begin.latex
|
185
|
+
"4":
|
186
|
+
name: variable.parameter.function.latex
|
187
|
+
"5":
|
188
|
+
name: punctuation.definition.arguments.end.latex
|
189
|
+
begin: "(?x)\n\
|
190
|
+
\t\t\t\t\t(?:\\s*)\t\t\t\t\t\t\t\t\t\t# Optional whitespace\n\
|
191
|
+
\t\t\t\t\t((\\\\)begin)\t\t\t\t\t\t\t\t\t# Marker - Function\n\
|
192
|
+
\t\t\t\t\t(\\{)\t\t\t\t\t\t\t\t\t\t# Open Bracket\n\
|
193
|
+
\t\t\t\t\t\t(\n\
|
194
|
+
\t\t\t\t\t\t\t(?:\n\
|
195
|
+
\t\t\t\t\t\t\t\talign|equation|eqnarray\t\t\t# Argument\n\
|
196
|
+
\t\t\t\t\t\t\t | multline|aligned|alignat\n\
|
197
|
+
\t\t\t\t\t\t\t | split|gather|gathered\n\
|
198
|
+
\t\t\t\t\t\t\t)\n\
|
199
|
+
\t\t\t\t\t\t\t(?:\\*)?\t\t\t\t\t\t\t\t# Optional Unnumbered\n\
|
200
|
+
\t\t\t\t\t\t)\n\
|
201
|
+
\t\t\t\t\t(\\})\t\t\t\t\t\t\t\t\t\t# Close Bracket\n\
|
202
|
+
\t\t\t\t\t(\\s*\\n)?\t\t\t\t# Match to end of line absent of content\n\
|
203
|
+
\t\t\t\t"
|
204
|
+
contentName: string.other.math.block.environment.latex
|
205
|
+
end: "(?x)\n\
|
206
|
+
\t\t\t\t\t(?:\\s*)\t\t\t\t\t\t\t\t\t\t# Optional whitespace\n\
|
207
|
+
\t\t\t\t\t((\\\\)end)\t\t\t\t\t\t\t\t\t# Marker - Function\n\
|
208
|
+
\t\t\t\t\t(\\{)\t\t\t\t\t\t\t\t\t\t# Open Bracket\n\
|
209
|
+
\t\t\t\t\t\t(\\4)\t\t\t\t# Previous capture from begin\n\
|
210
|
+
\t\t\t\t\t(\\})\t\t\t\t\t\t\t\t\t\t# Close Bracket\n\
|
211
|
+
\t\t\t\t\t(?:\\s*\\n)?\t\t\t\t# Match to end of line absent of content\n\
|
212
|
+
\t\t\t\t"
|
213
|
+
patterns:
|
214
|
+
- include: $base
|
215
|
+
- name: meta.function.environment.tabular.latex
|
216
|
+
captures:
|
217
|
+
"1":
|
218
|
+
name: support.function.be.latex
|
219
|
+
"2":
|
220
|
+
name: punctuation.definition.function.latex
|
221
|
+
"3":
|
222
|
+
name: punctuation.definition.arguments.begin.latex
|
223
|
+
"4":
|
224
|
+
name: variable.parameter.function.latex
|
225
|
+
"5":
|
226
|
+
name: punctuation.definition.arguments.end.latex
|
227
|
+
begin: "(?x)\n\
|
228
|
+
\t\t\t\t\t(?:\\s*)\t\t\t\t\t\t\t\t\t\t# Optional whitespace\n\
|
229
|
+
\t\t\t\t\t((\\\\)begin)\t\t\t\t\t\t\t\t\t# Marker - Function\n\
|
230
|
+
\t\t\t\t\t(\\{)\t\t\t\t\t\t\t\t\t\t# Open Bracket\n\
|
231
|
+
\t\t\t\t\t\t(array|tabular[xy*]?)\n\
|
232
|
+
\t\t\t\t\t(\\})\t\t\t\t\t\t\t\t\t\t# Close Bracket\n\
|
233
|
+
\t\t\t\t\t(\\s*\\n)?\t\t\t\t# Match to end of line absent of content\n\
|
234
|
+
\t\t\t\t"
|
235
|
+
contentName: meta.data.environment.tabular.latex
|
236
|
+
end: "(?x)\n\
|
237
|
+
\t\t\t\t\t(?:\\s*)\t\t\t\t\t\t\t\t\t\t# Optional whitespace\n\
|
238
|
+
\t\t\t\t\t((\\\\)end)\t\t\t\t\t\t\t\t\t# Marker - Function\n\
|
239
|
+
\t\t\t\t\t(\\{)\t\t\t\t\t\t\t\t\t\t# Open Bracket\n\
|
240
|
+
\t\t\t\t\t\t(\\4)\t\t\t\t# Previous capture from begin\n\
|
241
|
+
\t\t\t\t\t(\\})\t\t\t\t\t\t\t\t\t\t# Close Bracket\n\
|
242
|
+
\t\t\t\t\t(?:\\s*\\n)?\t\t\t\t# Match to end of line absent of content\n\
|
243
|
+
\t\t\t\t"
|
244
|
+
patterns:
|
245
|
+
- name: punctuation.definition.table.row.latex
|
246
|
+
match: \\
|
247
|
+
- name: meta.row.environment.tabular.latex
|
248
|
+
begin: (?:^|(?<=\\\\))(?!\\\\|\s*\\end\{(?:tabular|array))
|
249
|
+
end: (?=\\\\|\s*\\end\{(?:tabular|array))
|
250
|
+
patterns:
|
251
|
+
- name: punctuation.definition.table.cell.latex
|
252
|
+
match: "&"
|
253
|
+
- name: meta.cell.environment.tabular.latex
|
254
|
+
begin: (?:^|(?<=&))((?!&|\\\\|$))
|
255
|
+
end: (?=&|\\\\|\s*\\end\{(?:tabular|array))
|
256
|
+
patterns:
|
257
|
+
- include: $base
|
258
|
+
- include: $base
|
259
|
+
- include: $base
|
260
|
+
- name: meta.function.environment.list.latex
|
261
|
+
captures:
|
262
|
+
"1":
|
263
|
+
name: support.function.be.latex
|
264
|
+
"2":
|
265
|
+
name: punctuation.definition.function.latex
|
266
|
+
"3":
|
267
|
+
name: punctuation.definition.arguments.latex
|
268
|
+
"4":
|
269
|
+
name: variable.parameter.function.latex
|
270
|
+
"5":
|
271
|
+
name: punctuation.definition.arguments.latex
|
272
|
+
begin: (?:\s*)((\\)begin)(\{)(itemize|enumerate|description|list)(\})
|
273
|
+
end: ((\\)end)(\{)(\4)(\})(?:\s*\n)?
|
274
|
+
patterns:
|
275
|
+
- include: $base
|
276
|
+
- name: meta.function.environment.general.latex
|
277
|
+
captures:
|
278
|
+
"1":
|
279
|
+
name: support.function.be.latex
|
280
|
+
"2":
|
281
|
+
name: punctuation.definition.function.latex
|
282
|
+
"3":
|
283
|
+
name: punctuation.definition.arguments.latex
|
284
|
+
"4":
|
285
|
+
name: variable.parameter.function.latex
|
286
|
+
"5":
|
287
|
+
name: punctuation.definition.arguments.latex
|
288
|
+
begin: (?:\s*)((\\)begin)(\{)(\w+[*]?)(\})
|
289
|
+
end: ((\\)end)(\{)(\4)(\})(?:\s*\n)?
|
290
|
+
patterns:
|
291
|
+
- include: $base
|
292
|
+
- name: storage.type.function.latex
|
293
|
+
captures:
|
294
|
+
"1":
|
295
|
+
name: punctuation.definition.function.latex
|
296
|
+
match: (\\)(newcommand|renewcommand)\b
|
297
|
+
- endCaptures:
|
298
|
+
"0":
|
299
|
+
name: punctuation.definition.marginpar.end.latex
|
300
|
+
begin: ((\\)marginpar)(\{)
|
301
|
+
contentName: meta.paragraph.margin.latex
|
302
|
+
beginCaptures:
|
303
|
+
"1":
|
304
|
+
name: support.function.marginpar.latex
|
305
|
+
"2":
|
306
|
+
name: punctuation.definition.function.latex
|
307
|
+
"3":
|
308
|
+
name: punctuation.definition.marginpar.begin.latex
|
309
|
+
end: \}
|
310
|
+
patterns:
|
311
|
+
- include: $base
|
312
|
+
- endCaptures:
|
313
|
+
"0":
|
314
|
+
name: punctuation.definition.footnote.end.latex
|
315
|
+
begin: ((\\)footnote)(\{)
|
316
|
+
contentName: meta.footnote.latex
|
317
|
+
beginCaptures:
|
318
|
+
"1":
|
319
|
+
name: support.function.footnote.latex
|
320
|
+
"2":
|
321
|
+
name: punctuation.definition.function.latex
|
322
|
+
"3":
|
323
|
+
name: punctuation.definition.footnote.begin.latex
|
324
|
+
end: \}
|
325
|
+
patterns:
|
326
|
+
- include: $base
|
327
|
+
- name: meta.function.emph.latex
|
328
|
+
endCaptures:
|
329
|
+
"0":
|
330
|
+
name: punctuation.definition.emph.end.latex
|
331
|
+
begin: ((\\)emph)(\{)
|
332
|
+
contentName: markup.italic.emph.latex
|
333
|
+
beginCaptures:
|
334
|
+
"1":
|
335
|
+
name: support.function.emph.latex
|
336
|
+
"2":
|
337
|
+
name: punctuation.definition.function.latex
|
338
|
+
"3":
|
339
|
+
name: punctuation.definition.emph.begin.latex
|
340
|
+
end: \}
|
341
|
+
patterns:
|
342
|
+
- include: $base
|
343
|
+
- name: meta.function.textit.latex
|
344
|
+
endCaptures:
|
345
|
+
"0":
|
346
|
+
name: punctuation.definition.textit.end.latex
|
347
|
+
captures:
|
348
|
+
"1":
|
349
|
+
name: support.function.textit.latex
|
350
|
+
"2":
|
351
|
+
name: punctuation.definition.function.latex
|
352
|
+
"3":
|
353
|
+
name: punctuation.definition.textit.begin.latex
|
354
|
+
begin: ((\\)textit)(\{)
|
355
|
+
contentName: markup.italic.textit.latex
|
356
|
+
end: \}
|
357
|
+
patterns:
|
358
|
+
- include: $base
|
359
|
+
comment: "We put the keyword in a capture and name this capture, so that disabling spell checking for \xE2\x80\x9Ckeyword\xE2\x80\x9D won't be inherited by the argument to \\textit{...}.\n\n\
|
360
|
+
Put specific matches for particular LaTeX keyword.functions before the last two more general functions"
|
361
|
+
- name: meta.function.textbf.latex
|
362
|
+
endCaptures:
|
363
|
+
"0":
|
364
|
+
name: punctuation.definition.textbf.end.latex
|
365
|
+
captures:
|
366
|
+
"1":
|
367
|
+
name: support.function.textbf.latex
|
368
|
+
"2":
|
369
|
+
name: punctuation.definition.function.latex
|
370
|
+
"3":
|
371
|
+
name: punctuation.definition.textbf.begin.latex
|
372
|
+
begin: ((\\)textbf)(\{)
|
373
|
+
contentName: markup.bold.textbf.latex
|
374
|
+
end: \}
|
375
|
+
patterns:
|
376
|
+
- include: $base
|
377
|
+
- name: meta.function.texttt.latex
|
378
|
+
endCaptures:
|
379
|
+
"0":
|
380
|
+
name: punctuation.definition.texttt.end.latex
|
381
|
+
captures:
|
382
|
+
"1":
|
383
|
+
name: support.function.texttt.latex
|
384
|
+
"2":
|
385
|
+
name: punctuation.definition.function.latex
|
386
|
+
"3":
|
387
|
+
name: punctuation.definition.texttt.begin.latex
|
388
|
+
begin: ((\\)texttt)(\{)
|
389
|
+
contentName: markup.raw.texttt.latex
|
390
|
+
end: \}
|
391
|
+
patterns:
|
392
|
+
- include: $base
|
393
|
+
- name: meta.scope.item.latex
|
394
|
+
captures:
|
395
|
+
"0":
|
396
|
+
name: keyword.other.item.latex
|
397
|
+
"1":
|
398
|
+
name: punctuation.definition.keyword.latex
|
399
|
+
match: (\\)item\b
|
400
|
+
- name: meta.citation.latex
|
401
|
+
endCaptures:
|
402
|
+
"0":
|
403
|
+
name: punctuation.definition.arguments.latex
|
404
|
+
captures:
|
405
|
+
"6":
|
406
|
+
name: punctuation.definition.arguments.optional.end.latex
|
407
|
+
"7":
|
408
|
+
name: punctuation.definition.arguments.latex
|
409
|
+
"1":
|
410
|
+
name: keyword.control.cite.latex
|
411
|
+
"2":
|
412
|
+
name: punctuation.definition.keyword.latex
|
413
|
+
"3":
|
414
|
+
name: punctuation.definition.arguments.optional.begin.latex
|
415
|
+
"4":
|
416
|
+
name: punctuation.definition.arguments.optional.end.latex
|
417
|
+
"5":
|
418
|
+
name: punctuation.definition.arguments.optional.begin.latex
|
419
|
+
begin: "(?x)\n\
|
420
|
+
\t\t\t\t\t(\n\
|
421
|
+
\t\t\t\t\t\t(\\\\)\t\t\t\t\t\t\t\t\t\t# Marker\n\
|
422
|
+
\t\t\t\t\t\t(?:foot)?(?:full)?(?:no)?(?:short)?\t\t# Function Name\n\
|
423
|
+
\t\t\t\t\t\tcite\n\
|
424
|
+
\t\t\t\t\t\t(?:al)?(?:t|p|author|year(?:par)?|title)?[ANP]*\n\
|
425
|
+
\t\t\t\t\t\t\\*?\t\t\t\t\t\t\t\t\t\t\t# Optional Unabreviated\n\
|
426
|
+
\t\t\t\t\t)\n\
|
427
|
+
\t\t\t\t\t(?:(\\[)[^\\]]*(\\]))?\t\t\t\t\t\t\t\t# Optional\n\
|
428
|
+
\t\t\t\t\t(?:(\\[)[^\\]]*(\\]))?\t\t\t\t\t\t\t\t# Arguments\n\
|
429
|
+
\t\t\t\t\t(\\{)\t\t\t\t\t\t\t\t\t\t\t# Opening Bracket\n\
|
430
|
+
\t\t\t\t"
|
431
|
+
end: \}
|
432
|
+
patterns:
|
433
|
+
- name: constant.other.reference.citation.latex
|
434
|
+
match: "[\\w:.]+"
|
435
|
+
- name: meta.reference.label.latex
|
436
|
+
endCaptures:
|
437
|
+
"0":
|
438
|
+
name: punctuation.definition.arguments.begin.latex
|
439
|
+
begin: ((\\)(?:\w*[r|R]ef\*?))(\{)
|
440
|
+
beginCaptures:
|
441
|
+
"1":
|
442
|
+
name: keyword.control.ref.latex
|
443
|
+
"2":
|
444
|
+
name: punctuation.definition.keyword.latex
|
445
|
+
"3":
|
446
|
+
name: punctuation.definition.arguments.begin.latex
|
447
|
+
end: \}
|
448
|
+
patterns:
|
449
|
+
- name: constant.other.reference.label.latex
|
450
|
+
match: "[a-zA-Z0-9\\.,:/*!^_-]"
|
451
|
+
- name: meta.definition.label.latex
|
452
|
+
endCaptures:
|
453
|
+
"0":
|
454
|
+
name: punctuation.definition.arguments.end.latex
|
455
|
+
begin: ((\\)label)(\{)
|
456
|
+
beginCaptures:
|
457
|
+
"1":
|
458
|
+
name: keyword.control.label.latex
|
459
|
+
"2":
|
460
|
+
name: punctuation.definition.keyword.latex
|
461
|
+
"3":
|
462
|
+
name: punctuation.definition.arguments.begin.latex
|
463
|
+
end: \}
|
464
|
+
patterns:
|
465
|
+
- name: variable.parameter.definition.label.latex
|
466
|
+
match: "[a-zA-Z0-9\\.,:/*!^_-]"
|
467
|
+
- name: meta.function.verb.latex
|
468
|
+
captures:
|
469
|
+
"1":
|
470
|
+
name: support.function.verb.latex
|
471
|
+
"2":
|
472
|
+
name: punctuation.definition.function.latex
|
473
|
+
"3":
|
474
|
+
name: punctuation.definition.verb.latex
|
475
|
+
"4":
|
476
|
+
name: markup.raw.verb.latex
|
477
|
+
"5":
|
478
|
+
name: punctuation.definition.verb.latex
|
479
|
+
match: ((\\)verb[\*]?)\s*((?<=\s)\S|[^a-zA-Z])(.*?)(\3|$)
|
480
|
+
- name: string.quoted.double.european.latex
|
481
|
+
endCaptures:
|
482
|
+
"0":
|
483
|
+
name: punctuation.definition.string.end.latex
|
484
|
+
begin: "\"`"
|
485
|
+
beginCaptures:
|
486
|
+
"0":
|
487
|
+
name: punctuation.definition.string.begin.latex
|
488
|
+
end: "\"'"
|
489
|
+
patterns:
|
490
|
+
- include: $base
|
491
|
+
- name: string.quoted.double.latex
|
492
|
+
endCaptures:
|
493
|
+
"0":
|
494
|
+
name: punctuation.definition.string.end.latex
|
495
|
+
begin: "``"
|
496
|
+
beginCaptures:
|
497
|
+
"0":
|
498
|
+
name: punctuation.definition.string.begin.latex
|
499
|
+
end: "''|\""
|
500
|
+
patterns:
|
501
|
+
- include: $base
|
502
|
+
- name: string.quoted.double.guillemot.latex
|
503
|
+
endCaptures:
|
504
|
+
"0":
|
505
|
+
name: punctuation.definition.string.end.latex
|
506
|
+
begin: "\">"
|
507
|
+
beginCaptures:
|
508
|
+
"0":
|
509
|
+
name: punctuation.definition.string.begin.latex
|
510
|
+
end: "\"<"
|
511
|
+
patterns:
|
512
|
+
- include: $base
|
513
|
+
- name: string.quoted.double.guillemot.latex
|
514
|
+
endCaptures:
|
515
|
+
"0":
|
516
|
+
name: punctuation.definition.string.end.latex
|
517
|
+
begin: "\"<"
|
518
|
+
beginCaptures:
|
519
|
+
"0":
|
520
|
+
name: punctuation.definition.string.begin.latex
|
521
|
+
end: "\">"
|
522
|
+
patterns:
|
523
|
+
- include: $base
|
524
|
+
- name: string.other.math.latex
|
525
|
+
endCaptures:
|
526
|
+
"0":
|
527
|
+
name: punctuation.definition.string.end.latex
|
528
|
+
begin: \\\(
|
529
|
+
beginCaptures:
|
530
|
+
"0":
|
531
|
+
name: punctuation.definition.string.begin.latex
|
532
|
+
end: \\\)
|
533
|
+
patterns:
|
534
|
+
- include: $base
|
535
|
+
- name: string.other.math.latex
|
536
|
+
endCaptures:
|
537
|
+
"0":
|
538
|
+
name: punctuation.definition.string.end.latex
|
539
|
+
begin: \\\[
|
540
|
+
beginCaptures:
|
541
|
+
"0":
|
542
|
+
name: punctuation.definition.string.begin.latex
|
543
|
+
end: \\\]
|
544
|
+
patterns:
|
545
|
+
- include: $base
|
546
|
+
- name: meta.escape-character.latex
|
547
|
+
match: \\$
|
548
|
+
- name: invalid.illegal.string.quoted.single.latex
|
549
|
+
match: (?<!\S)'.*?'
|
550
|
+
- name: invalid.illegal.string.quoted.double.latex
|
551
|
+
match: (?<!\S)".*?"
|
552
|
+
- name: constant.character.latex
|
553
|
+
captures:
|
554
|
+
"1":
|
555
|
+
name: punctuation.definition.constant.latex
|
556
|
+
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
|
557
|
+
- name: meta.column-specials.latex
|
558
|
+
captures:
|
559
|
+
"1":
|
560
|
+
name: punctuation.definition.column-specials.begin.latex
|
561
|
+
"2":
|
562
|
+
name: punctuation.definition.column-specials.end.latex
|
563
|
+
match: (?:<|>)(\{)\$(\})
|
564
|
+
- include: text.tex
|
565
|
+
foldingStopMarker: \\end\{.*\}|%.*\(end\)\s*$
|
566
|
+
keyEquivalent: ^~L
|