diff --git a/CHANGELOG.md b/CHANGELOG.md index f2e6404c..c9f04681 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +## [v3.3.0] - 2021-03-18 + ### Added - 添加软件工程专业的封面的格式的支持。 @@ -229,7 +231,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - 优化图注、算法的行距。 - 二级以下节标题编号下采用“1.”、“(1)”、“①”。 -[Unreleased]: https://github.com/ustctug/ustcthesis/compare/v3.2.1...HEAD +[Unreleased]: https://github.com/ustctug/ustcthesis/compare/v3.3.0...HEAD +[v3.3.0]: https://github.com/ustctug/ustcthesis/compare/v3.2.1...v3.3.0 [v3.2.1]: https://github.com/ustctug/ustcthesis/compare/v3.2...v3.2.1 [3.1.06]: https://github.com/ustctug/ustcthesis/compare/v3.2...v3.1.06 [3.1.06]: https://github.com/ustctug/ustcthesis/compare/v3.1.05...v3.1.06 diff --git a/Makefile b/Makefile index 586905fb..e34f1ff0 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,8 @@ BSTFILES = $(NAME)-numerical.bst $(NAME)-authoryear.bst $(NAME)-bachelor.bst SHELL = bash LATEXMK = latexmk -xelatex -VERSION = $(shell cat $(NAME).cls | egrep -o "\[\d\d\d\d/\d\d\/\d\d v.+\]" \ - | egrep -o "v\S+") +VERSION = $(shell cat $(NAME).cls | egrep -o "\\ustcthesisversion{v[0-9.]+" \ + | egrep -o "v[0-9.]+") TEXMF = $(shell kpsewhich --var-value TEXMFHOME) .PHONY : main cls doc test save clean all install distclean zip FORCE_MAKE @@ -47,7 +47,7 @@ install : cls doc zip : main doc ln -sf . $(NAME) zip -r ../$(NAME)-$(VERSION).zip $(NAME)/{*.md,LICENSE,\ - $(NAME)-doc.tex,$(NAME)-doc.pdf,$(NAME).cls,*.bst,figures,\ + $(NAME)-doc.tex,$(NAME)-doc.pdf,$(NAME).cls,*.bst,*.bbx,*.cbx,figures,\ $(MAIN).tex,ustcsetup.tex,chapters,bib,$(MAIN).pdf,\ latexmkrc,Makefile} rm $(NAME) diff --git a/build.lua b/build.lua index 45f0442e..f673a34c 100644 --- a/build.lua +++ b/build.lua @@ -31,9 +31,14 @@ function update_tag(file, content, tagname, tagdate) local url = "https://github.com/ustctug/ustcthesis" local date = string.gsub(tagdate, "%-", "/") if string.match(file, "%.cls$") then + if string.match(content, "\\newcommand\\ustcthesisversion{v[0-9.]+}") then + content = string.gsub(content, "\\newcommand\\ustcthesisversion{v[0-9.]+", + "\\newcommand\\ustcthesisversion{" .. tagname) + end + if string.match(content, "\\ProvidesClass{ustcthesis}%[%d%d%d%d/%d%d/%d%d v[0-9.]+") then - content = string.gsub(content, "%d%d%d%d/%d%d/%d%d v[0-9.]+", - date .. " " .. tagname) + content = string.gsub(content, "%d%d%d%d/%d%d/%d%d", + date) end elseif string.match(file, "%-doc.tex") then diff --git a/ustcsetup.tex b/ustcsetup.tex index 0a760791..4256751c 100644 --- a/ustcsetup.tex +++ b/ustcsetup.tex @@ -1,9 +1,9 @@ % !TeX root = ./main.tex \ustcsetup{ - title = {中国科学技术大学\\学位论文模板示例文档}, + title = {中国科学技术大学\\学位论文模板示例文档 \ustcthesisversion}, title* = {An example of thesis template for University of Science - and Technology of China}, + and Technology of China \ustcthesisversion}, author = {李泽平}, author* = {Li Zeping}, speciality = {数学与应用数学}, diff --git a/ustcthesis-doc.tex b/ustcthesis-doc.tex index 665a4b26..a6e55ee9 100644 --- a/ustcthesis-doc.tex +++ b/ustcthesis-doc.tex @@ -113,7 +113,7 @@ \title{\cls{ustcthesis} 使用说明} \author{Zeping Lee\thanks{zepinglee AT gmail.com} \and seisman\thanks{seisman.info AT gmail.com} } -\date{v3.2.1\qquad 2020-04-03} +\date{v3.3.0\qquad 2021-03-18} \maketitle diff --git a/ustcthesis.cls b/ustcthesis.cls index 3246d445..7b997206 100644 --- a/ustcthesis.cls +++ b/ustcthesis.cls @@ -11,7 +11,8 @@ % \NeedsTeXFormat{LaTeX2e}[2017/04/15] -\ProvidesClass{ustcthesis}[2020/04/03 v3.2.1 USTC thesis template] +\newcommand\ustcthesisversion{v3.3.0} +\ProvidesClass{ustcthesis}[2020/04/03 {\ustcthesisversion} USTC thesis template] % 报错和警告 \newcommand\ustc@error[1]{%