Skip to content

Commit

Permalink
feat(syntax): add initial luacas support
Browse files Browse the repository at this point in the history
refer: #3050
  • Loading branch information
lervag committed Dec 8, 2024
1 parent a863c7f commit feba414
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
16 changes: 16 additions & 0 deletions autoload/vimtex/syntax/p/luacas.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
" VimTeX - LaTeX plugin for Vim
"
" Maintainer: Karl Yngve Lervåg
" Email: karl.yngve@gmail.com
"

function! vimtex#syntax#p#luacas#load(cfg) abort " {{{1
call vimtex#syntax#core#new_env({
\ 'name': 'CAS',
\ 'region': 'texLuacasZone',
\})

highlight def link texLuacasZone texVerbZone
endfunction

" }}}1
13 changes: 13 additions & 0 deletions test/test-syntax/test-luacas.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
\documentclass{article}
\usepackage{luacas}

\begin{document}

\begin{CAS}
vars('x','h')
f = x^2
subs = {[x]=x+h}
q = (substitute(subs,f) - f)/h
\end{CAS}

\end{document}

0 comments on commit feba414

Please sign in to comment.