Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added shortintertext as text context. #2586

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions autoload/vimtex/syntax/p/mathtools.vim
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ function! vimtex#syntax#p#mathtools#load(cfg) abort " {{{1
highlight def link texMathToolsOptPos1 texOpt
highlight def link texMathToolsOptPos2 texOpt
highlight def link texMathToolsOptWidth texOpt

" Support for shortintertext
syntax match texMathCmdText contained skipwhite nextgroup=texMathTextArg "\\shortintertext"

if g:vimtex_syntax_conceal.styles
syntax match texMathCmdText contained skipwhite conceal nextgroup=texMathTextConcArg "\\shortintertext"
endif

endfunction

" }}}1
6 changes: 6 additions & 0 deletions test/test-syntax/test-mathtools.tex
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,10 @@
\end{smallmatrix*}
\]

\begin{gather}
f(x) = x
\shortintertext{This is a short intertext.}
f(x) = x
\end{gather}

\end{document}