Files
dotfiles/nvim/.config/nvim/UltiSnips/tex.snippets
T

175 lines
2.8 KiB
Plaintext

snippet article "WriteArticle"
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\title{$1}
\date{$2}
\author{Nicholas Novak}
\begin{document}
\maketitle
$3
\end{document}
endsnippet
snippet incfig "Include Figures"
\usepackage{import}
\usepackage{xifthen}
\usepackage{pdfpages}
\usepackage{transparent}
\newcommand{\incfig}[1]{%
\def\svgwidth{\columnwidth}
\import{./figures/}{#1.pdf_tex}
}
endsnippet
snippet tags "Add tags" w
\def\tags{$1}$0
endsnippet
snippet box "Box"
\boxed{$1}$0
endsnippet
snippet beg "Begin" b
\begin{$1}
$2
\end{$1}
endsnippet
snippet ali "Align Equation" b
\begin{align*}
$1
\end{align*}
endsnippet
snippet sec "Section" b
\section{$1}
endsnippet
snippet sub "Subsection" b
\subsection{$1}$0
endsnippet
snippet subsub "Subsubsection" b
\subsubsection{$1}$0
endsnippet
snippet span "Linear Span" w
\textrm{Span}\left\\{$1\right\\}
endsnippet
snippet left "Large Groupings" i
\left$1\right$1
endsnippet
snippet lb "Large Brackets" w
\left\\{$1\right\\}
endsnippet
snippet ab "Angled Brackets" w
\left\langle$1\right\rangle
endsnippet
snippet norm "Mathematical Norm" w
\left\Vert$1\right\Vert
endsnippet
snippet part "Partial Derivative" w
\frac{\partial $1}{\partial $2}$0
endsnippet
snippet ceil "Ceiling" w
\left\lceil$1\right\rceil$0
endsnippet
snippet mk "InlineMath" wA
\$$1\$
endsnippet
snippet dm "BlockMath" wA
\[
$1
\]$0
endsnippet
snippet check "CheckMark"
\checkmark
endsnippet
snippet cross "CrossMark"
\times
endsnippet
snippet corr "Correct"
\textcolor{red}{$1}
endsnippet
snippet pm "Parenthesied matrix" i
\begin{pmatrix}$1\end{pmatrix}
endsnippet
# Graphing utilities
snippet graph "Start Graph" b
\begin{center}
\begin{tikzpicture}
$1
\end{tikzpicture}
\end{center}$0
endsnippet
snippet line "Graph Line" w
\draw[<->] ($1)--($2) node[]{$3};
endsnippet
snippet vector "Graph Vector" w
\draw[line width=2pt,blue,-stealth] ($1)--($2) node[]{$3};
endsnippet
snippet xaxis "X Axis" w
\draw[->] (0,0)--($1,0) node[anchor=west]{$x$};$0
endsnippet
snippet yaxis "Y Axis" w
\draw[->] (0,0)--(0,$1) node[anchor=west]{$y$};$0
endsnippet
snippet axes "Graph between two axes"
\draw[->] (0,0)--(0,$1) node[anchor=west]{$2};
\draw[->] (0,0)--($1,0) node[anchor=west]{$3};$0
endsnippet
snippet point "Point" w
\filldraw[black] ($1) circle (2pt) node[]{};
endsnippet
snippet node "Graph Node" w
\node[circle,draw] ($1) at ($2,$3) {$4};$0
endsnippet
snippet connect "Connect Nodes" w
\path[dashed] ($1) edge node[above] {$3} ($2);
endsnippet
snippet brace "Curly brace between points" w
\draw[decorate,decoration={brace}] ($1) -- ($2) node[]{$3};$0
endsnippet
snippet link "Hyperlink" w
\href{$1}{$2}$0
endsnippet
snippet axis "PGFPlots begin axis plot" w
\begin{axis}[
$1
]
$2
\end{axis}$0
endsnippet