Permalink
Browse files

Changing LaTeX snippets to be more like my TextMate LaTeX snippets

  • Loading branch information...
1 parent 6432778 commit 59e8a406730148413c125d08fc43ef036e41c971 @lianos committed Jul 30, 2012
@@ -1,9 +1,8 @@
# -*- mode: snippet -*-
-# contributor : Mads D. Kristensen <madsdk@gmail.com>
+# contributor : Steve Lianoglou <slianoglouk@gmail.com>
# key : cha
# group: sections
# name : \chapter
# --
\chapter{${1:name}}
-\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
-$0
+\label{cha:${2:${1:$(replace-regexp-in-string "[^[:alnum:]]" "_" yas/text)}}}
@@ -4,9 +4,9 @@
# group: environments
# name : \begin{figure} ... \end{figure}
# --
-\begin{figure}[htbp]
+\begin{figure}[${1:htbp}]
\centering
- $0
- \caption{${1:caption}}
- \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
+ \includegraphics[${2:sclale=${3:1}}]{${4:file}}
+ \caption{${5:caption}}
+ \label{fig:${6:label}}
\end{figure}
@@ -1,9 +1,10 @@
# -*- mode: snippet -*-
-# contributor : Mads D. Kristensen <madsdk@gmail.com>
+# contributor : Steve Lianoglou <slianoglou@gmail.com>
# key : sec
# group: sections
# name : \section
# --
-\section{${1:name}}
-\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
-$0
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% ${1:section name}
+\section{$1}
+\label{sec:${2:${1:$(replace-regexp-in-string "[^[:alnum:]]" "_" yas/text)}}}
@@ -1,9 +1,10 @@
# -*- mode: snippet -*-
-# contributor : Mads D. Kristensen <madsdk@gmail.com>
+# contributor : Steve Lianoglou <slianoglou@gmail.com>
# key: ssub
# group: sections
# name : \subsubsection
# --
-\subsubsection{${1:name}}
-\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
-$0
+%% -----------------------------------------------------------------------------
+%% ${1:subsubsection name}
+\subsubsection{$1}
+\label{ssub:${2:${1:$(replace-regexp-in-string "[^[:alnum:]]" "_" yas/text)}}}
@@ -1,9 +1,10 @@
# -*- mode: snippet -*-
-# contributor : Mads D. Kristensen <madsdk@gmail.com>
+# contributor : Steve Lianoglou <slianoglou@gmail.com>
# key: sub
# group: sections
# name : \subsection
# --
-\subsection{${1:name}}
-\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}}
-$0
+%% -----------------------------------------------------------------------------
+%% ${1:subsection name}
+\subsection{$1}
+\label{sub:${2:${1:$(replace-regexp-in-string "[^[:alnum:]]" "_" yas/text)}}}

0 comments on commit 59e8a40

Please sign in to comment.