Debian Codegraph @

texmf-dist/doc/latex/litetable/build.lua

raw
1 --[==========================================[--
2 L3BUILD FILE FOR LITETABLE
3 Once Pushed With This File Modified
4 A New Release Will Be Published
5 --]==========================================]--
6
7 --[==========================================[--
8 Basic Information
9 Do Check Before Push
10 --]==========================================]--
11
12 module = "litetable"
13 version = "v3.9A"
14 date = "2026-02-07"
15 maintainer = "Mingyu Xia; Lijun Guo"
16 uploader = "Mingyu Xia"
17 maintainid = "myhsia"
18 email = "[email protected]"
19 repository = "https://github.com/" .. maintainid .. "/" .. module
20 summary = "A Colorful Timetable Design"
21 description = "The litetable package provides a colorful timetable design, developed by expl3 based on TikZ"
22
23 --[==========================================[--
24 Build, Pack, Tag, and Upload
25 Do not Modify Unless Necessary
26 --]==========================================]--
27
28 ctanzip = module
29 cleanfiles = {"*.log", "*.pdf", "*.zip", "*.curlopt"}
30 excludefiles = {"*~"}
31 tagfiles = {"*.dtx", "*.tex"}
32 textfiles = {"*.md", "LICENSE", "*.lua"}
33 typesetcmds = ""
34 typesetdemofiles = {module .. "-demo.tex"}
35 typesetexe = "latexmk -pdf"
36 typesetfiles = {"*.dtx", module .. "-zh-cn.tex", module .. "-zh-hk.tex"}
37 typesetruns = 1
38 specialtypesetting = specialtypesetting or {}
39 specialtypesetting["litetable-zh-cn.tex"] = {cmd = "latexmk -xelatex"}
40 specialtypesetting["litetable-zh-hk.tex"] = {cmd = "latexmk -xelatex"}
41 uploadconfig = {
42 announcement_file = "announcement.md",
43 pkg = module,
44 version = version .. " " .. date,
45 author = maintainer,
46 uploader = uploader,
47 email = email,
48 summary = summary,
49 description = description,
50 license = "lppl1.3c",
51 ctanPath = "/macros/latex/contrib/" .. module,
52 announcement = announcement,
53 home = "https://github.com/" .. maintainid,
54 bugtracker = repository .. "/issues",
55 support = repository .. "/issues",
56 repository = repository,
57 development = "https://github.com/" .. maintainid,
58 update = true
59 }
60 function update_tag(file, content, tagname, tagdate)
61 tagname = version
62 tagdate = date
63 if string.match(file, "%.dtx$") or string.match(file, "%.tex$") then
64 content = string.gsub(content,
65 "\\ProvidesExplPackage {" .. module .. "} %{[^}]+%} %{[^}]+%}[\r\n%s]*%{[^}]+%}",
66 "\\ProvidesExplPackage {" .. module .. "} {" .. tagdate .. "} {" .. tagname .. "}\n {" .. summary .. "}")
67 content = string.gsub(content,
68 "\\date{Released %d+%-%d+%-%d+\\quad \\texttt{v([%d%.A-Z]+)}}",
69 "\\date{Released " .. tagdate .. "\\quad \\texttt{" .. tagname .. "}}")
70 end
71 return content
72 end
73
74 --[== "Hacks" to `l3build` | Do not Modify ==]--
75
76 function docinit_hook()
77 cp(ctanreadme, unpackdir, currentdir)
78 return 0
79 end
80 function tex(file,dir,cmd)
81 dir = dir or "."
82 cmd = cmd or typesetexe
83 if os.getenv("WINDIR") ~= nil or os.getenv("COMSPEC") ~= nil then
84 upretex_aux = "-usepretex=\"" .. typesetcmds .. "\""
85 makeidx_aux = "-e \"$makeindex=q/makeindex -s " .. indexstyle .. " %O %S/\""
86 sandbox_aux = "set \"TEXINPUTS=../unpacked;%TEXINPUTS%;\" &&"
87 else
88 upretex_aux = "-usepretex=\'" .. typesetcmds .. "\'"
89 makeidx_aux = "-e \'$makeindex=q/makeindex -s " .. indexstyle .. " %O %S/\'"
90 sandbox_aux = "TEXINPUTS=\"../unpacked:$(kpsewhich -var-value=TEXINPUTS):\""
91 end
92 return run(dir, sandbox_aux .. " " .. cmd .. " " ..
93 upretex_aux .. " " .. makeidx_aux .. " " .. file)
94 end