build.lua eol

This commit is contained in:
ranwang
2026-02-28 13:17:01 +08:00
parent 24896705bf
commit 297025913d
2 changed files with 6 additions and 5 deletions

3
.gitattributes vendored
View File

@@ -5,4 +5,5 @@ LICENSE text eol=lf
*.md text eol=lf *.md text eol=lf
.gitattributes text eol=lf .gitattributes text eol=lf
*.cls text eol=lf *.cls text eol=lf
*.bib text eol=lf *.bib text eol=lf
build.lua text eol=lf

View File

@@ -67,19 +67,19 @@ function typeset(file, dir, exe)
return run(dir, cmd .. file) return run(dir, cmd .. file)
end end
-- Copy files into the typeset build dir -- Copy required files into the typeset build dir
function docinit_hook() function docinit_hook()
-- Copy .cls.bib -- Copy .cls, .bib support files
for _, glob in pairs(typesetsuppfiles) do for _, glob in pairs(typesetsuppfiles) do
cp(glob, currentdir, typesetdir) cp(glob, currentdir, typesetdir)
end end
-- Copy figure/ and image/ -- Copy image subdirectory
for _, subdir in pairs({imagesuppdir, figuresuppdir}) do for _, subdir in pairs({imagesuppdir, figuresuppdir}) do
local dest = typesetdir .. "/" .. subdir local dest = typesetdir .. "/" .. subdir
mkdir(dest) mkdir(dest)
cp("*", subdir, dest) cp("*", subdir, dest)
end end
-- Copy .tex -- Copy tex source files
for _, texfile in pairs(typesetfiles) do for _, texfile in pairs(typesetfiles) do
cp(texfile, currentdir, typesetdir) cp(texfile, currentdir, typesetdir)
end end