########################################################################### # LATEX SNIPPETS # ########################################################################### snippet r "\ref{}" \ref{$1} endsnippet ########################################################################### # TEXTMATE SNIPPETS # ########################################################################### #################### # TABULARS, ARRAYS # #################### 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 ######################## # ENUM, DESCR, ITEMIZE # ######################## snippet enum \begin{enumerate} \item $0 \end{enumerate} endsnippet snippet item \begin{itemize} \item $0 \end{enumerate} endsnippet snippet desc \begin{description} \item[$1] $0 \end{description} endsnippet ############## # MATH STUFF # ############## snippet eq "Equation" \begin{equation} $0 \end{equation} endsnippet snippet eqnn "Equation without number" \begin{equation*} $0 \end{equation*} endsnippet snippet eqa "Equation array" \begin{eqnarray} $1 & $2 & $0 \end{eqnarray} endsnippet snippet eqann "Equation array without numbers" \begin{eqnarray*} $1 & $2 & $0 \end{eqnarray*} endsnippet snippet frac \frac{${1:nom}}{${2:denom}} endsnippet snippet mat \begin{${1:p/b/v/V/B/small}matrix} $0 \end{$1matrix} endsnippet ##################################### # SECTIONS, CHAPTERS AND THERE LIKE # ##################################### snippet part \part{${1:part name}} \label{prt:${2:${1/(\w+)|\W+/(?1:\L$0\E:_)/g}}} ${0} % part $2 (end) endsnippet snippet cha \chapter{${1:chapter name}} \label{cha:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} ${0} % chapter $2 (end) endsnippet snippet sec \section{${1:section name}} \label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} ${0} % section $2 (end) endsnippet snippet sub \subsection{${1:subsection name}} \label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} ${0} % subsection $2 (end) endsnippet snippet ssub \subsubsection{${1:subsubsection name}} \label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} ${0} % subsubsection $2 (end) endsnippet snippet par \paragraph{${1:paragraph name}} \label{par:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} ${0} % paragraph $2 (end) endsnippet snippet subp \subparagraph{${1:subparagraph name}} \label{par:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} ${0} % subparagraph $2 (end) endsnippet