feat: Add more typst snippets

This commit is contained in:
Fabio Lenherr / DashieTM 2023-05-13 13:24:20 +02:00
parent 3dbf0bb5ee
commit 482a6fd4a1

View file

@ -43,5 +43,32 @@ local imageSnippet = s(
) )
table.insert(snippets, imageSnippet) table.insert(snippets, imageSnippet)
local centerImageSnippet = s(
"cimage-",
fmt(
[[
#align(center, [#image("{1}", width: {2}%)])
]],
{
i(1, "image"),
i(2, "width"),
}
)
)
table.insert(snippets, centerImageSnippet)
local colSnippet = s(
"col-",
fmt(
[[
#columns({1}, [{2}])
]],
{
i(1, "col-amount"),
i(2, "content"),
}
)
)
table.insert(snippets, colSnippet)
------------------------------------------------- snippets end ------------------------------------------------- snippets end
return snippets, autosnippets return snippets, autosnippets