Skip to content

Commit

Permalink
feat: update_tag
Browse files Browse the repository at this point in the history
  • Loading branch information
LogCreative committed Jul 3, 2023
1 parent 7e33c0e commit 37d5dee
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
15 changes: 15 additions & 0 deletions build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions doc/presenter.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -191,4 +191,4 @@

\PrintIndex

\end{document}
\end{document}
2 changes: 1 addition & 1 deletion source/presenter.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
%<class>\ProvidesExplClass
%<package>\ProvidesExplPackage
{presenter}
{2023-06-29}{v0.3.0}
{2023-07-03}{v0.4.0}
%<class> {A LaTeX presentation framework with seamless migration (class)}
%<package> {A LaTeX presentation framework with seamless migration (package)}
%</class|package>
Expand Down
2 changes: 1 addition & 1 deletion source/pretbg.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
%<default> {pretbg-default}
%<block> {pretbg-block}
%<iiiblock> {pretbg-iiiblock}
{2023-06-29}{v0.3.0}
{2023-07-03}{v0.4.0}
%<default> {default background style for presenter}
%<block> {block background style for presenter}
%<iiiblock> {block background style for presenter implemented in l3draw}
Expand Down
2 changes: 1 addition & 1 deletion source/pretfg.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
%<default> {pretfg-default}
%<dual> {pretfg-dual}
%<cascade> {pretfg-cascade}
{2023-06-29}{v0.3.0}
{2023-07-03}{v0.4.0}
%<default> {default foreground style for presenter}
%<dual> {dual foreground style for presenter}
%<cascade> {cascade foreground style for presenter}
Expand Down
2 changes: 1 addition & 1 deletion source/pretsec.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
%</package>
% \fi
Expand Down

0 comments on commit 37d5dee

Please sign in to comment.