Skip to content

Commit f20b3c4

Browse files
committed
LaTeX snippets for sectioning commands include labels
1 parent 8c91794 commit f20b3c4

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

UltiSnips/tex.snippets

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,4 +520,59 @@ snippet subpar* "Sub Paragraph*" wi
520520
\subparagraph*{$1${VISUAL}}
521521
endsnippet
522522

523+
snippet chapl "Chapter with label" wi
524+
\chapter{$1${VISUAL}}
525+
\label{cha:${2:${1/\W+/-/g}}}
526+
endsnippet
527+
528+
snippet secl "Section with label" wi
529+
\section{$1${VISUAL}}
530+
\label{sec:${2:${1/\W+/-/g}}}
531+
endsnippet
532+
533+
snippet sec*l "Section* with label" wi
534+
\section*{$1${VISUAL}}
535+
\label{sec:${2:${1/\W+/-/g}}}
536+
endsnippet
537+
538+
snippet subl "Subsection with label" wi
539+
\subsection{$1${VISUAL}}
540+
\label{sub:${2:${1/\W+/-/g}}}
541+
endsnippet
542+
543+
snippet sub*l "Subsection* with label" wi
544+
\subsection*{$1${VISUAL}}
545+
\label{sub:${2:${1/\W+/-/g}}}
546+
endsnippet
547+
548+
snippet subsubl "Subsection with label" wi
549+
\subsubsection{$1${VISUAL}}
550+
\label{ssub:${2:${1/\W+/-/g}}}
551+
endsnippet
552+
553+
snippet subsub*l "Subsubsection with label" wi
554+
\subsubsection*{$1${VISUAL}}
555+
\label{ssub:${2:${1/\W+/-/g}}}
556+
endsnippet
557+
558+
snippet parl "Paragraph with label" wi
559+
\paragraph{$1${VISUAL}}
560+
\label{par:${2:${1/\W+/-/g}}}
561+
endsnippet
562+
563+
snippet par*l "Paragraph* with label" wi
564+
\paragraph*{$1${VISUAL}}
565+
\label{par:${2:${1/\W+/-/g}}}
566+
endsnippet
567+
568+
snippet subparl "Sub Paragraph with label" wi
569+
\subparagraph{$1${VISUAL}}
570+
\label{subp:${2:${1/\W+/-/g}}}
571+
endsnippet
572+
573+
snippet subpar*l "Sub Paragraph* with label" wi
574+
\subparagraph*{$1${VISUAL}}
575+
\label{subp:${2:${1/\W+/-/g}}}
576+
endsnippet
577+
523578
# vim:ft=snippets:

0 commit comments

Comments
 (0)