diff --git a/runtime/syntax/testdir/dumps/tex_01_00.dump b/runtime/syntax/testdir/dumps/tex_01_00.dump new file mode 100644 index 0000000000..ef84de4660 --- /dev/null +++ b/runtime/syntax/testdir/dumps/tex_01_00.dump @@ -0,0 +1,20 @@ +>\+0#af5f00255#ffffff0|d|o|c|u|m|e|n|t|c|l|a|s@1|{+0#e000e06&|a|r|t|i|c|l|e|}| +0#0000000&@51 +|\+0#e000e06&|b|e|g|i|n|{|d|o|c|u|m|e|n|t|}| +0#0000000&@58 +|\+0#00e0003&|t|e|x|t@2|{|t+0#0000000&|e|s|t|}+0#00e0003&| +0#0000000&@61 +|(|\+0#00e0003&|t|e|x|t@2|{|t+0#0000000&|e|s|t|}+0#00e0003&|)+0#0000000&| @59 +|(| @1|\+0#00e0003&|t|e|x|t@2|{|t+0#0000000&|e|s|t|}+0#00e0003&| +0#0000000&@2|)| @54 +|\+0#00e0003&|t|e|x|t@2|{|t+0#0000000&|e|s|t|}+0#00e0003&|)+0#0000000&| @60 +|(@1|b|l|a|h|b|l|a|h|)|\+0#e000e06&@1| +0#0000000&@61 +|\+0#00e0003&|t|e|x|t@2|{|t+0#0000000&|e|s|t|}+0#00e0003&| +0#0000000&@61 +|\+0#00e0003&|t|e|x|t@2|{|t+0#0000000&|e|s|t|}+0#00e0003&| +0#0000000&@61 +|)| @73 +|(|l|o|r|e|m| |i|p|s|u|m|)| @61 +|\+0#00e0003&|t|e|x|t@2|{|t+0#0000000&|e|s|t|}+0#00e0003&| +0#0000000&@61 +|(| |\+0#00e0003&|t|e|x|t|i|t|{|t+0#0000000&|e|s|t|}+0#00e0003&| +0#0000000&|\+0#00e0003&|t|e|x|t|b|f|{|t+2#0000000&|e|s|t|}+0#00e0003&|)+0#0000000&| @44 +|\+0#e000e06&|e|n|d|{|d|o|c|u|m|e|n|t|}| +0#0000000&@60 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|1|,|1| @10|A|l@1| diff --git a/runtime/syntax/testdir/input/tex_01.tex b/runtime/syntax/testdir/input/tex_01.tex new file mode 100644 index 0000000000..7153d0f1a9 --- /dev/null +++ b/runtime/syntax/testdir/input/tex_01.tex @@ -0,0 +1,14 @@ +\documentclass{article} +\begin{document} +\texttt{test} +(\texttt{test}) +( \texttt{test} ) +\texttt{test}) +((blahblah)\\ +\texttt{test} +\texttt{test} +) +(lorem ipsum) +\texttt{test} +( \textit{test} \textbf{test}) +\end{document} diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index 77a40e11d3..4f35bba939 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -3,7 +3,8 @@ " Maintainer: This runtime file is looking for a new maintainer. " Former Maintainer: Charles E. Campbell " Last Change: Apr 22, 2022 -" 2024 Feb 19 by Vim Project (announce adoption) +" 2024 Feb 19 by Vim Project: announce adoption +" 2025 Jan 18 by Vim Project: add texEmphStyle to texMatchGroup, #16228 " Version: 121 " Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " @@ -176,11 +177,11 @@ if !s:tex_excludematcher endif if !s:tex_nospell if !s:tex_no_error - syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell + syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texEmphStyle,texZone,texInputFile,texOption,@Spell syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher,@Spell else - syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell + syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texEmphStyle,texZone,texInputFile,texOption,@Spell syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher,@Spell endif