mirror of
https://github.com/ElegantLaTeX/ElegantBook.git
synced 2026-06-01 10:05:16 +08:00
Compare commits
5 Commits
3fa8d4f7eb
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b90c11e4a | ||
|
|
84c32c4d01 | ||
|
|
7fc52cfd28 | ||
|
|
0ff65a8217 | ||
|
|
7bc9b22723 |
51
build.lua
51
build.lua
@@ -8,7 +8,7 @@
|
||||
Do Check Before Upload
|
||||
--]==========================================]--
|
||||
module = "elegantbook"
|
||||
version = "2.61"
|
||||
version = "4.7 2026-05-01"
|
||||
maintainer = "Ran Wang"
|
||||
uploader = maintainer
|
||||
maintainid = "ElegantLaTeX"
|
||||
@@ -25,7 +25,7 @@ description = [[ElegantBook is designed for writing Books. This template is
|
||||
--]==========================================]--
|
||||
ctanzip = module
|
||||
excludefiles = {"*~"}
|
||||
textfiles = {"*.md", "LICENSE", "*.lua", "*.cls", "*.bib"}
|
||||
textfiles = {"*.md", "LICENSE", "*.lua", "*.cls", "*.bib", "*.tex"}
|
||||
typesetexe = "latexmk -pdf"
|
||||
typesetfiles = {module .. "-cn.tex", module .. "-en.tex"}
|
||||
typesetopts = "-interaction=nonstopmode"
|
||||
@@ -35,6 +35,9 @@ imagesuppdir = "image"
|
||||
figuresuppdir = "figure"
|
||||
specialtypesetting = specialtypesetting or {}
|
||||
specialtypesetting[module .. "-cn.tex"] = {cmd = "latexmk -pdfxe"}
|
||||
binaryfiles = {"*.png", "*.jpg", "*.pdf"}
|
||||
sourcefiles = {"*.cls", "*.bib"}
|
||||
docfiles = {"*.pdf", "*.md", "LICENSE", module .. "-cn.tex", module .. "-en.tex"}
|
||||
|
||||
uploadconfig = {
|
||||
pkg = module,
|
||||
@@ -48,7 +51,6 @@ uploadconfig = {
|
||||
note = note,
|
||||
license = "lppl1.3c",
|
||||
ctanPath = "/macros/latex/contrib/" .. module .. "/",
|
||||
home = repository,
|
||||
support = repository .. "/issues",
|
||||
bugtracker = repository .. "/issues",
|
||||
repository = repository,
|
||||
@@ -56,47 +58,48 @@ uploadconfig = {
|
||||
update = true
|
||||
}
|
||||
|
||||
--[==========================================[--
|
||||
Custom Hooks for Directory Structure
|
||||
--]==========================================]--
|
||||
|
||||
function tex(file, dir, cmd)
|
||||
dir = dir or "."
|
||||
cmd = cmd or typesetexe .. " " .. typesetopts
|
||||
return run(dir, cmd .. " " .. file)
|
||||
end
|
||||
|
||||
-- Copy required files into the typeset build dir
|
||||
function docinit_hook()
|
||||
-- Copy .cls, .bib support files
|
||||
for _, glob in pairs(typesetsuppfiles) do
|
||||
cp(glob, currentdir, typesetdir)
|
||||
end
|
||||
-- Copy image subdirectory
|
||||
|
||||
for _, subdir in pairs({imagesuppdir, figuresuppdir}) do
|
||||
local dest = typesetdir .. "/" .. subdir
|
||||
mkdir(dest)
|
||||
cp("*", subdir, dest)
|
||||
end
|
||||
-- Copy tex source files
|
||||
|
||||
for _, texfile in pairs(typesetfiles) do
|
||||
cp(texfile, currentdir, typesetdir)
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
-- Pack CTAN directory: cls, bib, tex sources, PDFs, and asset subdirs
|
||||
function copyctan()
|
||||
local pkgdir = ctandir .. "/" .. ctanpkg
|
||||
mkdir(pkgdir)
|
||||
for _, glob in pairs(typesetsuppfiles) do
|
||||
cp(glob, currentdir, pkgdir)
|
||||
local target = ctandir .. "/" .. ctanpkg
|
||||
mkdir(target)
|
||||
|
||||
for _, f in ipairs(textfiles) do
|
||||
cp(f, ".", target)
|
||||
end
|
||||
for _, texfile in pairs(typesetfiles) do
|
||||
cp(texfile, currentdir, pkgdir)
|
||||
end
|
||||
for _, glob in pairs(pdffiles or {"*.pdf"}) do
|
||||
cp(glob, typesetdir, pkgdir)
|
||||
end
|
||||
for _, subdir in pairs({imagesuppdir, figuresuppdir}) do
|
||||
local dest = pkgdir .. "/" .. subdir
|
||||
mkdir(dest)
|
||||
cp("*", subdir, dest)
|
||||
end
|
||||
end
|
||||
|
||||
cp("*.pdf", typesetdir, target)
|
||||
|
||||
mkdir(target .. "/" .. figuresuppdir)
|
||||
cp("*", figuresuppdir, target .. "/" .. figuresuppdir)
|
||||
|
||||
mkdir(target .. "/" .. imagesuppdir)
|
||||
cp("*", imagesuppdir, target .. "/" .. imagesuppdir)
|
||||
|
||||
return 0
|
||||
end
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
\author{Ethan Deng \& Liam Huang \& syvshc \& sikouhjw \& Osbert Wang}
|
||||
\institute{Elegant\LaTeX\ Program}
|
||||
\date{2026/2/27}
|
||||
\version{4.6}
|
||||
\date{2026/5/1}
|
||||
\version{4.7}
|
||||
\bioinfo{自定义}{信息}
|
||||
|
||||
\extrainfo{\textcolor{red}{\bfseries 注意:本模板自2023年1月1日起停止维护。然而,鉴于用户群体庞大,自2026年起恢复维护并重新发布。}}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
\author{Ethan Deng, Liam Huang, syvshc, sikouhjw \& Osbert Wang}
|
||||
\institute{Elegant\LaTeX\ Program}
|
||||
\date{Feb. 27, 2026}
|
||||
\version{4.6}
|
||||
\date{May 1, 2026}
|
||||
\version{4.7}
|
||||
\bioinfo{Bio}{Information}
|
||||
|
||||
\extrainfo{\textcolor{red}{\bfseries Caution: This template will no longer be maintained since January 1st, 2023. However, due to its large user base, maintenance has resumed and the template has been re-released as of 2026.}}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
% It is available at https://github.com/ElegantLaTeX/ElegantBook
|
||||
% -----------------------------------------------------------------------------
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesClass{elegantbook}[2026/2/27 v4.6 ElegantBook document class]
|
||||
\ProvidesClass{elegantbook}[2026/05/01 v4.7 ElegantBook document class]
|
||||
|
||||
%%%
|
||||
\RequirePackage{kvoptions}
|
||||
|
||||
Reference in New Issue
Block a user