2014-03-11 20:10:50 +00:00
|
|
|
priority -50
|
2012-08-17 03:41:25 +00:00
|
|
|
|
2014-03-11 20:10:50 +00:00
|
|
|
extends texmath
|
2012-08-17 03:41:25 +00:00
|
|
|
|
|
|
|
snippet "b(egin)?" "begin{} / end{}" br
|
|
|
|
\begin{${1:something}}
|
|
|
|
${0:${VISUAL}}
|
|
|
|
\end{$1}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet tab
|
|
|
|
\begin{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}{${2:c}}
|
|
|
|
$0${2/((?<=.)c|l|r)|./(?1: & )/g}
|
|
|
|
\end{$1${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}
|
|
|
|
endsnippet
|
|
|
|
|
2014-03-11 20:10:50 +00:00
|
|
|
snippet fig "Figure environment" b
|
|
|
|
\begin{figure}${2:[htpb]}
|
|
|
|
\centering
|
|
|
|
\includegraphics[width=${3:0.8}\linewidth]{${4:name.ext}}
|
|
|
|
\caption{${4/(\w+)\.\w+/\u$1/}$0}
|
|
|
|
\label{fig:${4/(\w+)\.\w+/$1/}}
|
|
|
|
\end{figure}
|
|
|
|
endsnippet
|
|
|
|
|
2012-08-17 03:41:25 +00:00
|
|
|
snippet enum "Enumerate" b
|
|
|
|
\begin{enumerate}
|
|
|
|
\item $0
|
|
|
|
\end{enumerate}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet item "Itemize" b
|
|
|
|
\begin{itemize}
|
|
|
|
\item $0
|
|
|
|
\end{itemize}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet desc "Description" b
|
|
|
|
\begin{description}
|
|
|
|
\item[$1] $0
|
|
|
|
\end{description}
|
|
|
|
endsnippet
|
|
|
|
|
2014-03-11 20:10:50 +00:00
|
|
|
snippet it "Individual item" b
|
|
|
|
\item ${1}
|
|
|
|
$0
|
|
|
|
endsnippet
|
2012-08-17 03:41:25 +00:00
|
|
|
|
|
|
|
snippet part "Part" b
|
|
|
|
\part{${1:part name}}
|
2014-03-11 20:10:50 +00:00
|
|
|
\label{prt:${2:${1/(\w+)|\W+/(?1:\L$0\E:_)/ga}}}
|
2012-08-17 03:41:25 +00:00
|
|
|
|
|
|
|
${0}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet cha "Chapter" b
|
|
|
|
\chapter{${1:chapter name}}
|
2014-03-11 20:10:50 +00:00
|
|
|
\label{cha:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
2012-08-17 03:41:25 +00:00
|
|
|
|
|
|
|
${0}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet sec "Section" b
|
2014-03-02 14:35:00 +00:00
|
|
|
\section{${1:section name}}
|
2014-03-11 20:10:50 +00:00
|
|
|
\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
2012-08-17 03:41:25 +00:00
|
|
|
|
|
|
|
${0}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet sub "Subsection" b
|
|
|
|
\subsection{${1:subsection name}}
|
2014-03-11 20:10:50 +00:00
|
|
|
\label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
2012-08-17 03:41:25 +00:00
|
|
|
|
|
|
|
${0}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet ssub "Subsubsection" b
|
|
|
|
\subsubsection{${1:subsubsection name}}
|
2014-03-11 20:10:50 +00:00
|
|
|
\label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
2012-08-17 03:41:25 +00:00
|
|
|
|
|
|
|
${0}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet par "Paragraph" b
|
|
|
|
\paragraph{${1:paragraph name}}
|
2014-03-11 20:10:50 +00:00
|
|
|
\label{par:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
2012-08-17 03:41:25 +00:00
|
|
|
|
|
|
|
${0}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet subp "Subparagraph" b
|
|
|
|
\subparagraph{${1:subparagraph name}}
|
2014-03-11 20:10:50 +00:00
|
|
|
\label{par:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
2012-08-17 03:41:25 +00:00
|
|
|
|
|
|
|
${0}
|
2014-03-11 20:10:50 +00:00
|
|
|
endsnippet
|
2012-08-17 03:41:25 +00:00
|
|
|
|
2014-03-11 20:10:50 +00:00
|
|
|
snippet ni "Non-indented paragraph" b
|
|
|
|
\noindent
|
|
|
|
${0}
|
2012-08-17 03:41:25 +00:00
|
|
|
endsnippet
|
|
|
|
|
2014-03-11 20:10:50 +00:00
|
|
|
snippet pac "Package" b
|
|
|
|
\usepackage[${1:options}]{${2:package}}$0
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet lp "Long parenthesis"
|
|
|
|
\left(${1:${VISUAL:contents}}\right)$0
|
|
|
|
endsnippet
|
2012-08-17 03:41:25 +00:00
|
|
|
# vim:ft=snippets:
|