diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/penlight/penlight.sty')
-rw-r--r-- | Master/texmf-dist/tex/luatex/penlight/penlight.sty | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/luatex/penlight/penlight.sty b/Master/texmf-dist/tex/luatex/penlight/penlight.sty index 936cb6dce72..a73948af294 100644 --- a/Master/texmf-dist/tex/luatex/penlight/penlight.sty +++ b/Master/texmf-dist/tex/luatex/penlight/penlight.sty @@ -1,5 +1,5 @@ % Kale Ewasiuk (kalekje@gmail.com) -% 2022-03-03 +% 2022-03-15 % Copyright (C) 2021-2022 Kale Ewasiuk % % Permission is hereby granted, free of charge, to any person obtaining a copy @@ -22,7 +22,7 @@ % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE % OR OTHER DEALINGS IN THE SOFTWARE. -\ProvidesPackage{penlight}[2022-03-03] +\ProvidesPackage{penlight}[2022-03-15] \RequirePackage{luacode} @@ -52,3 +52,20 @@ if __PENLIGHT__ == nil then tex.print('\\PackageError{penlight}{penlight or pl option must be passed to penlight as the first option}{}') end } + + + +\newcommand{\writePDFmetadata}{\luadirect{writePDFmetadata()}} + +\NewDocumentCommand{\writePDFmetadatakv}{ s m }{ +\IfBooleanTF{#1}{% if *, overwrite everything + \luadirect{ + __PDFmetadata__ = luakeys.parse(\luastring{#2}) + writePDFmetadata() + }}{ + \luadirect{ + __PDFmetadata__ = __PDFmetadata__ or {} + table.update(__PDFmetadata__, luakeys.parse(\luastring{#2}) + writePDFmetadata() + }} +} |