feat: Add more typst snippets
This commit is contained in:
parent
3dbf0bb5ee
commit
482a6fd4a1
1 changed files with 27 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue