runtime(tex): improve syntax highlighting
this change includes the following changes:
- a macro option must be #1–#9
- add \providecommand
- add starred versions of \newcommand, \newenvironment, and their
variants
- add number of arguments to \(re)newenvironment
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/syntax/testdir/input/tex_02.tex b/runtime/syntax/testdir/input/tex_02.tex
new file mode 100644
index 0000000..0d6e92a
--- /dev/null
+++ b/runtime/syntax/testdir/input/tex_02.tex
@@ -0,0 +1,11 @@
+\documentclass{article}
+\newcommand{\foo}{}
+\renewcommand*{\foo}[1]{#10}
+\providecommand{\foo}[1][default]{#11}
+\newenvironment*{baz}{START}{STOP}
+\renewenvironment{baz}[1]{HEAD of #12:}{TAIL}
+\renewenvironment*{baz}[1][default]{BEGINNING of #12:}{END}
+\begin{document}
+\foo{TeX} % -> TeX0
+\begin{baz} tex \end{baz} % -> BEGINNING of default2:tex END
+\end{document}