summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-11 21:15:31 +0000
committerKarl Berry <karl@freefriends.org>2021-12-11 21:15:31 +0000
commit73d67288baa9b6754d2d2e981a3512bda7caeaa8 (patch)
tree3ead8d9c6adf82350819250e2c2e96f5fc79a0a1 /Master/texmf-dist/tex/lualatex
parent69e62ac44dee4d0eb7d22d349cfdce7c89186135 (diff)
datestamp (11dec21)
git-svn-id: svn://tug.org/texlive/trunk@61269 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
-rw-r--r--Master/texmf-dist/tex/lualatex/datestamp/datestamp.sty38
1 files changed, 25 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/lualatex/datestamp/datestamp.sty b/Master/texmf-dist/tex/lualatex/datestamp/datestamp.sty
index 5e0876bdb07..354a8823a7f 100644
--- a/Master/texmf-dist/tex/lualatex/datestamp/datestamp.sty
+++ b/Master/texmf-dist/tex/lualatex/datestamp/datestamp.sty
@@ -5,17 +5,17 @@
%% The original source files were:
%%
%% datestamp.dtx (with options: `package')
-%% ----------------------------------------------------------
+%% -----------------------------------------------------------
%% Package: datestamp
-%% Version: v0.1 (22 October, 2021)
+%% Version: v0.2(08 December, 2021)
%% Author: निरंजन
%% Description: Fixed date-stamps with LuaLaTeX.
-%% Repository: https://gitlab.com/niruvt/datestamp
+%% Repository: http://savannah.nongnu.org/projects/datestamp
%% License: GPLv3+, GFDLv1.3+
-%% ----------------------------------------------------------
+%% -----------------------------------------------------------
%%
-%% LaTeX Package datestamp v0.1
-%% © 2021 निरंजन
+%% LaTeX Package datestamp v0.2
+%% Copyright © 2021 निरंजन
%%
%% This program is free software: you can redistribute it
%% and/or modify it under the terms of the GNU General Public
@@ -40,27 +40,39 @@
%% and the derived file datestamp.sty.
%% ----------------------------------------------------------
\def\datestampname{datestamp}
-\def\datestampversion{0.1}
-\def\datestampdate{2021-10-22}
+\def\datestampversion{0.2}
+\def\datestampdate{2021-12-08}
\def\datestampdescription{%
Fixed date-stamps with LuaLaTeX.%
}
-\ProvidesPackage{datestamp}[2021/10/22 v0.1
+\ProvidesPackage{datestamp}[2021/12/08 v0.2
Fixed date-stamps with LuaLaTeX.]
\RequirePackage{xparse}
-\NewDocumentCommand{\adddatestamp}{ m }{
- \directlua{
+\NewDocumentCommand{\luacodefordatestamp}{ m m }{%
+ \directlua{%
dsfile = io.open("\jobname.ds", "a+")
dscontent = dsfile:read "*a"
if string.find(dscontent, "#1") then
else
- dsfile:write("#1 = \string\"\today\string\"\string\n")
+ dsfile:write("#1 = \string\"#2\string\"\string\n")
io.close(dsfile)
end
dofile("\jobname.ds")
tex.sprint(#1)
- }
+ }%
}
+\NewDocumentCommand{\adddatestamp}{ m }{%
+ \luacodefordatestamp{#1}{\today}%
+}%
+\NewDocumentCommand{\addyearstamp}{ m }{%
+ \luacodefordatestamp{#1}{\the\year}%
+}%
+\NewDocumentCommand{\addmonthstamp}{ m }{%
+ \luacodefordatestamp{#1}{\the\month}%
+}%
+\NewDocumentCommand{\adddaystamp}{ m }{%
+ \luacodefordatestamp{#1}{\the\day}%
+}%
\endinput
%%
%% End of file `datestamp.sty'.