From eaff98afea7d2a1d49b39bfb495dc23b11371063 Mon Sep 17 00:00:00 2001 From: ngc92 <7938269+ngc92@users.noreply.github.com> Date: Sun, 4 Jun 2023 12:39:53 +0200 Subject: [PATCH 1/3] use support.function --- LaTeX/TeX.sublime-syntax | 4 +- LaTeX/tests/syntax_test_latex.xparse.tex | 4 +- LaTeX/tests/syntax_test_tex.tex | 300 +++++++++++------------ 3 files changed, 154 insertions(+), 154 deletions(-) diff --git a/LaTeX/TeX.sublime-syntax b/LaTeX/TeX.sublime-syntax index bd6c2facba..0c110098e0 100644 --- a/LaTeX/TeX.sublime-syntax +++ b/LaTeX/TeX.sublime-syntax @@ -287,14 +287,14 @@ contexts: tex-constants: - match: (\\){{constants}}{{endcs}} - scope: constant.language.tex + scope: support.function.tex captures: 1: punctuation.definition.backslash.tex push: - tex-dimension-value - tex-assignment - match: (\\){{macroconst}}{{endcs}} - scope: constant.language.tex + scope: support.function.tex captures: 1: punctuation.definition.backslash.tex diff --git a/LaTeX/tests/syntax_test_latex.xparse.tex b/LaTeX/tests/syntax_test_latex.xparse.tex index 3d9ea4edec..03a275c954 100644 --- a/LaTeX/tests/syntax_test_latex.xparse.tex +++ b/LaTeX/tests/syntax_test_latex.xparse.tex @@ -216,8 +216,8 @@ % ^^ variable.parameter.tex % ^ punctuation.definition.placeholder.tex % ^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^^^^^ constant.language.tex -% ^^^^^^^^ constant.language.tex +% ^^^^^ support.function.tex +% ^^^^^^^^ support.function.tex % ^ punctuation.definition.backslash.tex % ^ punctuation.definition.backslash.tex % ^^^ meta.number.integer.decimal.tex diff --git a/LaTeX/tests/syntax_test_tex.tex b/LaTeX/tests/syntax_test_tex.tex index f5a23bc1e1..834649bf25 100644 --- a/LaTeX/tests/syntax_test_tex.tex +++ b/LaTeX/tests/syntax_test_tex.tex @@ -410,135 +410,135 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \pretolerance=100 -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^^ meta.number.integer.decimal.tex constant.numeric.value.tex \tolerance=200 -%^^^^^^^^^ constant.language.tex +%^^^^^^^^^ support.function.tex \hbadness=1000 -%^^^^^^^^ constant.language.tex +%^^^^^^^^ support.function.tex \vbadness=1000 -%^^^^^^^^ constant.language.tex +%^^^^^^^^ support.function.tex \linepenalty=10 -%^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^ support.function.tex \hyphenpenalty=50 -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \exhyphenpenalty=50 -%^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^ support.function.tex \binoppenalty=700 -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex \relpenalty=500 -%^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^ support.function.tex \clubpenalty=150 -%^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^ support.function.tex \widowpenalty=150 -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex \displaywidowpenalty=50 -%^^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^^ support.function.tex \brokenpenalty=100 -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \predisplaypenalty=10000 -%^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^ support.function.tex \postdisplaypenalty=0 -%^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^ support.function.tex \interlinepenalty=0 -%^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^ support.function.tex \floatingpenalty=0 -%^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^ support.function.tex \outputpenalty=0 -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \doublehyphendemerits=10000 -%^^^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^^^ support.function.tex \finalhyphendemerits=5000 -%^^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^^ support.function.tex \adjdemerits=10000 -%^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^ support.function.tex \looseness=0 -%^^^^^^^^^ constant.language.tex +%^^^^^^^^^ support.function.tex \pausing=0 -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex \holdinginserts=0 -%^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^ support.function.tex \tracingonline=0 -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \tracingmacros=0 -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \tracingstats=0 -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex \tracingparagraphs=0 -%^^^^^^^^^^^^^^^^^constant.language.tex +%^^^^^^^^^^^^^^^^^support.function.tex \tracingpages=0 -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex \tracingoutput=0 -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \tracinglostchars=1 -%^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^ support.function.tex \tracingcommands=0 -%^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^ support.function.tex \tracingrestores=0 -%^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^ support.function.tex \language=0 -%^^^^^^^^ constant.language.tex +%^^^^^^^^ support.function.tex \uchyph=1 -%^^^^^^ constant.language.tex +%^^^^^^ support.function.tex \lefthyphenmin=2 -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \righthyphenmin=3 -%^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^ support.function.tex \globaldefs=0 -%^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^ support.function.tex \maxdeadcycles=25 -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \hangafter=1 -%^^^^^^^^^ constant.language.tex +%^^^^^^^^^ support.function.tex \fam=0 -%^^^ constant.language.tex +%^^^ support.function.tex \mag=1000 -%^^^ constant.language.tex +%^^^ support.function.tex \escapechar=`\\ -%^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^^ meta.number.integer % ^ keyword.operator.tex % ^ punctuation.definition.backslash.tex % ^ constant.character.tex \defaulthyphenchar=`\- -%^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^ support.function.tex \defaultskewchar=-1 -%^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^ meta.number.integer.decimal.tex constant.numeric.value.tex \endlinechar=`\^^M -%^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^ support.function.tex \newlinechar=-1 -%^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^ support.function.tex \delimiterfactor=901 -%^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^ support.function.tex \time -%^^^^ constant.language.tex +%^^^^ support.function.tex \day -%^^^ constant.language.tex +%^^^ support.function.tex \month -%^^^^^ constant.language.tex +%^^^^^ support.function.tex \year -%^^^^ constant.language.tex +%^^^^ support.function.tex \showboxbreadth=5 -%^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^ support.function.tex \showboxdepth=3 -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex \errorcontextlines=5 -%^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^ support.function.tex \hfuzz=0.1pt -%^^^^^ constant.language.tex +%^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^^^^ meta.number.float.decimal.tex % ^^^ constant.numeric.value.tex % ^ punctuation.separator.decimal.tex % ^^ constant.numeric.suffix.tex \vfuzz=0.1 pt -%^^^^^ constant.language.tex +%^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^^^^^ meta.number.float.decimal.tex % ^^^ constant.numeric.value.tex @@ -547,7 +547,7 @@ % check that we can put comment-based line breaks here \overfullrule=% -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex 5pt % ^^^ meta.number.integer.decimal.tex @@ -555,21 +555,21 @@ % ^^ constant.numeric.suffix.tex \hsize=6.5in -%^^^^^ constant.language.tex +%^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^^^^ meta.number.float.decimal.tex % ^^^ constant.numeric.value.tex % ^ punctuation.separator.decimal.tex % ^^ constant.numeric.suffix.tex \vsize=8.9in -%^^^^^ constant.language.tex +%^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^^^^ meta.number.float.decimal.tex % ^^^ constant.numeric.value.tex % ^ punctuation.separator.decimal.tex % ^^ constant.numeric.suffix.tex \maxdepth=.4pt -%^^^^^^^^ constant.language.tex +%^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^^^ meta.number.float.decimal.tex % ^^ constant.numeric.value.tex @@ -578,43 +578,43 @@ \splitmaxdepth=\maxdimen -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex -% ^^^^^^^^^ constant.language.tex +% ^^^^^^^^^ support.function.tex % ^ punctuation.definition.backslash.tex \boxmaxdepth=\maxdimen -%^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^ support.function.tex \lineskiplimit=0pt -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \delimitershortfall=5pt -%^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^ support.function.tex \nulldelimiterspace=1.2pt -%^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^ support.function.tex \scriptspace=0.5pt -%^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^ support.function.tex \mathsurround=0pt -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex \predisplaysize=0pt -%^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^ support.function.tex \displaywidth=0pt -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex \displayindent=0pt -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \parindent=20pt -%^^^^^^^^^ constant.language.tex +%^^^^^^^^^ support.function.tex \hangindent=0pt -%^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^ support.function.tex \hoffset=0pt -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex \voffset=0pt -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex \baselineskip=0pt -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex \lineskip=0pt -%^^^^^^^^ constant.language.tex +%^^^^^^^^ support.function.tex \parskip=0pt plus 1pt -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^ meta.number.integer.decimal.tex constant.numeric.value.tex % ^^ constant.numeric.suffix.tex @@ -623,7 +623,7 @@ % ^^ constant.numeric.suffix.tex \abovedisplayskip=12pt plus 3pt minus 9pt -%^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^ meta.number.integer.decimal.tex constant.numeric.value.tex % ^^ constant.numeric.suffix.tex @@ -634,27 +634,27 @@ % ^ meta.number.integer.decimal.tex constant.numeric.value.tex % ^^ constant.numeric.suffix.tex \abovedisplayshortskip=0pt plus 3pt -%^^^^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^^^^ support.function.tex \belowdisplayskip=12pt plus 3pt minus 9pt -%^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^ support.function.tex \belowdisplayshortskip=7pt plus 3pt minus 4pt -%^^^^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^^^^ support.function.tex \leftskip=0pt -%^^^^^^^^ constant.language.tex +%^^^^^^^^ support.function.tex \rightskip=0pt -%^^^^^^^^^ constant.language.tex +%^^^^^^^^^ support.function.tex \topskip=10pt -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex \splittopskip=10pt -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex \tabskip=0pt -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex \spaceskip=0pt -%^^^^^^^^^ constant.language.tex +%^^^^^^^^^ support.function.tex \xspaceskip=0pt -%^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^ support.function.tex \parfillskip=0pt plus 1fil -%^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^ meta.number.integer.decimal.tex constant.numeric.value.tex % ^^ constant.numeric.suffix.tex @@ -664,13 +664,13 @@ \thinmuskip=3mu -%^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^ meta.number.integer.decimal.tex constant.numeric.value.tex % ^^ constant.numeric.suffix.tex \medmuskip=4mu plus 2mu minus 4mu -%^^^^^^^^^ constant.language.tex +%^^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^ meta.number.integer.decimal.tex constant.numeric.value.tex % ^^ constant.numeric.suffix.tex @@ -681,90 +681,90 @@ % ^ meta.number.integer.decimal.tex constant.numeric.value.tex % ^^ constant.numeric.suffix.tex \thickmuskip=5mu plus 5mu -%^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^ support.function.tex \smallskipamount=3pt plus 1pt minus 1pt -%^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^ support.function.tex \medskipamount=6pt plus 2pt minus 2pt -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \bigskipamount=12pt plus 4pt minus 4pt -%^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^ support.function.tex \normalbaselineskip=12pt -%^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^ support.function.tex \normallineskip=1pt -%^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^ support.function.tex \normallineskiplimit=0pt -%^^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^^ support.function.tex \jot=3pt -%^^^ constant.language.tex +%^^^ support.function.tex \interdisplaylinepenalty=100 -%^^^^^^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^^^^^^ support.function.tex \interfootnotelinepenalty=100 -%^^^^^^^^^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^^^^^^^^^ support.function.tex \maxdimen -%^^^^^^^^ constant.language.tex +%^^^^^^^^ support.function.tex \centering -%^^^^^^^^^ constant.language.tex +%^^^^^^^^^ support.function.tex \p@ -%^^ constant.language.tex +%^^ support.function.tex \z@ -%^^ constant.language.tex +%^^ support.function.tex \z@skip -%^^^^^^ constant.language.tex +%^^^^^^ support.function.tex \voidb@x -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex \magstephalf -%^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^ support.function.tex \magstep4 -%^^^^^^^^ constant.language.tex +%^^^^^^^^ support.function.tex \@ne -%^^^ constant.language.tex +%^^^ support.function.tex \tw@ -%^^^ constant.language.tex +%^^^ support.function.tex \thr@@ -%^^^^^ constant.language.tex +%^^^^^ support.function.tex \sixt@@n -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex \@cclv -%^^^^^ constant.language.tex +%^^^^^ support.function.tex \@cclvi -%^^^^^^ constant.language.tex +%^^^^^^ support.function.tex \@m -%^^ constant.language.tex +%^^ support.function.tex \@M -%^^ constant.language.tex +%^^ support.function.tex \@MM -%^^^ constant.language.tex +%^^^ support.function.tex \m@ne -%^^^^ constant.language.tex +%^^^^ support.function.tex \count@=255 -%^^^^^^ constant.language.tex +%^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^^ meta.number.integer.decimal.tex constant.numeric.value.tex \dimen@=0 -%^^^^^^ constant.language.tex +%^^^^^^ support.function.tex \dimen@i=1 -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex \dimen@ii=2 -%^^^^^^^^ constant.language.tex +%^^^^^^^^ support.function.tex \skip@=0 -%^^^^^ constant.language.tex +%^^^^^ support.function.tex \toks@=0 -%^^^^^ constant.language.tex +%^^^^^ support.function.tex % Assignments without equals sign \baselineskip-1000\p@ -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex % ^^^^^ meta.number.integer.decimal.tex constant.numeric.value.tex % ^ keyword.operator.arithmetic.tex -% ^^^ constant.language.tex +% ^^^ support.function.tex % ^ punctuation.definition.backslash.tex % Using weird ways to specify a number \abovedisplayskip=`\^^Z ex -%^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^^^^^^ meta.number.integer.decimal.tex % ^ keyword.operator.tex @@ -773,7 +773,7 @@ % ^^ constant.numeric.suffix.tex \abovedisplayskip=`\a ex -%^^^^^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^^^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^^^^^^ meta.number.integer.decimal.tex % ^ keyword.operator.tex @@ -784,43 +784,43 @@ % The macro-type constants. They cannot be assigned using = \thinspace=5pt -%^^^^^^^^^ constant.language.tex +%^^^^^^^^^ support.function.tex % ^ - keyword.operator.assignment.tex \negthinspace -%^^^^^^^^^^^^ constant.language.tex +%^^^^^^^^^^^^ support.function.tex \enspace -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex \enskip -%^^^^^^ constant.language.tex +%^^^^^^ support.function.tex \quad -%^^^^ constant.language.tex +%^^^^ support.function.tex \qquad -%^^^^^ constant.language.tex +%^^^^^ support.function.tex \smallskip -%^^^^^^^^^ constant.language.tex +%^^^^^^^^^ support.function.tex \medskip -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex \bigskip -%^^^^^^^ constant.language.tex +%^^^^^^^ support.function.tex \space -%^^^^^ constant.language.tex +%^^^^^ support.function.tex \empty -%^^^^^ constant.language.tex +%^^^^^ support.function.tex \null -%^^^^ constant.language.tex +%^^^^ support.function.tex \lq -%^^ constant.language.tex +%^^ support.function.tex \rq -%^^ constant.language.tex +%^^ support.function.tex \lbrack -%^^^^^^ constant.language.tex +%^^^^^^ support.function.tex \rbrack -%^^^^^^ constant.language.tex +%^^^^^^ support.function.tex % check that we don't pick it up if it is just the beginning of a word \jota -%^^^^ - constant.language.tex +%^^^^ - support.function.tex % Check that a number is required \jot=pt @@ -841,7 +841,7 @@ % will not be parsed as part of the quantity \jot=5pt \relax plus 10pt % ^^^^ - keyword.operator -%^^^ constant.language.tex +%^^^ support.function.tex % ^ keyword.operator.assignment.tex % ^ meta.number.integer.decimal.tex constant.numeric.value.tex % ^^ constant.numeric.suffix.tex @@ -858,7 +858,7 @@ % ^ punctuation.definition.backslash.tex % ^^^^^^^^^^^^^^^^^^^ meta.function.body.tex meta.group.brace.tex % ^ punctuation.definition.group.brace.begin.tex -% ^^^^^^^^^^^^^^^^^ constant.language.tex +% ^^^^^^^^^^^^^^^^^ support.function.tex % ^ punctuation.definition.backslash.tex % ^ punctuation.definition.group.brace.end.tex From 1129a0ac4428b96be883f594e44680c33468354f Mon Sep 17 00:00:00 2001 From: ngc92 <7938269+ngc92@users.noreply.github.com> Date: Sun, 4 Jun 2023 12:40:33 +0200 Subject: [PATCH 2/3] moved syntax test file --- LaTeX/{ => tests}/syntax_test_docstrip.ins | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LaTeX/{ => tests}/syntax_test_docstrip.ins (100%) diff --git a/LaTeX/syntax_test_docstrip.ins b/LaTeX/tests/syntax_test_docstrip.ins similarity index 100% rename from LaTeX/syntax_test_docstrip.ins rename to LaTeX/tests/syntax_test_docstrip.ins From d9a4f88ac3362cb65b35903dcba3aef90fdb5de7 Mon Sep 17 00:00:00 2001 From: ngc92 <7938269+ngc92@users.noreply.github.com> Date: Wed, 7 Dec 2022 00:30:43 +0200 Subject: [PATCH 3/3] updated math scoping --- LaTeX/LaTeX.sublime-syntax | 22 ++- LaTeX/TeX.sublime-syntax | 26 ++-- LaTeX/tests/syntax_test_latex.tex | 83 +++++++----- LaTeX/tests/syntax_test_tex.math.tex | 178 +++++++++++++++++++++++++ LaTeX/tests/syntax_test_tex.tex | 128 ------------------ Markdown/tests/syntax_test_markdown.md | 6 +- 6 files changed, 263 insertions(+), 180 deletions(-) create mode 100644 LaTeX/tests/syntax_test_tex.math.tex diff --git a/LaTeX/LaTeX.sublime-syntax b/LaTeX/LaTeX.sublime-syntax index b89483384b..0504e4963b 100644 --- a/LaTeX/LaTeX.sublime-syntax +++ b/LaTeX/LaTeX.sublime-syntax @@ -581,16 +581,22 @@ contexts: - include: inline-math-ensuremath inline-math-ensuremath: - - match: ((\\)ensuremath)(\{) + - match: (\\)ensuremath{{endcs}} + scope: support.function.ensuremath.latex captures: - 1: support.function.ensuremath.latex - 2: punctuation.definition.backslash.latex - 3: punctuation.definition.group.brace.begin.tex - push: inline-math-ensuremath-body + 1: punctuation.definition.backslash.latex + push: inline-math-ensuremath-begin + + inline-math-ensuremath-begin: + - meta_scope: meta.function.ensuremath.latex + - match: \{ + scope: punctuation.definition.group.brace.begin.tex + set: inline-math-ensuremath-body + - include: paragraph-pop inline-math-ensuremath-body: - meta_scope: meta.function.ensuremath.latex - - meta_content_scope: meta.environment.math.inline.ensuremath.latex + - meta_content_scope: meta.environment.math.inline.ensuremath.latex markup.math.inline - include: brace-group-end - include: math-content @@ -601,6 +607,7 @@ contexts: inline-math-parens-body: - meta_scope: meta.environment.math.inline.paren.latex + - meta_content_scope: markup.math.inline - include: inline-math-parens-end - include: math-content @@ -631,7 +638,7 @@ contexts: push: block-math-begin-end-command-body block-math-begin-end-command-body: - - meta_content_scope: meta.environment.math.block.be.latex + - meta_content_scope: meta.environment.math.block.be.latex markup.math.block - include: block-math-begin-end-command-end - include: math-content @@ -652,6 +659,7 @@ contexts: block-math-brackets-body: - meta_scope: meta.environment.math.block.bracket.latex + - meta_content_scope: markup.math.block - include: block-math-brackets-end - include: math-content diff --git a/LaTeX/TeX.sublime-syntax b/LaTeX/TeX.sublime-syntax index 0c110098e0..1f76a6fc1c 100644 --- a/LaTeX/TeX.sublime-syntax +++ b/LaTeX/TeX.sublime-syntax @@ -543,6 +543,7 @@ contexts: inline-math-dollar-body: - meta_scope: meta.environment.math.inline.dollar.tex + - meta_content_scope: markup.math.inline - include: inline-math-dollar-end - include: math-content @@ -558,6 +559,7 @@ contexts: block-math-dollar-body: - meta_scope: meta.environment.math.block.dollar.tex + - meta_content_scope: markup.math.block - include: block-math-dollar-end - include: math-content @@ -649,14 +651,16 @@ contexts: 1: punctuation.definition.backslash.tex math-operators: - - match: '[<>]=?' + # note: in math notation, = usually denotes that two terms are equal, instead + # of an assignment. + - match: '[<>]=?|=' scope: keyword.operator.comparison.tex - - match: '[-+*/^!]' + - match: '[-+*/!]' scope: keyword.operator.arithmetic.tex - - match: = - scope: keyword.operator.assignment.tex - match: _ - scope: punctuation.separator.indice.tex + scope: punctuation.separator.subscript.tex + - match: \^ + scope: punctuation.separator.superscript.tex math-braces: - match: \{ @@ -677,10 +681,14 @@ contexts: scope: punctuation.section.brackets.begin.tex - match: \] scope: punctuation.section.brackets.end.tex - - match: (\\)[{}] - scope: constant.character.escape.tex + - match: (\\){ + scope: punctuation.section.braces.begin.tex constant.character.escape.tex captures: - 1: punctuation.definition.escape.tex + 1: punctuation.definition.backslash.tex + - match: (\\)} + scope: punctuation.section.braces.end.tex constant.character.escape.tex + captures: + 1: punctuation.definition.backslash.tex math-numbers: - match: \d*(\.)\d+ @@ -692,7 +700,7 @@ contexts: math-variables: - match: '[A-Za-z]+' - scope: variable.other.math.tex + scope: variable.other.math.tex markup.italic.math.tex ###[ PROTOTYPES ]############################################################## diff --git a/LaTeX/tests/syntax_test_latex.tex b/LaTeX/tests/syntax_test_latex.tex index f166234c57..0d943f0eb8 100644 --- a/LaTeX/tests/syntax_test_latex.tex +++ b/LaTeX/tests/syntax_test_latex.tex @@ -762,47 +762,58 @@ \subsubsection{name} % Check we have always a shared environment -$f(x) = x^2$ -% <- meta.environment.math.inline.dollar.tex string.other.math.tex punctuation.definition.string.begin.tex -%^^^^^^^^^^ meta.environment.math.inline.dollar.tex - string -% ^ meta.environment.math.inline.dollar.tex string.other.math.tex punctuation.definition.string.end.tex -% ^ - meta.environment.math - -$$f(x) = x^2$$ -% <- meta.environment.math.block.dollar.tex string.other.math.tex punctuation.definition.string.begin.tex -%^ meta.environment.math.block.dollar.tex string.other.math.tex punctuation.definition.string.begin.tex -% ^^^^^^^^^^ meta.environment.math.block.dollar.tex - string -% ^^ meta.environment.math.block.dollar.tex string.other.math.tex punctuation.definition.string.end.tex -% ^ - meta.environment.math - -\(f(x) = x^2\) -% <- meta.environment.math.inline.paren.latex string.other.math.latex punctuation.definition.string.begin.latex -%^ meta.environment.math.inline.paren.latex string.other.math.latex punctuation.definition.string.begin.latex -% ^^^^^^^^^^ meta.environment.math.inline.paren.latex - string -% ^^ meta.environment.math.inline.paren.latex string.other.math.latex punctuation.definition.string.end.latex -% ^ - meta.environment.math - -\[ -% <- meta.environment.math.block.bracket.latex string.other.math.latex punctuation.definition.string.begin.latex -%^ meta.environment.math.block.bracket.latex string.other.math.latex punctuation.definition.string.begin.latex -% ^ meta.environment.math.block.bracket.latex - string + $f(x) = x^2$ +%^ string.other.math.tex punctuation.definition.string.begin.tex +%^^^^^^^^^^^^ meta.environment.math.inline.dollar.tex +% ^^^^^^^^^^ markup.math.inline - string +% ^ punctuation.definition.string.end.tex - markup.math.inline + + $$f(x) = x^2$$ +%^^ string.other.math.tex punctuation.definition.string.begin.tex +%^^^^^^^^^^^^^^ meta.environment.math.block.dollar.tex +% ^^^^^^^^^^ markup.math.block - string +% ^^ string.other.math.tex punctuation.definition.string.end.tex - markup.math.block + + \(f(x) = x^2\) +%^^^^^^^^^^^^^^ meta.environment.math.inline.paren.latex +% ^^^^^^^^^^ markup.math.inline - string +%^^ string.other.math.latex punctuation.definition.string.begin.latex +% ^^ string.other.math.latex punctuation.definition.string.end.latex - markup.math.inline + + + \[ +%^^ string.other.math.latex punctuation.definition.string.begin.latex f(x) = x^2 \text{ $f$ is a function} -%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.environment.math.block.bracket.latex -\] -% <- meta.environment.math.block.bracket.latex string.other.math.latex punctuation.definition.string.end.latex -%^ meta.environment.math.block.bracket.latex string.other.math.latex punctuation.definition.string.end.latex -% ^ - meta.environment.math +%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.environment.math.block.bracket.latex markup.math.block +% ^^^^^^^^^^ - string + \] +%^^ meta.environment.math.block.bracket.latex punctuation.definition.string.end.latex - markup.math.inline +% ^ - meta.environment.math \ensuremath{f(x) = x^2} % <- meta.function.ensuremath.latex support.function.ensuremath.latex punctuation.definition.backslash.latex -%^^^^^^^^^^ meta.function.ensuremath.latex -% ^ meta.function.ensuremath.latex - meta.environment.math -% ^^^^^^^^^^ meta.function.ensuremath.latex meta.environment.math.inline.ensuremath.latex -% ^ meta.function.ensuremath.latex - meta.environment.math +%^^^^^^^^^^^^^^^^^^^^^^ meta.function.ensuremath.latex +% ^ - meta.environment.math - markup.math +% ^^^^^^^^^^ meta.environment.math.inline.ensuremath.latex markup.math.inline +% ^ - meta.environment.math - markup.math %^^^^^^^^^^ support.function.ensuremath.latex % ^ punctuation.definition.group.brace.begin.tex % ^ punctuation.definition.group.brace.end.tex +\ensuremath % +%^^^^^^^^^^^^^ meta.function.ensuremath.latex +%^^^^^^^^^^ support.function.ensuremath.latex +% ^^ comment.line.percentage.tex + {x^2}{normal text} +%^^^^^^^^^ meta.function.ensuremath.latex +% ^ punctuation.definition.group.brace.begin.tex +% ^^^ meta.environment.math.inline.ensuremath.latex markup.math.inline +% ^ punctuation.definition.group.brace.end.tex +% ^^^^^^^^^^^^^ - meta.function.ensuremath.latex + +\ensuremaths{5} +% ^ - meta.function.ensuremath.latex + \begin{equation} % <- support.function.begin.latex keyword.control.flow.begin.latex punctuation.definition.backslash.latex %^^^^^ support.function.begin.latex keyword.control.flow.begin.latex @@ -820,6 +831,12 @@ \subsubsection{name} % ^ punctuation.definition.group.brace.end.tex +$\verb!$! \alpha$ +%^^^^^^^^^^^^^^^ meta.environment.math.inline.dollar.tex markup.math.inline +% ^ markup.raw.verb.latex +% ^^^^^^ keyword.other.math.greek.tex + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Boxes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/LaTeX/tests/syntax_test_tex.math.tex b/LaTeX/tests/syntax_test_tex.math.tex new file mode 100644 index 0000000000..3942f9e9b0 --- /dev/null +++ b/LaTeX/tests/syntax_test_tex.math.tex @@ -0,0 +1,178 @@ +% SYNTAX TEST "Packages/LaTeX/TeX.sublime-syntax" + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Inline Math +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + $f(x) = x^2$ +%^ string.other.math.tex punctuation.definition.string.begin.tex +%^^^^^^^^^^^^ meta.environment.math.inline.dollar.tex +% ^^^^^^^^^^ markup.math.inline - string +% ^ string.other.math.tex punctuation.definition.string.end.tex - markup.math.inline +% ^ variable.other.math.tex markup.italic.math.tex +% ^ punctuation.section.parens.begin.tex - markup.italic +% ^ variable.other.math.tex markup.italic.math.tex +% ^ punctuation.section.parens.end.tex - markup.italic +% ^^^ - markup.italic +% ^ variable.other.math.tex markup.italic.math.tex +% ^ - markup.italic + +$\iota$ +%^^^^^ keyword.other.math.greek.tex +%^ punctuation.definition.backslash.tex + +$\Iota$ +%^^^^^ support.function.math.tex - keyword.other +%^ punctuation.definition.backslash.tex + +$\alpha _$ +%^^^^^^ keyword.other.math.greek.tex +%^ punctuation.definition.backslash.tex +% ^ punctuation.separator.subscript.tex + +$\alpha_$ +%^^^^^^ keyword.other.math.greek.tex +%^ punctuation.definition.backslash.tex +% ^ punctuation.separator.subscript.tex + + $\sum_{i=1}^{1} i^2$ +%^^^^^^^^^^^^^^^^^^^^ meta.environment.math.inline.dollar +% ^^^^^^^^^^^^^^^^^^ markup.math.inline - string +% ^ punctuation.definition.backslash.tex +% ^^^^ keyword.other.math.large-operator.tex +% ^ variable.other.math.tex markup.italic.math.tex +% ^ variable.other.math.tex markup.italic.math.tex +% ^ keyword.operator.comparison.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^^^^ meta.group.brace.tex + +$\lim_{x \rightarrow 0} \sin x$ +%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.environment.math.inline.dollar.tex +%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.math.inline +%^^^^ keyword.other.math.function.tex +%^ punctuation.definition.backslash.tex +% ^ punctuation.separator.subscript.tex +% ^^^^^^^^^^^^^^^^^ meta.group.brace.tex +% ^ punctuation.definition.group.brace.begin.tex +% ^ variable.other.math.tex markup.italic.math.tex +% ^^^^^^^^^^^ keyword.other.math.arrow.tex +% ^ punctuation.definition.backslash.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^ punctuation.definition.group.brace.end.tex +% ^^^^ keyword.other.math.function.tex +% ^ punctuation.definition.backslash.tex +% ^ variable.other.math.tex markup.italic.math.tex +% ^ string.other.math.tex punctuation.definition.string.end.tex + + +% make sure that we see $$ here as close-open, not as starting a $$ display math + $x$$y$ +%^^^^^^ meta.environment.math.inline.dollar.tex +%^ string.other.math.tex punctuation.definition.string.begin.tex +% ^ markup.math.inline variable.other.math.tex markup.italic.math.tex +% ^^ string.other.math.tex - markup.math.inline +% ^ punctuation.definition.string.end.tex +% ^ punctuation.definition.string.begin.tex +% ^ markup.math.inline variable.other.math.tex markup.italic.math.tex +% ^ string.other.math.tex punctuation.definition.string.end.tex +% ^ - meta.environment.math + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Display Math +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + $$f(x) = x^2$$ +%^^ string.other.math.tex punctuation.definition.string.begin.tex +%^^^^^^^^^^^^^^ meta.environment.math.block.dollar.tex +% ^^^^^^^^^^ markup.math.block - string +% ^^ string.other.math.tex punctuation.definition.string.end.tex - markup.math.block + +$$ +% <- meta.environment.math.block.dollar.tex punctuation.definition.string.begin.tex +%^^ meta.environment.math.block.dollar.tex +%^ punctuation.definition.string.begin.tex + + 0 1 2 3 4 5 6 7 8 9 10 11 +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^^ meta.number.integer.decimal.tex constant.numeric.value.tex +% ^^ meta.number.integer.decimal.tex constant.numeric.value.tex + + 1.0 +%^ - meta.number - constant +% ^^^ meta.number.float.decimal.tex constant.numeric.value.tex +% ^ punctuation.separator.decimal.tex +% ^ - meta.number - constant + + 0.2 +%^ - meta.number - constant +% ^^^ meta.number.float.decimal.tex constant.numeric.value.tex +% ^ punctuation.separator.decimal.tex +% ^ - meta.number - constant + + .4 +%^ - meta.number - constant +% ^^ meta.number.float.decimal.tex constant.numeric.value.tex +% ^ punctuation.separator.decimal.tex +% ^ - meta.number - constant + + () +% ^ punctuation.section.parens.begin.tex +% ^ punctuation.section.parens.end.tex + + [] +% ^ punctuation.section.brackets.begin.tex +% ^ punctuation.section.brackets.end.tex + + \{ \} +%^ - constant +% ^^ constant.character.escape.tex +% ^ - constant +% ^^ constant.character.escape.tex +% ^ - constant + + c = a + b - d * f / g! +% ^ variable.other.math.tex +% ^ keyword.operator.comparison.tex +% ^ variable.other.math.tex +% ^ keyword.operator.arithmetic.tex +% ^ variable.other.math.tex +% ^ keyword.operator.arithmetic.tex +% ^ variable.other.math.tex +% ^ keyword.operator.arithmetic.tex +% ^ variable.other.math.tex +% ^ keyword.operator.arithmetic.tex +% ^ variable.other.math.tex +% ^ keyword.operator.arithmetic.tex + + a < b <= c +% ^ variable.other.math.tex +% ^ keyword.operator.comparison.tex +% ^ variable.other.math.tex +% ^^ keyword.operator.comparison.tex +% ^ variable.other.math.tex + + a > b >= c +% ^ variable.other.math.tex +% ^ keyword.operator.comparison.tex +% ^ variable.other.math.tex +% ^^ keyword.operator.comparison.tex +% ^ variable.other.math.tex + + a_n^2 +% ^ variable.other.math.tex markup.italic.math.tex +% ^ punctuation.separator.subscript.tex +% ^ variable.other.math.tex +% ^ punctuation.separator.superscript.tex +% ^ meta.number.integer.decimal.tex constant.numeric.value.tex + +$$ diff --git a/LaTeX/tests/syntax_test_tex.tex b/LaTeX/tests/syntax_test_tex.tex index 834649bf25..3b974602d3 100644 --- a/LaTeX/tests/syntax_test_tex.tex +++ b/LaTeX/tests/syntax_test_tex.tex @@ -865,131 +865,3 @@ % No value, the 5 is outside of the macro \def\macro{\abovedisplayskip=}5 % ^ - meta.number - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Math -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -$f(x) = x^2$ -% <- meta.environment.math.inline.dollar.tex string.other.math.tex punctuation.definition.string.begin.tex -%^^^^^^^^^^ meta.environment.math.inline.dollar.tex - string -% ^ meta.environment.math.inline.dollar.tex string.other.math.tex punctuation.definition.string.end.tex - -$$f(x) = x^2$$ -% <- meta.environment.math.block.dollar.tex string.other.math.tex punctuation.definition.string.begin.tex -%^ meta.environment.math.block.dollar.tex string.other.math.tex punctuation.definition.string.begin.tex -% ^^^^^^^^^^ meta.environment.math.block.dollar.tex - string -% ^^ meta.environment.math.block.dollar.tex string.other.math.tex punctuation.definition.string.end.tex - -$\iota$ -%^^^^^ keyword.other.math.greek.tex -%^ punctuation.definition.backslash.tex - -$\Iota$ -%^^^^^ support.function.math.tex - keyword.other -%^ punctuation.definition.backslash.tex - -$\alpha _$ -%^^^^^^ keyword.other.math.greek.tex -%^ punctuation.definition.backslash.tex -% ^ punctuation.separator.indice.tex - -$\alpha_$ -%^^^^^^ keyword.other.math.greek.tex -%^ punctuation.definition.backslash.tex -% ^ punctuation.separator.indice.tex - -$$ -% <- meta.environment.math.block.dollar.tex string.other.math.tex punctuation.definition.string.begin.tex -%^^ meta.environment.math.block.dollar.tex -%^ string.other.math.tex punctuation.definition.string.begin.tex - - 0 1 2 3 4 5 6 7 8 9 10 11 -% ^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^^ meta.number.integer.decimal.tex constant.numeric.value.tex -% ^^ meta.number.integer.decimal.tex constant.numeric.value.tex - - 1.0 -%^ - meta.number - constant -% ^^^ meta.number.float.decimal.tex constant.numeric.value.tex -% ^ punctuation.separator.decimal.tex -% ^ - meta.number - constant - - 0.2 -%^ - meta.number - constant -% ^^^ meta.number.float.decimal.tex constant.numeric.value.tex -% ^ punctuation.separator.decimal.tex -% ^ - meta.number - constant - - .4 -%^ - meta.number - constant -% ^^ meta.number.float.decimal.tex constant.numeric.value.tex -% ^ punctuation.separator.decimal.tex -% ^ - meta.number - constant - - () -% ^ punctuation.section.parens.begin.tex -% ^ punctuation.section.parens.end.tex - - [] -% ^ punctuation.section.brackets.begin.tex -% ^ punctuation.section.brackets.end.tex - - \{ \} -%^ - constant -% ^^ constant.character.escape.tex -% ^ - constant -% ^^ constant.character.escape.tex -% ^ - constant - - c = a + b - d * f / g! -% ^ variable.other.math.tex -% ^ keyword.operator.assignment.tex -% ^ variable.other.math.tex -% ^ keyword.operator.arithmetic.tex -% ^ variable.other.math.tex -% ^ keyword.operator.arithmetic.tex -% ^ variable.other.math.tex -% ^ keyword.operator.arithmetic.tex -% ^ variable.other.math.tex -% ^ keyword.operator.arithmetic.tex -% ^ variable.other.math.tex -% ^ keyword.operator.arithmetic.tex - - a < b <= c -% ^ variable.other.math.tex -% ^ keyword.operator.comparison.tex -% ^ variable.other.math.tex -% ^^ keyword.operator.comparison.tex -% ^ variable.other.math.tex - - a > b >= c -% ^ variable.other.math.tex -% ^ keyword.operator.comparison.tex -% ^ variable.other.math.tex -% ^^ keyword.operator.comparison.tex -% ^ variable.other.math.tex - - a_n^2 -% ^ variable.other.math.tex -% ^ punctuation.separator.indice.tex -% ^ variable.other.math.tex -% ^ keyword.operator.arithmetic.tex -% ^ meta.number.integer.decimal.tex constant.numeric.value.tex - -$$ - - $\sum_{i=1}^{1} i^2$ -%^^^^^^^^^^^^^^^^^^^^ meta.environment.math.inline.dollar. -% ^ punctuation.definition.backslash.tex -% ^^^^ keyword.other.math.large-operator.tex diff --git a/Markdown/tests/syntax_test_markdown.md b/Markdown/tests/syntax_test_markdown.md index 6a45725083..4088aa8e9e 100644 --- a/Markdown/tests/syntax_test_markdown.md +++ b/Markdown/tests/syntax_test_markdown.md @@ -8038,7 +8038,7 @@ $$ foo = 1 + 2 * \sqrt{a^2+b^2} | <- markup.math.block.markdown text.tex.latex.embedded.markdown meta.environment.math.block.dollar variable.other.math |^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.math.block.markdown text.tex.latex.embedded.markdown meta.environment.math.block.dollar -| ^ keyword.operator.assignment +| ^ keyword.operator.comparison | ^ constant.numeric.value | ^ keyword.operator.arithmetic | ^ constant.numeric.value @@ -8047,11 +8047,11 @@ foo = 1 + 2 * \sqrt{a^2+b^2} | ^^^^^^^^^ meta.group.brace | ^ punctuation.definition.group.brace.begin | ^ variable.other.math -| ^ keyword.operator.arithmetic +| ^ punctuation.separator.superscript.tex | ^ constant.numeric.value | ^ keyword.operator.arithmetic | ^ variable.other.math -| ^ keyword.operator.arithmetic +| ^ punctuation.separator.superscript.tex | ^ constant.numeric.value | ^ punctuation.definition.group.brace.end $$