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} ... # name: \documentclass{beamer} ...
# -- # --
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[xcolor=latex,svgnames,table]{beamer} \documentclass{beamer}
%% \documentclass[xcolor=latex,svgnames,table]{beamer}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage{eurosym}
\DeclareUnicodeCharacter{20AC}{\euro{}}
% \usepackage[T1]{fontenc} % \usepackage[T1]{fontenc}
% \usepackage{lmodern} % \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 # group: environments
# name: \begin{environment} ... \end{environment} # name: \begin{environment} ... \end{environment}
# -- # --
\begin{${1:$$(yas/choose-value (mapcar 'car (LaTeX-environment-list)))}} \begin{$1}
$0 $0
\end{$1} \end{$1}

View File

@ -2,6 +2,6 @@
# contributor: Márcio M. Ribeiro <marcio.mr@gmail.com> # contributor: Márcio M. Ribeiro <marcio.mr@gmail.com>
# key: bf # key: bf
# group: font # 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 # key : cha
# group: sections # group: sections
# name : \chapter # name : \chapter
# option: \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
# -- # --
\chapter{${1:name}} \chapter{${1:name}}
\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
$0 $0

View File

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

View File

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

View File

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

View File

@ -3,10 +3,10 @@
# key : fig # key : fig
# group: environments # group: environments
# name : \begin{figure} ... \end{figure} # 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] \begin{figure}[htbp]
\centering \centering
$0 $0
\caption{${1:caption}} \caption{${1:caption}}
\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
\end{figure} \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 -*- # -*- mode: snippet -*-
# contributor: Mads D. Kristensen <madsdk@gmail.com> # contributor: Mads D. Kristensen <madsdk@gmail.com>
# key: it # key: it
# group: environments # group: font
# name: \item # name: \textit{}
# -- # --
\item $0 \textit{$1}$0

View File

@ -3,5 +3,6 @@
# key: lab # key: lab
# group: references # group: references
# name : \label # 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 # key: par
# group: sections # group: sections
# name : \paragraph # name : \paragraph
# option: \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
# -- # --
\paragraph{${1:name}} \paragraph{${1:name}}
\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
$0 $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 # key : sec
# group: sections # group: sections
# name : \section # name : \section
# option: \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
# -- # --
\section{${1:name}} \section{${1:name}}
\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
$0 $0

View File

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