Emacs: largely improved LaTeX snipppets.

master
Ambrevar 2012-09-28 19:48:54 +02:00
parent 78ebeb65d8
commit 64cb798abc
20 changed files with 71 additions and 23 deletions

View File

@ -5,8 +5,11 @@
# name: \documentclass{beamer} ...
# --
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[xcolor=latex,svgnames,table]{beamer}
\documentclass{beamer}
%% \documentclass[xcolor=latex,svgnames,table]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{eurosym}
\DeclareUnicodeCharacter{20AC}{\euro{}}
% \usepackage[T1]{fontenc}
% \usepackage{lmodern}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -1,7 +0,0 @@
#contributor : Rodrigo Setti <rodrigosetti@gmail.com>
#name : \begin{environment} ... \end{environment}
# --
\begin{${1:environment}}
$0
\end{$1}

View File

@ -5,6 +5,6 @@
# group: environments
# name: \begin{environment} ... \end{environment}
# --
\begin{${1:$$(yas/choose-value (mapcar 'car (LaTeX-environment-list)))}}
\begin{$1}
$0
\end{$1}

View File

@ -2,6 +2,6 @@
# contributor: Márcio M. Ribeiro <marcio.mr@gmail.com>
# key: bf
# group: font
# name: {\bf ... }
# name: \textbf{ ... }
# --
{\bf $1}$0
\textbf{$1}$0

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor : Pierre Neidhardt <ambrevar at gmail dot com>
# key: center
# group: environments
# name: \begin{center}
# --
\begin{center}
$0
\end{center}

View File

@ -3,7 +3,7 @@
# key : cha
# group: sections
# name : \chapter
# option: \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
# --
\chapter{${1:name}}
\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
$0

View File

@ -4,6 +4,9 @@
# name: \documentclass
# --
\documentclass[$2]{${1:$$(yas/choose-value '("article" "report" "book" "letter"))}}
\usepackage[utf8]{inputenc}
\usepackage{eurosym}
\DeclareUnicodeCharacter{20AC}{\euro{}}
\begin{document}
$0

View File

@ -2,6 +2,6 @@
# contributor: Márcio M. Ribeiro <marcio.mr@gmail.com>
# key: em
# group: font
# name: {\em ...}
# name: \emph{...}
# --
{\em $1}$0
\emph{$1}$0

View File

@ -3,8 +3,8 @@
# key: eq
# group: math
# name: \begin{equation} ... \end{equation}
# option: \label{${1:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
# --
\begin{equation}
\label{${1:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
$0
\end{equation}

View File

@ -3,10 +3,10 @@
# key : fig
# group: environments
# name : \begin{figure} ... \end{figure}
# option: \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
# --
\begin{figure}[htbp]
\centering
$0
\caption{${1:caption}}
\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
\end{figure}

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# contributor: Márcio M. Ribeiro <marcio.mr@gmail.com>
# key: foot
# group: environment
# name: \footnote{...}
# --
\footnote{$1}$0

View File

@ -1,7 +1,7 @@
# -*- mode: snippet -*-
# contributor: Mads D. Kristensen <madsdk@gmail.com>
# key: it
# group: environments
# name: \item
# group: font
# name: \textit{}
# --
\item $0
\textit{$1}$0

View File

@ -3,5 +3,6 @@
# key: lab
# group: references
# name : \label
# option: \label{${1:label$(unless yas/modified-p (reftex-label nil 'dont-insert))}}$0
# --
\label{${1:label$(unless yas/modified-p (reftex-label nil 'dont-insert))}}$0
\label{$1}$0

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# contributor: Mads D. Kristensen <madsdk@gmail.com>
# key: lil
# group: environments
# name: \lstinline
# --
\lstinline @$1@$0

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor: Mads D. Kristensen <madsdk@gmail.com>
# key: listing
# group: environments
# name: \begin{lstlisting}
# --
\begin{lstlisting}
$0
\end{lstlisting}

View File

@ -3,7 +3,7 @@
# key: par
# group: sections
# name : \paragraph
# option: \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
# --
\paragraph{${1:name}}
\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
$0

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor: Mads D. Kristensen <madsdk@gmail.com>
# key: parbox
# group: environments
# name: \parbox{...}
# --
\parbox[${1:htbp}]{${2:1.0}${3:\linewidth}}{
$0
}

View File

@ -3,7 +3,7 @@
# key : sec
# group: sections
# name : \section
# option: \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
# --
\section{${1:name}}
\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
$0

View File

@ -3,7 +3,7 @@
# key: ssub
# group: sections
# name : \subsubsection
# option: \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
# --
\subsubsection{${1:name}}
\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
$0

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# contributor: Márcio M. Ribeiro <marcio.mr@gmail.com>
# key: tt
# group: font
# name: \texttt{ ... }
# --
\texttt{$1}$0