diff options
Diffstat (limited to 'lua/Snippets/tex/tables.lua')
| -rw-r--r-- | lua/Snippets/tex/tables.lua | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/lua/Snippets/tex/tables.lua b/lua/Snippets/tex/tables.lua new file mode 100644 index 0000000..80531e1 --- /dev/null +++ b/lua/Snippets/tex/tables.lua @@ -0,0 +1,52 @@ +local helper = require('Snippets.luasniphelpers') +local helper = require('Snippets.luasniphelpers') + +return { + + s({ trig = 'tbl', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{table}[!h] + \centering + \begin{tabular}{ <> } + <> + \end{tabular} + \caption{<> + } + \label{fig:<>} +\end{table} +]], + { + i(1), + i(2), + i(3), + i(4), + } + ), + { condition = helper.line_begin } + ), + + s({ trig = 'tbx', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{table}[!h] + \centering + \begin{tabularx}{\textwidth}{ <> } + <> + \end{tabularx} + \caption{<> + } + \label{fig:<>} +\end{table} +]], + { + i(1), + i(2), + i(3), + i(4), + } + ), + { condition = helper.line_begin } + ), + +} |
