summaryrefslogtreecommitdiff
path: root/.vim/UltiSnips/tex.snippets
blob: 0296f30f81964072e522bb544449cd58d2d769a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# workaround vim-latex bug
snippet "\b[rR]ene?\b" "Expand my name" r
Ren\'{e} Neumann
endsnippet

# beamer: Frame
snippet frame "Frame" b
\begin{frame}{$1}
	$0
\end{frame}
endsnippet

# This is a copy from the distribution, removing pointless comments at the end
snippet part "Part" b!
\part{${1:part name}}
\label{prt:${2:${1/(\w+)|\W+/(?1:\L$0\E:_)/g}}}

${0}
endsnippet

snippet cha "Chapter" b!
\chapter{${1:chapter name}}
\label{cha:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}}

${0}
endsnippet

snippet sec "Section" b!
\section{${1:section name}}
\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}}

${0}
endsnippet


snippet sub "Subsection" b!
\subsection{${1:subsection name}}
\label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}}

${0}
endsnippet

snippet ssub "Subsubsection" b!
\subsubsection{${1:subsubsection name}}
\label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}}

${0}
endsnippet

snippet par "Paragraph" b!
\paragraph{${1:paragraph name}} $0
endsnippet

clearsnippets subp