vim-snippets/snippets/tex.snippets

273 lines
5.7 KiB
Plaintext
Raw Normal View History

#PREAMBLE
#newcommand
2014-05-06 03:16:15 -04:00
snippet nc \newcommand
2014-07-02 04:54:42 -04:00
\newcommand{\\${1:cmd}}[${2:opt}]{${3:realcmd}} ${0}
#usepackage
2014-05-06 03:16:15 -04:00
snippet up \usepackage
\usepackage[${1:options}]{${2:package}} ${0}
#newunicodechar
2014-05-06 03:16:15 -04:00
snippet nuc \newunicodechar
\newunicodechar{${1}}{${2:\ensuremath}${3:tex-substitute}}} ${0}
#DeclareMathOperator
2014-05-06 03:16:15 -04:00
snippet dmo \DeclareMathOperator
\DeclareMathOperator{${1}}{${2}} ${0}
#DOCUMENT
# \begin{}...\end{}
2014-05-06 03:16:15 -04:00
snippet begin \begin{} ... \end{} block
\begin{${1:env}}
2014-03-06 11:10:53 -05:00
${0}
\end{$1}
# Tabular
2014-05-06 03:16:15 -04:00
snippet tab tabular (or arbitrary) environment
\begin{${1:tabular}}{${2:c}}
2014-03-06 11:10:53 -05:00
${0}
\end{$1}
2014-05-06 03:16:15 -04:00
snippet thm thm (or arbitrary) environment with optional argument
\begin[${1:author}]{${2:thm}}
2014-03-06 11:10:53 -05:00
${0}
2013-07-10 11:27:17 -04:00
\end{$2}
2014-05-06 03:16:15 -04:00
snippet center center environment
2011-07-03 22:53:35 -04:00
\begin{center}
2014-03-06 11:10:53 -05:00
${0}
2011-07-03 22:53:35 -04:00
\end{center}
# Align(ed)
2014-05-06 03:16:15 -04:00
snippet ali align(ed) environment
\begin{align${1:ed}}
2014-04-30 04:14:49 -04:00
\label{eq:${2}}
2014-03-06 11:10:53 -05:00
${0}
\end{align$1}
# Gather(ed)
2014-05-06 03:16:15 -04:00
snippet gat gather(ed) environment
\begin{gather${1:ed}}
2014-03-06 11:10:53 -05:00
${0}
\end{gather$1}
# Equation
2014-05-06 03:16:15 -04:00
snippet eq equation environment
\begin{equation}
\label{eq:${2}}
2014-03-06 11:10:53 -05:00
${0}
\end{equation}
2011-07-03 22:53:35 -04:00
# Equation
2014-05-06 03:16:15 -04:00
snippet eq* unnumbered equation environment
2011-07-03 22:53:35 -04:00
\begin{equation*}
2014-03-06 11:10:53 -05:00
${0}
2011-07-03 22:53:35 -04:00
\end{equation*}
# Unnumbered Equation
2014-05-06 03:16:15 -04:00
snippet \ unnumbered equation: \[ ... \]
2014-03-06 11:10:53 -05:00
\[
${0}
2014-03-06 11:10:53 -05:00
\]
2013-06-22 08:56:00 -04:00
# Equation array
2014-05-06 03:16:15 -04:00
snippet eqnarray eqnarray environment
2014-03-06 11:10:53 -05:00
\begin{eqnarray}
${0}
2014-03-06 11:10:53 -05:00
\end{eqnarray}
# Label
2014-05-06 03:16:15 -04:00
snippet lab \label
2014-03-06 11:10:53 -05:00
\label{${1:eq:}${2:fig:}${3:tab:}${0}}
# Enumerate
2014-05-06 03:16:15 -04:00
snippet enum enumerate environment
2014-03-06 11:10:53 -05:00
\begin{enumerate}
\item ${0}
2014-03-06 11:10:53 -05:00
\end{enumerate}
# Itemize
2014-05-06 03:16:15 -04:00
snippet itemize itemize environment
2014-03-06 11:10:53 -05:00
\begin{itemize}
\item ${0}
2014-03-06 11:10:53 -05:00
\end{itemize}
2014-05-06 03:16:15 -04:00
snippet item \item
2014-03-06 11:10:53 -05:00
\item ${1}
# Description
2014-05-06 03:16:15 -04:00
snippet desc description environment
2014-03-06 11:10:53 -05:00
\begin{description}
\item[${1}] ${0}
2014-03-06 11:10:53 -05:00
\end{description}
2013-06-22 08:56:22 -04:00
# Endless new item
2014-05-06 03:16:15 -04:00
snippet ]i \item (recursive)
2014-03-06 11:10:53 -05:00
\item ${1}
${0:]i}
# Matrix
2014-05-06 03:16:15 -04:00
snippet mat smart matrix environment
2014-03-06 11:10:53 -05:00
\begin{${1:p/b/v/V/B/small}matrix}
${0}
2014-03-06 11:10:53 -05:00
\end{$1matrix}
# Cases
2014-05-06 03:16:15 -04:00
snippet cas cases environment
2014-03-06 11:10:53 -05:00
\begin{cases}
${1:equation}, &\text{ if }${2:case}\\
2014-03-06 11:10:53 -05:00
${0}
\end{cases}
# Split
2014-05-06 03:16:15 -04:00
snippet spl split environment
2014-03-06 11:10:53 -05:00
\begin{split}
${0}
\end{split}
# Part
2014-05-06 03:16:15 -04:00
snippet part document \part
2014-03-06 11:10:53 -05:00
\part{${1:part name}} % (fold)
\label{prt:${2:$1}}
${0}
2014-03-06 11:10:53 -05:00
% part $2 (end)
# Chapter
2014-05-06 03:16:15 -04:00
snippet cha \chapter
\chapter{${1:chapter name}}
\label{cha:${2:$1}}
${0}
# Section
2014-05-06 03:16:15 -04:00
snippet sec \section
\section{${1:section name}}
\label{sec:${2:$1}}
${0}
# Section without number
2014-05-06 03:16:15 -04:00
snippet sec* \section*
\section*{${1:section name}}
\label{sec:${2:$1}}
${0}
# Sub Section
2014-05-06 03:16:15 -04:00
snippet sub \subsection
\subsection{${1:subsection name}}
\label{sub:${2:$1}}
${0}
# Sub Section without number
2014-05-06 03:16:15 -04:00
snippet sub* \subsection*
\subsection*{${1:subsection name}}
\label{sub:${2:$1}}
${0}
# Sub Sub Section
2014-05-06 03:16:15 -04:00
snippet subs \subsubsection
\subsubsection{${1:subsubsection name}}
\label{ssub:${2:$1}}
${0}
# Sub Sub Section without number
2014-05-06 03:16:15 -04:00
snippet subs* \subsubsection*
\subsubsection*{${1:subsubsection name}}
\label{ssub:${2:$1}}
${0}
# Paragraph
2014-05-06 03:16:15 -04:00
snippet par \paragraph
\paragraph{${1:paragraph name}}
\label{par:${2:$1}}
${0}
# Sub Paragraph
2014-05-06 03:16:15 -04:00
snippet subp \subparagraph
\subparagraph{${1:subparagraph name}}
\label{subp:${2:$1}}
${0}
2014-05-06 03:16:15 -04:00
snippet ni \noindent
\noindent
${0}
#References
2014-05-06 03:16:15 -04:00
snippet itd description \item
\item[${1:description}] ${0:item}
2014-05-06 03:16:15 -04:00
snippet figure reference to a figure
${1:Figure}~\ref{${2:fig:}}
2014-05-06 03:16:15 -04:00
snippet table reference to a table
${1:Table}~\ref{${2:tab:}}
2014-05-06 03:16:15 -04:00
snippet listing reference to a listing
${1:Listing}~\ref{${2:list}}
2014-05-06 03:16:15 -04:00
snippet section reference to a section
${1:Section}~\ref{sec:${2}} ${0}
2014-05-06 03:16:15 -04:00
snippet page reference to a page
${1:page}~\pageref{${2}} ${0}
2014-05-06 03:16:15 -04:00
snippet index \index
\index{${1:index}} ${0}
2012-08-24 06:28:08 -04:00
#Citations
2014-05-06 03:16:15 -04:00
snippet citen \citen
\citen{${1}} ${0}
2014-04-30 04:14:49 -04:00
# natbib citations
2014-05-06 03:16:15 -04:00
snippet citep \citep
\citep{${1}} ${0}
2014-05-06 03:16:15 -04:00
snippet citet \citet
\citet{${1}} ${0}
2014-05-06 03:16:15 -04:00
snippet cite \cite[]{}
\cite[${1}]{${2}} ${0}
2014-05-06 03:16:15 -04:00
snippet citea \citeauthor
\citeauthor{${1}} ${0}
2014-05-06 03:16:15 -04:00
snippet citey \citeyear
\citeyear{${1}} ${0}
2014-05-06 03:16:15 -04:00
snippet fcite \footcite[]{}
\footcite[${1}]{${2}}${0}
#Formating text: italic, bold, underline, small capital, emphase ..
2014-05-06 03:16:15 -04:00
snippet it italic text
\textit{${0:text}}
2014-05-06 03:16:15 -04:00
snippet bf bold face text
\textbf{${0:text}}
2014-05-06 03:16:15 -04:00
snippet under underline text
\underline{${0:text}}
2014-05-06 03:16:15 -04:00
snippet emp emphasize text
\emph{${0:text}}
2014-05-06 03:16:15 -04:00
snippet sc small caps text
\textsc{${0:text}}
#Choosing font
2014-05-06 03:16:15 -04:00
snippet sf sans serife text
\textsf{${0:text}}
2014-05-06 03:16:15 -04:00
snippet rm roman font text
\textrm{${0:text}}
2014-05-06 03:16:15 -04:00
snippet tt typewriter (monospace) text
\texttt{${0:text}}
#misc
2014-05-06 03:16:15 -04:00
snippet ft \footnote
\footnote{${0:text}}
2014-05-06 03:16:15 -04:00
snippet fig figure environment (includegraphics)
\begin{figure}
\begin{center}
2014-03-06 11:10:53 -05:00
\includegraphics[scale=${1}]{Figures/${2}}
\end{center}
\caption{${3}}
\label{fig:${4}}
\end{figure}
${0}
2014-05-06 03:16:15 -04:00
snippet tikz figure environment (tikzpicture)
\begin{figure}
\begin{center}
\begin{tikzpicture}[scale=${1:1}]
${2}
\end{tikzpicture}
\end{center}
2011-10-08 06:15:44 -04:00
\caption{${3}}
\label{fig:${4}}
\end{figure}
${0}
#math
2014-05-06 03:16:15 -04:00
snippet stackrel \stackrel{}{}
\stackrel{${1:above}}{${2:below}} ${0}
2014-05-06 03:16:15 -04:00
snippet frac \frac{}{}
\frac{${1:num}}{${2:denom}} ${0}
2014-05-06 03:16:15 -04:00
snippet sum \sum^{}_{}
\sum^{${1:n}}_{${2:i=1}} ${0}
2014-05-06 03:16:15 -04:00
snippet lim \lim_{}
\lim_{${1:x \to +\infty}} ${0}
2014-05-06 03:16:15 -04:00
snippet frame frame environment
2014-04-16 08:50:14 -04:00
\begin{frame}[${1:t}]{${2:title}}
${0}
2013-06-22 08:58:45 -04:00
\end{frame}
2014-05-06 03:16:15 -04:00
snippet block block environment
\begin{block}{${1:title}}
${0}
\end{block}
2014-05-06 03:16:15 -04:00
snippet alert alertblock environment
\begin{alertblock}{${1:title}}
${0}
\end{alertblock}
2014-05-06 03:16:15 -04:00
snippet example exampleblock environment
\begin{exampleblock}{${1:title}}
${0}
\end{exampleblock}
2014-05-06 03:16:15 -04:00
snippet col2 two-column environment
\begin{columns}
\begin{column}{0.5\textwidth}
${1}
\end{column}
\begin{column}{0.5\textwidth}
${0}
\end{column}
\end{columns}
2014-08-17 12:12:58 -04:00
# Code listings
snippet lst
\begin{listing}[language=${1:language}]
${0}
\end{listing}
snippet lsi
\lstinline|${1}| ${0}