From 37d5dee04fa6ba8b18942be7cbeabbf6c1cec8c3 Mon Sep 17 00:00:00 2001 From: LogCreative Date: Mon, 3 Jul 2023 14:13:13 +0800 Subject: [PATCH] feat: update_tag --- build.lua | 15 +++++++++++++++ doc/presenter.tex | 4 ++-- source/presenter.dtx | 2 +- source/pretbg.dtx | 2 +- source/pretfg.dtx | 2 +- source/pretsec.dtx | 2 +- 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/build.lua b/build.lua index cc8cf4b..0898581 100644 --- a/build.lua +++ b/build.lua @@ -17,4 +17,19 @@ typesetdir = builddir .. "/doc" function docinit_hook() cp("*.pdf", testdir, typesetdir) return 0 +end + +-- Simple tagging, copyright information needs manual update. +tagfiles = {"*.dtx","presenter.tex"} +function update_tag(file, content, tagname, tagdate) + local iso = "%d%d%d%d%-%d%d%-%d%d" + local ver = "v%d.%d.%d" + if string.match(file, "%.dtx$") then + return string.gsub(content, "{" .. iso .. "}{" .. ver .. "}", + "{" .. tagdate .. "}{" .. tagname .. "}") + elseif string.match(file, "%.tex$") then + return string.gsub(content, "\\date{" .. iso .. " \\quad " .. ver .. "}", + "\\date{" .. tagdate .. " \\quad " .. tagname .. "}") + end + return content end \ No newline at end of file diff --git a/doc/presenter.tex b/doc/presenter.tex index 11ca034..2486376 100644 --- a/doc/presenter.tex +++ b/doc/presenter.tex @@ -23,7 +23,7 @@ \NewDocumentCommand{\presenter}{}{\textsc{Presenter}} \title{\presenter: A \LaTeX{} presentation framework with seamless migration} \author{Log Creative} -\date{2023-06-29 \quad v0.3.0} +\date{2023-07-03 \quad v0.4.0} \usepackage{array} \usepackage{float} @@ -191,4 +191,4 @@ \PrintIndex -\end{document} \ No newline at end of file +\end{document} diff --git a/source/presenter.dtx b/source/presenter.dtx index 7c1f47f..837ddef 100644 --- a/source/presenter.dtx +++ b/source/presenter.dtx @@ -24,7 +24,7 @@ %\ProvidesExplClass %\ProvidesExplPackage {presenter} - {2023-06-29}{v0.3.0} + {2023-07-03}{v0.4.0} % {A LaTeX presentation framework with seamless migration (class)} % {A LaTeX presentation framework with seamless migration (package)} % diff --git a/source/pretbg.dtx b/source/pretbg.dtx index a13683e..c938748 100644 --- a/source/pretbg.dtx +++ b/source/pretbg.dtx @@ -23,7 +23,7 @@ % {pretbg-default} % {pretbg-block} % {pretbg-iiiblock} - {2023-06-29}{v0.3.0} + {2023-07-03}{v0.4.0} % {default background style for presenter} % {block background style for presenter} % {block background style for presenter implemented in l3draw} diff --git a/source/pretfg.dtx b/source/pretfg.dtx index 1a01d36..39f5f0a 100644 --- a/source/pretfg.dtx +++ b/source/pretfg.dtx @@ -23,7 +23,7 @@ % {pretfg-default} % {pretfg-dual} % {pretfg-cascade} - {2023-06-29}{v0.3.0} + {2023-07-03}{v0.4.0} % {default foreground style for presenter} % {dual foreground style for presenter} % {cascade foreground style for presenter} diff --git a/source/pretsec.dtx b/source/pretsec.dtx index 7c4348d..09b1051 100644 --- a/source/pretsec.dtx +++ b/source/pretsec.dtx @@ -21,7 +21,7 @@ % \iffalse %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{pretsec}{2023-06-29}{v0.3.0} +\ProvidesExplPackage{pretsec}{2023-07-03}{v0.4.0} {sectioning support pack for presenter} % % \fi