From 95686ce8c52cab5d43ec5cc031ce3758589a5f8f Mon Sep 17 00:00:00 2001 From: Nanderty Date: Fri, 19 May 2023 17:08:13 +0200 Subject: graphics --- lua/Snippets/tex/figures.lua | 71 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 lua/Snippets/tex/figures.lua (limited to 'lua/Snippets/tex/figures.lua') diff --git a/lua/Snippets/tex/figures.lua b/lua/Snippets/tex/figures.lua new file mode 100644 index 0000000..f95d874 --- /dev/null +++ b/lua/Snippets/tex/figures.lua @@ -0,0 +1,71 @@ +local tex = require('Snippets.luasniphelperslatex') +local helper = require('Snippets.luasniphelpers') + +return { + + s({ trig = 'chfig', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{figure}[h] + \centering + \chemfig { + <> + } + \caption{<>} + \label{fig:<>} +\end{figure} +]], + { + i(1), + i(2), + i(3), + } + ), + { condition = helper.line_begin } + ), + + s({ trig = 'imfig', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{figure}[h] + \centering + \includegraphics + [<>] + {<>} + \caption{<>} + \label{fig:<>} +\end{figure} +]], + { + i(1), + i(2), + i(3), + i(4), + } + ), + { condition = helper.line_begin } + ), + + s({ trig = 'pdfig', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{figure}[h] + \centering + \resizebox + {<>} + {!} + {\input{<>}} + \caption{<>} + \label{fig:<>} +\end{figure} +]], + { + i(1), + i(2), + i(3), + i(4), + } + ), + { condition = helper.line_begin } + ), +} -- cgit v1.2.3