-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.lua
33 lines (30 loc) · 860 Bytes
/
build.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
-- Build configuration file for apxproof
module = "apxproof"
typesetexe = "pdflatex"
typesetopts = " --interaction=nonstopmode"
typesetsuppfiles = {"*.bib"}
bibfiles = {"support/*.bib"}
textfiles = {"*.md", "LICENSE"}
function typeset(file, dir)
local errorlevel = tex(file, dir)
if errorlevel ~= 0 then
return errorlevel
else
local name = jobname(file)
errorlevel = bibtex(name, dir) + bibtex("bu1", dir)
if errorlevel == 0 then
local function cycle(name, dir)
return(
makeindex(name, dir, ".glo", ".gls", ".glg", glossarystyle) +
makeindex(name, dir, ".idx", ".ind", ".ilg", indexstyle) +
tex(file, dir)
)
end
for i = 1, typesetruns do
errorlevel = cycle(name, dir)
if errorlevel ~= 0 then break end
end
end
return errorlevel
end
end