-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(syntax): initial support for witharrows
refer: #2755
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
" VimTeX - LaTeX plugin for Vim | ||
" | ||
" Maintainer: Karl Yngve Lervåg | ||
" Email: [email protected] | ||
" | ||
|
||
function! vimtex#syntax#p#witharrows#load(cfg) abort " {{{1 | ||
call vimtex#syntax#core#new_region_math('DispWithArrows') | ||
|
||
syntax match texMathCmdText "\\Arrow\>" | ||
\ contained skipwhite nextgroup=texMathTextArg | ||
endfunction | ||
|
||
" }}}1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
\documentclass{article} | ||
\usepackage{physics} | ||
\usepackage{witharrows} | ||
|
||
\begin{document} | ||
|
||
\begin{DispWithArrows} | ||
\dv{i_2}{t} &= - \frac{M}{L_2} \dv{i_1}{t} | ||
\Arrow{par intégration} \\ | ||
\Rightarrow | ||
i_2 &= -\frac{M}{L_2}i_1 + \mathrm{cte} | ||
\end{DispWithArrows} | ||
|
||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
source common.vim | ||
|
||
EditConcealed test-witharrows.tex | ||
|
||
if empty($INMAKE) | finish | endif | ||
|
||
call vimtex#test#finished() |