diff options
Diffstat (limited to 'lua/Snippets/tex/figures.lua')
| -rw-r--r-- | lua/Snippets/tex/figures.lua | 71 |
1 files changed, 71 insertions, 0 deletions
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 } + ), +} |
