Debian Codegraph @

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

raw
1 --[==========================================[--
2 L3BUILD FILE FOR NOTEBEAMER
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 = "notebeamer"
13 version = "v4.6A"
14 date = "2026-02-07"
15 maintainer = "Mingyu Xia"
16 uploader = "Mingyu Xia"
17 maintainid = "myhsia"
18 email = "[email protected]"
19 repository = "https://github.com/" .. maintainid .. "/" .. module
20 summary = "Package for printing slides on note pages"
21 description = "The notebeamer package provides an easy way to print slides on note pages quickly, 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 textfiles = {"*.md", "LICENSE", "*.lua"}
32 typesetdemofiles = {module .. "-demo.tex"}
33 typesetexe = "latexmk -pdf"
34 typesetruns = 1
35 uploadconfig = {
36 announcement_file = "announcement.md",
37 pkg = module,
38 version = version .. " " .. date,
39 author = maintainer,
40 uploader = uploader,
41 email = email,
42 summary = summary,
43 description = description,
44 license = "lppl1.3c",
45 ctanPath = "/macros/latex/contrib/" .. module,
46 announcement = announcement,
47 home = "https://github.com/" .. maintainid,
48 bugtracker = repository .. "/issues",
49 support = repository .. "/issues",
50 repository = repository,
51 development = "https://github.com/" .. maintainid,
52 update = true
53 }
54 function update_tag(file, content, tagname, tagdate)
55 tagname = version
56 tagdate = date
57 if string.match(file, "%.dtx$") then
58 content = string.gsub(content,
59 "\\def \\ntbm@date %{[^}]+%}",
60 "\\def \\ntbm@date {" .. tagdate .. "}")
61 content = string.gsub(content,
62 "\\def \\ntbm@version %{[^}]+%}",
63 "\\def \\ntbm@version {" .. tagname .. "}")
64 content = string.gsub(content,
65 "\\date{Released %d+%-%d+%-%d+\\quad \\texttt{v([%d%.A-Z]+)}}",
66 "\\date{Released " .. tagdate .. "\\quad \\texttt{" .. tagname .. "}}")
67 end
68 return content
69 end
70
71 --[== "Hacks" to `l3build` | Do not Modify ==]--
72
73 function docinit_hook()
74 cp(ctanreadme, unpackdir, currentdir)
75 return 0
76 end
77 function tex(file,dir,cmd)
78 dir = dir or "."
79 cmd = cmd or typesetexe
80 if os.getenv("WINDIR") ~= nil or os.getenv("COMSPEC") ~= nil then
81 upretex_aux = "-usepretex=\"" .. typesetcmds .. "\""
82 makeidx_aux = "-e \"$makeindex=q/makeindex -s " .. indexstyle .. " %O %S/\""
83 sandbox_aux = "set \"TEXINPUTS=../unpacked;%TEXINPUTS%;\" &&"
84 else
85 upretex_aux = "-usepretex=\'" .. typesetcmds .. "\'"
86 makeidx_aux = "-e \'$makeindex=q/makeindex -s " .. indexstyle .. " %O %S/\'"
87 sandbox_aux = "TEXINPUTS=\"../unpacked:$(kpsewhich -var-value=TEXINPUTS):\""
88 end
89 return run(dir, sandbox_aux .. " " .. cmd .. " " ..
90 upretex_aux .. " " .. makeidx_aux .. " " .. file)
91 end