1
Fork 0
satellite/home/features/neovim/snippets/tex.miros

264 lines
5.7 KiB
Plaintext
Raw Normal View History

2024-04-16 23:25:20 +02:00
for thmenv <- @⟨theorem,lemma,exercise,definition,corollary,example⟩
for thmprefix <- @⟨@thmenv:thm,lem,exe,def,cor,exa⟩
2024-04-23 08:33:17 +02:00
block auto start
string begin
name environment
snip
\begin{$1}
$0
\end{$1}
2024-04-16 23:25:20 +02:00
block auto !math start
2024-04-23 08:33:17 +02:00
for env <- @⟨enumerate,itemize,align*⟩
2024-04-16 23:25:20 +02:00
2024-04-23 08:33:17 +02:00
string @⟨@env:olist,ulist,dm⟩
name @⟨@env:ordered list,unordered list,display math⟩
2024-04-16 23:25:20 +02:00
snip
\begin{@env}
$0
\end{@env}
string proof
snip
\begin{proof}$?1⟨[Proof of @^⟨$1⟩]⟩
$0
\end{proof}
string ciff
name cases for ⟺
snip
\begin{enumerate}
\item[$\implies$]$1,
\item[$\impliedby$]$2,
\end{enumerate}
$0
string item
snip \item$|1⟨,[$1] $0⟩
block text
string ref
snip \ref{$1}$0
string r@thmprefix
snip \ref{@thmprefix:$1}$0
string pref
snip (\ref{$1})$0
string pr@thmprefix
snip (\ref{@thmprefix:$1})$0
string quote
snip ``$1''$0
string forcecr
snip {\ \\\\}
pattern ([Ll]et)
name definition
snip @1 \$$1 = $2\$ @0
2024-04-16 23:25:20 +02:00
block auto
string $
2024-04-16 23:25:20 +02:00
name inline math
snip \$$1\$$0
block math
for shorthand <- @⟨sum,prod⟩
for symbol <- @⟨@shorthand:sigma,pi⟩
for operation <- @⟨@shorthand:sum,product⟩
string b@shorthand
name @symbol @operation
desc Write out a @operation using big @symbol notation
snip \\@symbol{$|1⟨$1 = $2,$1⟩}^$|2⟨{$2},\infty$2⟩ $0
for matkind <- @⟨matrix,determinant⟩
for matenv <- @⟨@matkind:bmatrix,vmatrix⟩
for shorthand <- @⟨@matkind:mat,det⟩
string 2@shorthand
name 2x2 @matkind
snip
\begin{@matenv}
$1 & $2 \\\\
$3 & $4
\end{@matenv}
string 3@shorthand
name 3x3 @matkind
snip
\begin{@matenv}
$1 & $2 & $3 \\\\
$4 & $5 & $6 \\\\
$7 & $8 & $9
\end{@matenv}
for createabbr <- @⟨false,true⟩
for operator <- @⟨@createabbr:
@⟨eq,lt,gt⟩,
@⟨neq,defas,leq,geq,iip,iib,iff⟩
for symbol <- @⟨@createabbr:
@⟨@operator:=,<,>⟩,
@⟨@operator:\neq,\coloneq,\leq,\geq,\implies,\impliedby,\iff⟩
2024-04-16 23:25:20 +02:00
block auto
abbr @⟨@createabbr:op-@operator,@operator⟩ @symbol
2024-04-23 08:33:17 +02:00
2024-04-16 23:25:20 +02:00
string a@operator
name align at @operator
snip &@symbol $0
block start
string al@operator
name aligned @operator
snip
\\\\ $1 &@symbol $2
$0
2024-04-16 23:25:20 +02:00
string cr@operator
name start with @operator
snip \\\\&@symbol $0
2024-04-16 23:25:20 +02:00
block start
string eqsystem
name system of equations
snip
\left\{
\begin{array}{rl}
$0
\end{array}
\right\}
block end
for suffix <- @⟨add,sub,rmul,pow,inv⟩
string ex@suffix
snip
&& \lrb{\square @⟨@suffix:
+ $1,
- $1,
\cdot $1,
^{$1},
^{-1},
⟩}$0
for prefix <- @⟨neg,mul,ln⟩
string ex@prefix
snip && \lrb{@⟨@prefix:-,$1,\ln⟩ \square}$0
string exdiv
snip && \lrb{\frac \square {$1}}$0
string exint
snip && \lrb{\int\square \dif $1}$0
string exdint
snip && \lrb{\int_{$1}^{$2}\square \dif $3}$0
for kind <- @⟨texpl,extrin,exbound,exdef⟩
string @kind
snip
&& \lrb{\text{@⟨@kind:
$1,
triangle inequality on $$1$,
$$1$ is bounded,
definition of $$1$,
⟩}}$0
block auto
2024-04-23 08:33:17 +02:00
for constkind <- @⟨default,shortened⟩
for constant <- @⟨@constkind:
@⟨star,delta,Delta,pi,tau,psi,phi,rho,sigma,alpha,beta,theta,gamma,omega,Omega,half,ordop,land,lor⟩,
@⟨lam,eps,iinf⟩
for expansion <- @⟨@constkind:
@constant,
@⟨@constant:lambda,epsilon,ifty⟩
for operator <- @⟨,e,s⟩
string @operator@constant
snip @⟨@operator:,^,_⟩\\@expansion
abbr niinf -\ifty
abbr eniinf ^{-\ifty}
abbr sniinf _{-\ifty}
abbr frl \forall
abbr exs \exists
abbr iin \in
2024-04-23 08:33:17 +02:00
abbr nin \not\in
abbr ccup \cup
abbr ccap \cap
abbr nope \bot
abbr yee \top
abbr nlnl \pm
abbr vsm \vecspace
abbr oball \ball
for noperator <- @⟨ordop,land,lor,equiv,pmod⟩
abbr @noperator \\@noperator
2024-04-23 08:33:17 +02:00
for operator <- @⟨overline,hat,bar,abs,norm,prob,diprod,sin,cos,sqrt,ln,lrb,zmod,gen,diam,prob⟩
2024-04-16 23:25:20 +02:00
string @operator
snip \\@operator$|1⟨{$1}, $0⟩
2024-04-23 08:33:17 +02:00
for bioperator <- @⟨iprod,frac,binom,dist⟩
2024-04-16 23:25:20 +02:00
string @bioperator
snip \\@bioperator$|1⟨ $1,{$1}⟩$|2⟨ $2,{$2}⟩ $0
string set
desc Create a set by escaping the brackets
snip \{$1\}
2024-04-23 08:33:17 +02:00
pattern (.*)e@⟨t(%a),(%d)⟩
2024-04-16 23:25:20 +02:00
name auto exponent
2024-04-23 08:33:17 +02:00
snip @0^@1 $0
2024-04-16 23:25:20 +02:00
2024-04-23 08:33:17 +02:00
pattern (.*)so(%a)
2024-04-16 23:25:20 +02:00
name auto subscript
2024-04-23 08:33:17 +02:00
snip @0_@1 $0
2024-04-16 23:25:20 +02:00
pattern (\?[%a]+)(%d)
name auto digt subscript
2024-04-23 08:33:17 +02:00
snip @0_@1 $0
2024-04-16 23:25:20 +02:00
string ss
name subscript
2024-04-23 08:33:17 +02:00
snip _{$1} $0
2024-04-16 23:25:20 +02:00
string ee
name exponent
2024-04-23 08:33:17 +02:00
snip ^{$1} $0
pattern (%a)(.)pp
name auto function call
2024-04-23 08:33:17 +02:00
snip @0(@1) $0
pattern (%a)d(.)p
name auto derivative call
2024-04-23 08:33:17 +02:00
snip @0'(@1) $0
2024-04-16 23:25:20 +02:00
pattern (%a)i(.)p
name auto preimage call
snip @0^{-1}(@1) $0
block !word
abbr .inv ^{-1}
abbr .neg _-
abbr .pos _+
2024-04-16 23:25:20 +02:00
for limtarget <- @⟨anything,zero,infinity,negative infinity⟩
for prefix <- @⟨@limtarget:,z,i,n⟩
for limtargetsymbol <- @⟨@limtarget:$2,0,\infty,-\infty⟩
string @prefix⋄lim
name limit to @limtarget
snip \lim_{$1 \to @limtargetsymbol} $0
string intd
2024-04-16 23:25:20 +02:00
name definite integral
snip \int_{$|1⟨$1,-\infty$1⟩}^$|2⟨{$2},\infty$2⟩ $3 \dif $0
string inti
2024-04-16 23:25:20 +02:00
name indefinite integral
snip \int $1 \dif $0