diff options
| author | Nanderty <psopka@sopka.ch> | 2023-05-19 17:08:13 +0200 |
|---|---|---|
| committer | Nanderty <psopka@sopka.ch> | 2023-05-19 17:08:13 +0200 |
| commit | 95686ce8c52cab5d43ec5cc031ce3758589a5f8f (patch) | |
| tree | dd00f6c20d8bbfa4406e80512258aa60239b96b0 /lua/Snippets/tex/figures.lua | |
| parent | 5b86f069582eaff5d360e62e28dcaba3aee9de47 (diff) | |
| download | neovim-config-95686ce8c52cab5d43ec5cc031ce3758589a5f8f.tar.gz neovim-config-95686ce8c52cab5d43ec5cc031ce3758589a5f8f.tar.bz2 neovim-config-95686ce8c52cab5d43ec5cc031ce3758589a5f8f.zip | |
graphics
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 } + ), +} |
