1
0
Fork 0
mirror of synced 2024-11-17 22:45:34 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/tex.snippets

259 lines
4.2 KiB
Text
Raw Normal View History

2012-08-16 23:41:25 -04:00
#PREAMBLE
#newcommand
snippet nc
\newcommand{\${1:cmd}}[${2:opt}]{${3:realcmd}} ${0}
2012-08-16 23:41:25 -04:00
#usepackage
snippet up
\usepackage[${1:options}]{${2:package}} ${0}
2012-08-16 23:41:25 -04:00
#newunicodechar
snippet nuc
\newunicodechar{${1}}{${2:\ensuremath}${3:tex-substitute}}} ${0}
2012-08-16 23:41:25 -04:00
#DeclareMathOperator
snippet dmo
\DeclareMathOperator{${1}}{${2}} ${0}
2012-08-16 23:41:25 -04:00
#DOCUMENT
# \begin{}...\end{}
snippet begin
\begin{${1:env}}
${0}
2012-08-16 23:41:25 -04:00
\end{$1}
# Tabular
snippet tab
\begin{${1:tabular}}{${2:c}}
${0}
2012-08-16 23:41:25 -04:00
\end{$1}
snippet thm
\begin[${1:author}]{${2:thm}}
${0}
2013-07-17 19:06:05 -04:00
\end{$2}
2012-08-16 23:41:25 -04:00
snippet center
\begin{center}
${0}
2012-08-16 23:41:25 -04:00
\end{center}
# Align(ed)
snippet ali
\begin{align${1:ed}}
${0}
2012-08-16 23:41:25 -04:00
\end{align$1}
# Gather(ed)
snippet gat
\begin{gather${1:ed}}
${0}
2012-08-16 23:41:25 -04:00
\end{gather$1}
# Equation
snippet eq
\begin{equation}
${0}
2012-08-16 23:41:25 -04:00
\end{equation}
# Equation
snippet eq*
\begin{equation*}
${0}
2012-08-16 23:41:25 -04:00
\end{equation*}
# Unnumbered Equation
snippet \
\[
${0}
2012-08-16 23:41:25 -04:00
\]
2013-07-17 19:06:05 -04:00
# Equation array
snippet eqnarray
\begin{eqnarray}
${0}
2013-07-17 19:06:05 -04:00
\end{eqnarray}
2012-08-16 23:41:25 -04:00
# Enumerate
snippet enum
\begin{enumerate}
\item ${0}
2012-08-16 23:41:25 -04:00
\end{enumerate}
# Itemize
snippet itemize
\begin{itemize}
\item ${0}
2012-08-16 23:41:25 -04:00
\end{itemize}
2013-07-17 19:06:05 -04:00
snippet item
\item ${1}
2012-08-16 23:41:25 -04:00
# Description
snippet desc
\begin{description}
\item[${1}] ${0}
2012-08-16 23:41:25 -04:00
\end{description}
2013-07-17 19:06:05 -04:00
# Endless new item
snippet ]i
\item ${1}
${0:]i}
2012-08-16 23:41:25 -04:00
# Matrix
snippet mat
\begin{${1:p/b/v/V/B/small}matrix}
${0}
2012-08-16 23:41:25 -04:00
\end{$1matrix}
# Cases
snippet cas
\begin{cases}
${1:equation}, &\text{ if }${2:case}\\
${0}
2012-08-16 23:41:25 -04:00
\end{cases}
# Split
snippet spl
\begin{split}
${0}
2012-08-16 23:41:25 -04:00
\end{split}
# Part
snippet part
\part{${1:part name}} % (fold)
\label{prt:${2:$1}}
${0}
2012-08-16 23:41:25 -04:00
% part $2 (end)
# Chapter
snippet cha
\chapter{${1:chapter name}}
2012-08-16 23:41:25 -04:00
\label{cha:${2:$1}}
${0}
2012-08-16 23:41:25 -04:00
# Section
snippet sec
\section{${1:section name}}
2012-08-16 23:41:25 -04:00
\label{sec:${2:$1}}
${0}
2013-07-17 19:06:05 -04:00
# Section without number
snippet sec*
\section*{${1:section name}}
\label{sec:${2:$1}}
${0}
2012-08-16 23:41:25 -04:00
# Sub Section
snippet sub
\subsection{${1:subsection name}}
2012-08-16 23:41:25 -04:00
\label{sub:${2:$1}}
${0}
2013-07-17 19:06:05 -04:00
# Sub Section without number
snippet sub*
\subsection*{${1:subsection name}}
\label{sub:${2:$1}}
${0}
2012-08-16 23:41:25 -04:00
# Sub Sub Section
snippet subs
\subsubsection{${1:subsubsection name}}
2012-08-16 23:41:25 -04:00
\label{ssub:${2:$1}}
${0}
2013-07-17 19:06:05 -04:00
# Sub Sub Section without number
snippet subs*
\subsubsection*{${1:subsubsection name}}
\label{ssub:${2:$1}}
${0}
2012-08-16 23:41:25 -04:00
# Paragraph
snippet par
\paragraph{${1:paragraph name}}
2012-08-16 23:41:25 -04:00
\label{par:${2:$1}}
${0}
2012-08-16 23:41:25 -04:00
# Sub Paragraph
snippet subp
\subparagraph{${1:subparagraph name}}
2012-08-16 23:41:25 -04:00
\label{subp:${2:$1}}
${0}
2013-07-17 19:06:05 -04:00
snippet ni
\noindent
${0}
2012-08-16 23:41:25 -04:00
#References
snippet itd
\item[${1:description}] ${0:item}
2012-08-16 23:41:25 -04:00
snippet figure
${1:Figure}~\ref{${2:fig:}}
2012-08-16 23:41:25 -04:00
snippet table
${1:Table}~\ref{${2:tab:}}
2012-08-16 23:41:25 -04:00
snippet listing
${1:Listing}~\ref{${2:list}}
2012-08-16 23:41:25 -04:00
snippet section
${1:Section}~\ref{sec:${2}} ${0}
2012-08-16 23:41:25 -04:00
snippet page
${1:page}~\pageref{${2}} ${0}
2012-08-16 23:41:25 -04:00
snippet index
\index{${1:index}} ${0}
#Citations
2013-07-17 19:06:05 -04:00
snippet citen
\cite{$1} ${0}
2013-07-17 19:06:05 -04:00
# bibtex commands
snippet citep
\citep{$1} ${0}
2013-07-17 19:06:05 -04:00
snippet citet
\citet{$1} ${0}
2012-08-16 23:41:25 -04:00
snippet cite
\cite[${1}]{${2}} ${0}
snippet fcite
\footcite[${1}]{${2}}${0}
2012-08-16 23:41:25 -04:00
#Formating text: italic, bold, underline, small capital, emphase ..
snippet it
\textit{${0:text}}
2012-08-16 23:41:25 -04:00
snippet bf
\textbf{${0:text}}
2012-08-16 23:41:25 -04:00
snippet under
\underline{${0:text}}
2012-08-16 23:41:25 -04:00
snippet emp
\emph{${0:text}}
2012-08-16 23:41:25 -04:00
snippet sc
\textsc{${0:text}}
2012-08-16 23:41:25 -04:00
#Choosing font
snippet sf
\textsf{${0:text}}
2012-08-16 23:41:25 -04:00
snippet rm
\textrm{${0:text}}
2012-08-16 23:41:25 -04:00
snippet tt
\texttt{${0:text}}
2012-08-16 23:41:25 -04:00
#misc
snippet ft
\footnote{${0:text}}
2012-08-16 23:41:25 -04:00
snippet fig
\begin{figure}
\begin{center}
\includegraphics[scale=${1}]{Figures/${2}}
\end{center}
\caption{${3}}
\label{fig:${4}}
\end{figure}
${0}
2012-08-16 23:41:25 -04:00
snippet tikz
\begin{figure}
\begin{center}
\begin{tikzpicture}[scale=${1:1}]
${2}
\end{tikzpicture}
\end{center}
\caption{${3}}
\label{fig:${4}}
\end{figure}
${0}
2012-08-16 23:41:25 -04:00
#math
snippet stackrel
\stackrel{${1:above}}{${2:below}} ${0}
2012-08-16 23:41:25 -04:00
snippet frac
\frac{${1:num}}{${2:denom}} ${0}
2012-08-16 23:41:25 -04:00
snippet sum
\sum^{${1:n}}_{${2:i=1}} ${0}
2013-07-17 19:06:05 -04:00
snippet lim
\lim_{${1:x \to +\infty}} ${0}
2013-07-17 19:06:05 -04:00
snippet frame
\begin{frame}[<+->]
\frametitle{${1:title}}
${0}
2013-07-17 19:06:05 -04:00
\end{frame}
snippet block
\begin{block}{${1:title}}
${0}
2013-07-17 19:06:05 -04:00
\end{block}
snippet alert
\begin{alertblock}{${1:title}}
${0}
2013-07-17 19:06:05 -04:00
\end{alertblock}
snippet example
\begin{exampleblock}{${1:title}}
${0}
2013-07-17 19:06:05 -04:00
\end{exampleblock}
snippet col2
\begin{columns}
\begin{column}{0.5\textwidth}
${1}
\end{column}
\begin{column}{0.5\textwidth}
${0}
2013-07-17 19:06:05 -04:00
\end{column}
\end{columns}