summaryrefslogtreecommitdiffstats
path: root/lua/Snippets/tex/figures.lua
diff options
context:
space:
mode:
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:<>}