generated from glad3n/Command-line-text-processing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtex.snippets
98 lines (77 loc) · 2.57 KB
/
tex.snippets
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
snippet latex_document "this is a latex document snippet" b
\documentclass[10pt]{article}
\usepackage[letterpaper, portrait, margin=0.5in]{geometry}
\begin{document}
\title{}
\author{}
\date{\today}
\maketitle
\end{document}
endsnippet
#----------------------------------------------------------------------
snippet figure_header "this is to add one figure" b
\usepackage{graphicx}
\usepackage{subfig}
endsnippet
#----------------------------------------------------------------------
snippet figure_1 "this is to add one figure" b
\begin{figure}[H]
\centering
\includegraphics[scale=1]{}
\caption{}
\label{}
\end{figure}
endsnippet
#----------------------------------------------------------------------
snippet figure_many "this is to add many figures atonce" b
\begin{figure}[H]
\centering
\subfloat[]{\includegraphics[scale=1]{}\label{}}
\subfloat[]{\includegraphics[scale=1]{}\label{}}
\\
\subfloat[]{\includegraphics[scale=1]{}\label{}}
\subfloat[]{\includegraphics[scale=1]{}\label{}}
\caption{}
\label{}
\end{figure}
endsnippet
#----------------------------------------------------------------------
snippet code_header "this is to add a code header" b
\definecolor{light-gray}{gray}{0.85} %the shade of grey that stack exchange uses
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{frame=tb,
language=c++,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=none,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
escapeinside={<@}{@>},
breaklines=true,
breakatwhitespace=true,
tabsize=3
}
endsnippet
#----------------------------------------------------------------------
snippet code_insert "this is to insert a code" b
\begin{mdframed}[backgroundcolor=light-gray, roundcorner=10pt,leftmargin=1, rightmargin=1, innerleftmargin=15, innertopmargin=15,innerbottommargin=15, outerlinewidth=1, linecolor=light-gray]
\begin{lstlisting}
\end{lstlisting}
\end{mdframed}
endsnippet
#----------------------------------------------------------------------
snippet terminal_code_insert "this is to insert terminal commands" b
\begin{mdframed}[backgroundcolor=black, roundcorner=0pt,leftmargin=0, rightmargin=0, innerleftmargin=0, innertopmargin=0, innerbottommargin=0, outerlinewidth=0, linecolor=black]
\begin{lstlisting}
<@ \textcolor{green}{} @>
\end{lstlisting}
\end{mdframed}
endsnippet
#----------------------------------------------------------------------