diff options
author | Karl Berry <karl@freefriends.org> | 2021-10-22 21:38:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-10-22 21:38:24 +0000 |
commit | abde33f8241a26a6b42ff9a290306966536c55cf (patch) | |
tree | e5039a06f5fa85882ed807481053b226285a1b4c /Master/texmf-dist/tex/lualatex | |
parent | 714e4e72525ca89ed873ed0d03d7ba3fe97caf61 (diff) |
datestamp (22oct21)
git-svn-id: svn://tug.org/texlive/trunk@60841 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/datestamp/datestamp.sty | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/lualatex/datestamp/datestamp.sty b/Master/texmf-dist/tex/lualatex/datestamp/datestamp.sty new file mode 100644 index 00000000000..5e0876bdb07 --- /dev/null +++ b/Master/texmf-dist/tex/lualatex/datestamp/datestamp.sty @@ -0,0 +1,66 @@ +%% +%% This is file `datestamp.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% datestamp.dtx (with options: `package') +%% ---------------------------------------------------------- +%% Package: datestamp +%% Version: v0.1 (22 October, 2021) +%% Author: निरंजन +%% Description: Fixed date-stamps with LuaLaTeX. +%% Repository: https://gitlab.com/niruvt/datestamp +%% License: GPLv3+, GFDLv1.3+ +%% ---------------------------------------------------------- +%% +%% LaTeX Package datestamp v0.1 +%% © 2021 निरंजन +%% +%% This program is free software: you can redistribute it +%% and/or modify it under the terms of the GNU General Public +%% License as published by the Free Software Foundation, either +%% version 3 of the License, or (at your option) any later +%% version. +%% +%% This program is distributed in the hope that it will be +%% useful, but WITHOUT ANY WARRANTY; without even the implied +%% warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +%% PURPOSE. See the GNU General Public License for more +%% details. +%% +%% You should have received a copy of the GNU General Public +%% License along with this program. If not, see +%% <https://www.gnu.org/licenses/>. +%% +%% The current maintainer of this work is निरंजन. +%% +%% This work consists of the files datestamp.dtx +%% datestamp.ins +%% and the derived file datestamp.sty. +%% ---------------------------------------------------------- +\def\datestampname{datestamp} +\def\datestampversion{0.1} +\def\datestampdate{2021-10-22} +\def\datestampdescription{% + Fixed date-stamps with LuaLaTeX.% +} +\ProvidesPackage{datestamp}[2021/10/22 v0.1 +Fixed date-stamps with LuaLaTeX.] +\RequirePackage{xparse} +\NewDocumentCommand{\adddatestamp}{ 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") + io.close(dsfile) + end + dofile("\jobname.ds") + tex.sprint(#1) + } +} +\endinput +%% +%% End of file `datestamp.sty'. |