From e711158bb790bdcb6634df9521c880e9eb0c1d6b Mon Sep 17 00:00:00 2001 From: Nanderty Date: Sun, 24 Nov 2024 16:45:51 +0100 Subject: Snippet improvements --- lua/Snippets/tex/figures.lua | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'lua/Snippets/tex/figures.lua') diff --git a/lua/Snippets/tex/figures.lua b/lua/Snippets/tex/figures.lua index e2fddd5..32def02 100644 --- a/lua/Snippets/tex/figures.lua +++ b/lua/Snippets/tex/figures.lua @@ -3,7 +3,27 @@ local helper = require('Snippets.luasniphelpers') return { - + s({ trig = 'tikzfig', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{figure}[!h] + \centering + \begin{tikzpicture} + <> + \end{tikzpicture} + \caption{<> + } + \label{fig:<>} +\end{figure} +]], + { + i(1), + i(2), + i(3), + } + ), + { condition = helper.line_begin } + ), s({ trig = 'imfig', snippetType = 'autosnippet' }, fmta( @@ -33,10 +53,7 @@ return { [[ \begin{figure}[!h] \centering - \resizebox - {<>} - {!} - {\input{<>}} + {\includegraphics[<>]{<>}} \caption{<> } \label{fig:<>} -- cgit v1.2.3