summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex/datestamp/datestamp.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/datestamp/datestamp.sty')
-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'.