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>
This commit is contained in:
committed by
Christian Brabandt
parent
a17f8bfb28
commit
a35040f795
11
runtime/syntax/testdir/input/tex_02.tex
Normal file
11
runtime/syntax/testdir/input/tex_02.tex
Normal file
@ -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}
|
||||
Reference in New Issue
Block a user