Skip to content

LaTeX snippets for sectioning commands include labels #1474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions UltiSnips/tex.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -520,4 +520,59 @@ snippet subpar* "Sub Paragraph*" wi
\subparagraph*{$1${VISUAL}}
endsnippet

snippet chapl "Chapter with label" wi
\chapter{$1${VISUAL}}
\label{cha:${2:${1/\W+/-/g}}}
endsnippet

snippet secl "Section with label" wi
\section{$1${VISUAL}}
\label{sec:${2:${1/\W+/-/g}}}
endsnippet

snippet sec*l "Section* with label" wi
\section*{$1${VISUAL}}
\label{sec:${2:${1/\W+/-/g}}}
endsnippet

snippet subl "Subsection with label" wi
\subsection{$1${VISUAL}}
\label{sub:${2:${1/\W+/-/g}}}
endsnippet

snippet sub*l "Subsection* with label" wi
\subsection*{$1${VISUAL}}
\label{sub:${2:${1/\W+/-/g}}}
endsnippet

snippet subsubl "Subsection with label" wi
\subsubsection{$1${VISUAL}}
\label{ssub:${2:${1/\W+/-/g}}}
endsnippet

snippet subsub*l "Subsubsection with label" wi
\subsubsection*{$1${VISUAL}}
\label{ssub:${2:${1/\W+/-/g}}}
endsnippet

snippet parl "Paragraph with label" wi
\paragraph{$1${VISUAL}}
\label{par:${2:${1/\W+/-/g}}}
endsnippet

snippet par*l "Paragraph* with label" wi
\paragraph*{$1${VISUAL}}
\label{par:${2:${1/\W+/-/g}}}
endsnippet

snippet subparl "Sub Paragraph with label" wi
\subparagraph{$1${VISUAL}}
\label{subp:${2:${1/\W+/-/g}}}
endsnippet

snippet subpar*l "Sub Paragraph* with label" wi
\subparagraph*{$1${VISUAL}}
\label{subp:${2:${1/\W+/-/g}}}
endsnippet

# vim:ft=snippets: