From bb27361648d850831d3899f308f7e2a83b9a6914 Mon Sep 17 00:00:00 2001 From: Zeping Lee Date: Tue, 17 May 2022 00:12:06 +0800 Subject: [PATCH] Bump to v3.3.3 --- CHANGELOG.md | 23 +++++++++++++---------- build.lua | 25 ++++++++++--------------- ustcsetup.tex | 4 ++-- ustcthesis-doc.tex | 2 +- ustcthesis.cls | 4 ++-- 5 files changed, 28 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00e77cbe..64127609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.3.3] - 2022-05-17 + ### Added - 新增选项 `reviewer` 选择是否在声明页显示“评审专家签名”([#334](https://github.com/ustctug/ustcthesis/issues/334))。 @@ -22,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 消除本科生封面的 overfull box 警告([#345](https://github.com/ustctug/ustcthesis/issues/345))。 - 修正本科生的关键词分隔符为“、”和“, ”([#354](https://github.com/ustctug/ustcthesis/issues/354))。 -## [v3.3.2] - 2022-03-25 +## [3.3.2] - 2022-03-25 ### Added @@ -42,7 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 修复了载入 `natbib` 前设置 `cite-style` 无效的问题([#327](https://github.com/ustctug/ustcthesis/issues/327))。 -## [v3.3.1] - 2021-12-10 +## [3.3.1] - 2021-12-10 ### Changed @@ -69,7 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 去掉了 `siunitx` 的 `inter-unit-product` 设置。 -## [v3.3.0] - 2021-03-18 +## [3.3.0] - 2021-03-18 ### Added @@ -92,7 +94,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 修正参考文献中期刊的页码前的空格([#264](https://github.com/ustctug/ustcthesis/issues/264))。 -## [v3.2.1] - 2020-04-03 +## [3.2.1] - 2020-04-03 ### Added @@ -295,12 +297,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 优化图注、算法的行距。 - 二级以下节标题编号下采用“1.”、“(1)”、“①”。 -[Unreleased]: https://github.com/ustctug/ustcthesis/compare/v3.3.2...HEAD -[v3.3.2]: https://github.com/ustctug/ustcthesis/compare/v3.3.1...v3.3.2 -[v3.3.1]: https://github.com/ustctug/ustcthesis/compare/v3.3.0...v3.3.1 -[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 +[Unreleased]: https://github.com/ustctug/ustcthesis/compare/v3.3.3...HEAD +[3.3.3]: https://github.com/ustctug/ustcthesis/compare/v3.3.2...v3.3.3 +[3.3.2]: https://github.com/ustctug/ustcthesis/compare/v3.3.1...v3.3.2 +[3.3.1]: https://github.com/ustctug/ustcthesis/compare/v3.3.0...v3.3.1 +[3.3.0]: https://github.com/ustctug/ustcthesis/compare/v3.2.1...v3.3.0 +[3.2.1]: https://github.com/ustctug/ustcthesis/compare/v3.2...v3.2.1 +[3.2]: 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 [3.1.05]: https://github.com/ustctug/ustcthesis/compare/v3.1.04...v3.1.05 [3.1.04]: https://github.com/ustctug/ustcthesis/compare/v3.1.03...v3.1.04 diff --git a/build.lua b/build.lua index 5a2893f9..bc94bfc6 100644 --- a/build.lua +++ b/build.lua @@ -30,37 +30,32 @@ typesetopts = "-file-line-error -halt-on-error -interaction=nonstopmode" lvtext = ".tex" function update_tag(file, content, tagname, tagdate) + tagname = string.gsub(tagname, "^v", "") 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.]+", + content = string.gsub(content, "\\newcommand\\ustcthesisversion{[0-9.]+", "\\newcommand\\ustcthesisversion{" .. tagname) - end - if string.match(content, "\\ProvidesClass{ustcthesis}%[%d%d%d%d/%d%d/%d%d") then - content = string.gsub(content, "\\ProvidesClass{ustcthesis}%[%d%d%d%d/%d%d/%d%d", - "\\ProvidesClass{ustcthesis}[" .. date) - end + content = string.gsub(content, "\\ProvidesClass{ustcthesis}%[%d%d%d%d/%d%d/%d%d", + "\\ProvidesClass{ustcthesis}[" .. date) elseif string.match(file, "%-doc.tex") then - if string.match(content, "\\date{v[0-9.]+\\qquad %d%d%d%d%-%d%d%-%d%d}") then - content = string.gsub(content, "v[0-9.]+\\qquad %d%d%d%d%-%d%d%-%d%d", - tagname .. "\\qquad " .. tagdate) - end + content = string.gsub(content, "v[0-9.]+\\qquad %d%d%d%d%-%d%d%-%d%d", + "v" .. tagname .. "\\qquad " .. tagdate) elseif string.match(file, "CHANGELOG.md") then - local previous = string.match(content, "/compare/(.*)%.%.%.HEAD") - + local previous = string.match(content, "/compare/v(.*)%.%.%.HEAD") + print(previous) if tagname == previous then return content end content = string.gsub(content, "## %[Unreleased%]", "## [Unreleased]\n\n## [" .. tagname .."] - " .. tagdate) content = string.gsub(content, previous .. "%.%.%.HEAD", - tagname .. "...HEAD\n[" .. tagname .. "]: " .. url .. "/compare/" - .. previous .. "..." .. tagname) + tagname .. "...HEAD\n[" .. tagname .. "]: " .. url .. "/compare/v" + .. previous .. "...v" .. tagname) end return content end diff --git a/ustcsetup.tex b/ustcsetup.tex index e8fd64a1..08868f97 100644 --- a/ustcsetup.tex +++ b/ustcsetup.tex @@ -1,9 +1,9 @@ % !TeX root = ./main.tex \ustcsetup{ - title = {中国科学技术大学\\学位论文模板示例文档 \ustcthesisversion}, + title = {中国科学技术大学\\学位论文模板示例文档 v\ustcthesisversion}, title* = {An example of thesis template for University of Science - and Technology of China \ustcthesisversion}, + and Technology of China v\ustcthesisversion}, author = {李泽平}, author* = {Li Zeping}, speciality = {数学与应用数学}, diff --git a/ustcthesis-doc.tex b/ustcthesis-doc.tex index 617d0143..9e4a14c0 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.3.2\qquad 2022-03-25} +\date{v3.3.3\qquad 2022-05-17} \maketitle diff --git a/ustcthesis.cls b/ustcthesis.cls index d7eb3114..7c29150f 100644 --- a/ustcthesis.cls +++ b/ustcthesis.cls @@ -11,8 +11,8 @@ % \NeedsTeXFormat{LaTeX2e}[2017/04/15] -\newcommand\ustcthesisversion{v3.3.2} -\ProvidesClass{ustcthesis}[2022/03/25 {\ustcthesisversion} USTC thesis template] +\newcommand\ustcthesisversion{3.3.3} +\ProvidesClass{ustcthesis}[2022/05/17 {\ustcthesisversion} USTC thesis template] % 报错和警告 \newcommand\ustc@error[1]{%