2009-07-06 05:35:53 -04:00
|
|
|
###########################################################################
|
|
|
|
# LATEX SNIPPETS #
|
|
|
|
###########################################################################
|
|
|
|
|
2009-07-06 16:00:21 -04:00
|
|
|
snippet r "\ref{}"
|
|
|
|
\ref{$1}
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
#####################
|
|
|
|
# TEXTMATE SNIPPETS #
|
|
|
|
#####################
|
|
|
|
|
|
|
|
#####################################
|
|
|
|
# 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
|
|
|
|
|
2009-07-06 05:35:53 -04:00
|
|
|
snippet sec
|
2009-07-06 15:45:30 -04:00
|
|
|
\section{${1:section name}}
|
|
|
|
\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}}
|
2009-07-06 05:35:53 -04:00
|
|
|
|
|
|
|
${0}
|
2009-07-06 15:45:30 -04:00
|
|
|
|
|
|
|
% section $2 (end)
|
2009-07-06 05:35:53 -04:00
|
|
|
endsnippet
|
|
|
|
|
2009-07-06 16:00:21 -04:00
|
|
|
|
|
|
|
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)
|
2009-07-06 05:47:27 -04:00
|
|
|
endsnippet
|
|
|
|
|