Correzione UltiSnips definiti per LaTeX. Aggiunta env.

This commit is contained in:
Emiliano Vavassori 2023-06-16 00:11:51 +02:00
parent ff94169c66
commit e0bec091e2
2 changed files with 27 additions and 14 deletions

View File

@ -1,7 +1,13 @@
# vim:sts=2:sw=2 # vim:sts=2:sw=2
snippet env "Create environment from input" b
\begin{${1:${VISUAL:center}}}
$0
\end{$1}
endsnippet
snippet use "Usepackage" b snippet use "Usepackage" b
\usepackage[${2:options}]{${1:${VISUAL}}}$0 \usepackage[${2:italian}]{${1:${VISUAL:babel}}}$0
endsnippet endsnippet
snippet it "Italics (LaTeX macro)" snippet it "Italics (LaTeX macro)"
@ -9,32 +15,33 @@ snippet it "Italics (LaTeX macro)"
endsnippet endsnippet
snippet +it "Insert an item in an environment" b snippet +it "Insert an item in an environment" b
\item ${VISUAL}$0 \item ${1:${VISUAL}}
$0
endsnippet endsnippet
snippet bf "Bold (LaTeX macro)" snippet bf "Bold (LaTeX macro)"
\textbf{${1:${VISUAL}}}$0 \textbf{${1:${VISUAL}}} $0
endsnippet endsnippet
snippet sl "Slanted (LaTeX macro)" snippet sl "Slanted (LaTeX macro)"
\textsl{${1:${VISUAL}}}$0 \textsl{${1:${VISUAL}}} $0
endsnippet endsnippet
snippet sc "Small Caps (LaTeX macro)" snippet sc "Small Caps (LaTeX macro)"
\textsc{${1:${VISUAL}}}$0 \textsc{${1:${VISUAL}}} $0
endsnippet endsnippet
snippet em "Emphasize (LaTeX macro)" snippet em "Emphasize (LaTeX macro)"
\emph{${1:${VISUAL}}}$0 \emph{${1:${VISUAL}}} $0
endsnippet endsnippet
snippet al "Alert text" snippet al "Alert text"
\alert{${1:${VISUAL}}}<${2:overlay}>$0 \alert{${1:${VISUAL}}}<${2:overlay}> $0
endsnippet endsnippet
snippet ebl "Beamer Block Environment" b snippet ebl "Beamer Block Environment" b
\begin{block}{${2:titolo}}<$3> \begin{block}{${2:titolo}}<$3>
${VISUAL}$1 ${1:${VISUAL}}
\end{block} \end{block}
$0 $0
endsnippet endsnippet

View File

@ -3,7 +3,8 @@ snippet tarticle "Article Templates" b
%!TeX ts-program = xelatex %!TeX ts-program = xelatex
%!TeX encoding = utf-8 Unicode %!TeX encoding = utf-8 Unicode
\documentclass[11pt,a4paper]{article} \documentclass[11pt,a4paper]{article}
\usepackage[italian]{babel} \usepackage{polyglossia}
\setdefaultlanguage{italian}
\usepackage{fontspec,textcomp,xltxtra} \usepackage{fontspec,textcomp,xltxtra}
\defaultfontfeatures{Ligatures=Common} \defaultfontfeatures{Ligatures=Common}
\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} \setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light}
@ -31,7 +32,8 @@ snippet tbrevetalk "Breve talk (Beamer)" b
} }
\beamerdefaultoverlayspecification{<+->} \beamerdefaultoverlayspecification{<+->}
\usepackage[italian]{babel} \usepackage{polyglossia}
\setdefaultlanguage{italian}
\usepackage{fontspec,textcom,xltxtra} \usepackage{fontspec,textcom,xltxtra}
\title[$1]{$2} \title[$1]{$2}
@ -61,7 +63,8 @@ snippet tdelegafranco "Template per delega di Franco"
%!TeX ts-program = xelatex %!TeX ts-program = xelatex
%!TeX encoding = utf-8 Unicode %!TeX encoding = utf-8 Unicode
\documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp} \documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp}
\usepackage[italian]{babel} \usepackage{polyglossia}
\setdefaultlanguage{italian}
\usepackage{fontspec,textcomp,xltxtra,xcolor} \usepackage{fontspec,textcomp,xltxtra,xcolor}
\defaultfontfeatures{Ligatures=Common} \defaultfontfeatures{Ligatures=Common}
\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} \setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light}
@ -114,7 +117,8 @@ snippet tdelega "Template per delega di Emiliano"
%!TeX ts-program = xelatex %!TeX ts-program = xelatex
%!TeX encoding = utf-8 Unicode %!TeX encoding = utf-8 Unicode
\documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp} \documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp}
\usepackage[italian]{babel} \usepackage{polyglossia}
\setdefaultlanguage{italian}
\usepackage{fontspec,textcomp,xltxtra,xcolor} \usepackage{fontspec,textcomp,xltxtra,xcolor}
\defaultfontfeatures{Ligatures=Common} \defaultfontfeatures{Ligatures=Common}
\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} \setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light}
@ -167,7 +171,8 @@ snippet tfoldedletter "Template per lettera piegata."
%!TeX ts-program = xelatex %!TeX ts-program = xelatex
%!TeX encoding = utf-8 Unicode %!TeX encoding = utf-8 Unicode
\documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp} \documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp}
\usepackage[italian]{babel} \usepackage{polyglossia}
\setdefaultlanguage{italian}
\usepackage{fontspec,textcomp,xltxtra,xcolor} \usepackage{fontspec,textcomp,xltxtra,xcolor}
\defaultfontfeatures{Ligatures=Common} \defaultfontfeatures{Ligatures=Common}
\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} \setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light}
@ -214,7 +219,8 @@ snippet tletter "Template per lettera."
%!TeX ts-program = xelatex %!TeX ts-program = xelatex
%!TeX encoding = utf-8 Unicode %!TeX encoding = utf-8 Unicode
\documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp} \documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp}
\usepackage[italian]{babel} \usepackage{polyglossia}
\setdefaultlanguage{italian}
\usepackage{fontspec,textcomp,xltxtra,xcolor} \usepackage{fontspec,textcomp,xltxtra,xcolor}
\defaultfontfeatures{Ligatures=Common} \defaultfontfeatures{Ligatures=Common}
\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} \setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light}