vim/runtime/syntax/testdir/input/tex_02.tex
Eisuke Kawashima a35040f795
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>
2025-02-08 18:32:14 +01:00

11 lines
368 B
TeX

\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}