Skip to content

Commit

Permalink
LaTeX: Remove square braces if options removed
Browse files Browse the repository at this point in the history
Same behaviour as with class and id in html div tags.
  • Loading branch information
Evan Wilde authored and lpil committed Apr 9, 2017
1 parent 64dae68 commit 457362e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion UltiSnips/tex.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ $0
endsnippet

snippet pac "Package" b
\usepackage[${1:options}]{${2:package}}$0
\usepackage`!p snip.rv='[' if t[1] else ""`${1:options}`!p snip.rv = ']' if t[1] else ""`{${2:package}}$0
endsnippet

snippet lp "Long parenthesis"
Expand Down
8 changes: 4 additions & 4 deletions snippets/tex.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ snippet sub* \subsection*
${0}
# Sub Sub Section
snippet ssub \subsubsection
\subsubsection{${1:subsubsection name}}
\label{ssub:${2:$1}}
\\subsubsection{${1:subsubsection name}}
\\label{ssub:${2:$1}}
${0}
# Sub Sub Section without number
snippet ssub* \subsubsection*
\subsubsection*{${1:subsubsection name}}
\label{ssub:${2:$1}}
\\subsubsection*{${1:subsubsection name}}
\\label{ssub:${2:$1}}
${0}
# Paragraph
snippet par \paragraph
Expand Down

0 comments on commit 457362e

Please sign in to comment.