This commit is contained in:
Zelong Kuang
2025-10-22 14:20:19 +11:00
parent 8c11269da8
commit e4013c2193
11 changed files with 354 additions and 300 deletions

View File

@@ -0,0 +1,40 @@
local ls = require("luasnip")
local c = ls.choice_node
local s = ls.snippet
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local fmta = require("luasnip.extras.fmt").fmta
local tex = require("util.latex")
local rep = require("luasnip.extras").rep
local line_begin = require("luasnip.extras.expand_conditions").line_begin
return {
s(
{ trig = "assignment" },
fmta(
[[
#import "@preview/sleek-university-assignment:0.1.0": assignment
#import "@preview/theorion:0.4.0": *
#show: assignment.with(
title: "Assignment 3",
authors: (
(
name: "Zelong Kuang",
email: "zelongk@student.unimelb.edu.au",
student-no: "1610081",
),
),
course: "<>",
)
<>
]],
{
i(1),
i(0),
}
),
{ condition = tex.in_text * line_begin }
),
}