summaryrefslogtreecommitdiffstats
path: root/lua/Snippets/tex/figures.lua
diff options
context:
space:
mode:
authorNanderty <psopka@sopka.ch>2024-11-24 16:45:51 +0100
committerNanderty <psopka@sopka.ch>2024-11-24 16:45:51 +0100
commite711158bb790bdcb6634df9521c880e9eb0c1d6b (patch)
tree92af30711edcd92ec15f937ea9a1a53ded741966 /lua/Snippets/tex/figures.lua
parent80af2a08c9c3bfad90cdcfd916c76ec32119e187 (diff)
downloadneovim-config-e711158bb790bdcb6634df9521c880e9eb0c1d6b.tar.gz
neovim-config-e711158bb790bdcb6634df9521c880e9eb0c1d6b.tar.bz2
neovim-config-e711158bb790bdcb6634df9521c880e9eb0c1d6b.zip
Snippet improvements
Diffstat (limited to 'lua/Snippets/tex/figures.lua')
-rw-r--r--lua/Snippets/tex/figures.lua27
1 files changed, 22 insertions, 5 deletions
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:<>}