texlive[67715] Master/texmf-dist: yamlvars (23jul23)

commits+karl at tug.org commits+karl at tug.org
Sun Jul 23 22:46:46 CEST 2023


Revision: 67715
          http://tug.org/svn/texlive?view=revision&revision=67715
Author:   karl
Date:     2023-07-23 22:46:46 +0200 (Sun, 23 Jul 2023)
Log Message:
-----------
yamlvars (23jul23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/yamlvars/README.md
    trunk/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.pdf
    trunk/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.tex
    trunk/Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.lua
    trunk/Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.sty

Modified: trunk/Master/texmf-dist/doc/lualatex/yamlvars/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/yamlvars/README.md	2023-07-23 20:46:30 UTC (rev 67714)
+++ trunk/Master/texmf-dist/doc/lualatex/yamlvars/README.md	2023-07-23 20:46:46 UTC (rev 67715)
@@ -1,13 +1,13 @@
 # YAMLvars -- parse a YAML document and create definitions in LaTeX
 
 This LuaLaTeX package provides a YAML parser and some functions to declare and define LaTeX definitions using YAML files. 
-It uses the [`markdown-tinyyaml`](https://github.com/api7/lua-tinyyaml) parser that is shipped with the [`markdown`](https://ctan.org/pkg/markdown) package.
+It uses the [`tinyyaml`](https://ctan.org/pkg/lua-tinyyaml) parser.
 
 
 
 # License
 
-Copyright (C) 2021-2022 Kale Ewasiuk
+Copyright (C) 2021-2023 Kale Ewasiuk
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

Modified: trunk/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.tex	2023-07-23 20:46:30 UTC (rev 67714)
+++ trunk/Master/texmf-dist/doc/lualatex/yamlvars/yamlvars.tex	2023-07-23 20:46:46 UTC (rev 67715)
@@ -1,6 +1,6 @@
 % Kale Ewasiuk (kalekje at gmail.com)
-% 2023-07-18
-% Copyright (C) 2021-2022 Kale Ewasiuk
+% 2023-07-22
+% Copyright (C) 2021-2023 Kale Ewasiuk
 %
 % Permission is hereby granted, free of charge, to any person obtaining a copy
 % of this software and associated documentation files (the "Software"), to deal
@@ -53,7 +53,6 @@
 \date{\today}
 
 
-\usepackage[pl,extrasglobals]{penlight}
 \usepackage[overwritedefs]{yamlvars}
 \title{YAMLvars}
 \subtitle{a YAML variable parser for LuaLaTeX}
@@ -115,10 +114,9 @@
 
 Many of the ``transform'' and ``processing'' functions built-in to this package rely on other packages,
 like
-\texttt{hyperref}, for example, but it is not loaded, and this package will only load
-\cmd{penlight},
-\cmd{luacode},
-\cmd{xspace}, and
+\texttt{hyperref}, or \texttt{xspace} for example, but they are not loaded, and this package will only load
+\cmd{penlightplus},
+\cmd{luacode}, \cmd{luakeys}, and
 \cmd{etoolbox}.
 
 \section{Declaring variables}

Modified: trunk/Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.lua	2023-07-23 20:46:30 UTC (rev 67714)
+++ trunk/Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.lua	2023-07-23 20:46:46 UTC (rev 67715)
@@ -1,6 +1,6 @@
 --% Kale Ewasiuk (kalekje at gmail.com)
---% 2023-07-18
---% Copyright (C) 2021-2022 Kale Ewasiuk
+--% 2023-07-22
+--% Copyright (C) 2021-2023 Kale Ewasiuk
 --%
 --% Permission is hereby granted, free of charge, to any person obtaining a copy
 --% of this software and associated documentation files (the "Software"), to deal
@@ -28,12 +28,9 @@
 
 YAMLvars.yaml = require'tinyyaml' -- note: YAMLvars.sty will have checked existence of this already
 
-local luakeys = require'luakeys'()  -- note: YAMLvars.sty will have checked existence of this already
+YAMLvars.luakeys = require'luakeys'()  -- note: YAMLvars.sty will have checked existence of this already
 
-local pl = _G['penlight'] or _G['pl'] -- penlight for this namespace is pl
-if (__PL_EXTRAS__ == nil) or  (__PENLIGHT__ == nil) then
-    tex.sprint('\\PackageError{yamlvars}{penlight package with extras (or extrasnoglobals) option must be loaded before this package}{}')
-end
+local pl = penlight
 
 -- UI tables to extend functionality
 YAMLvars.xfm = {}
@@ -75,7 +72,7 @@
         YAMLvars.setts2default()
     end
 
-    local kv = luakeys.parse(kv)
+    local kv = YAMLvars.luakeys.parse(kv)
     if type(kv.xfm) == 'string' then
         kv.xfm = pl.stringx.split(kv.xfm)
     end

Modified: trunk/Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.sty	2023-07-23 20:46:30 UTC (rev 67714)
+++ trunk/Master/texmf-dist/tex/lualatex/yamlvars/yamlvars.sty	2023-07-23 20:46:46 UTC (rev 67715)
@@ -1,6 +1,6 @@
 % Kale Ewasiuk (kalekje at gmail.com)
-% 2023-07-18
-% Copyright (C) 2021-2022 Kale Ewasiuk
+% 2023-07-22
+% Copyright (C) 2021-2023 Kale Ewasiuk
 %
 % Permission is hereby granted, free of charge, to any person obtaining a copy
 % of this software and associated documentation files (the "Software"), to deal
@@ -25,13 +25,12 @@
 
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{yamlvars}[2023-07-18]
+\ProvidesPackage{yamlvars}[2023-07-22]
 
 \RequirePackage{luacode}
-\RequirePackage{xspace}
 \RequirePackage{etoolbox}
 \RequirePackage{luakeys}
-\RequirePackage{penlight} % no option passed here, but extras must be used, error will be thrown if not
+\RequirePackage{penlightplus} % no option passed here, but extras must be used, error will be thrown if not
 
 %\IfFileExists{tinyyaml.lua}{}{\PackageError{yamlvars}{This package requires installation of the 'tinyyaml' package, please install it and try again}{}}
 
@@ -94,19 +93,19 @@
 }}
 
 
-\newenvironment{declareYAMLvars}{\luadirect{_G[__PENLIGHT__].tex.startrecording()}}{\luadirect{_G[__PENLIGHT__].tex.stoprecording()}
-        \luadirect{YAMLvars.declareYAMLvarsStr(_G[__PENLIGHT__].tex.recordedbuf)}
+\newenvironment{declareYAMLvars}{\luadirect{penlight.tex.startrecording()}}{\luadirect{penlight.tex.stoprecording()}
+        \luadirect{YAMLvars.declareYAMLvarsStr(penlight.tex.recordedbuf)}
 }
 
 
 \NewDocumentEnvironment{parseYAMLvars}{}%
 {\luadirect{
-  _G[__PENLIGHT__].tex.startrecording()
+  penlight.tex.startrecording()
 }}%
 {\luadirect{
-  _G[__PENLIGHT__].tex.stoprecording()
+  penlight.tex.stoprecording()
 }}
-\AfterEndEnvironment{parseYAMLvars}{\luadirect{YAMLvars.parseYAMLvarsStr(_G[__PENLIGHT__].tex.recordedbuf)}}
+\AfterEndEnvironment{parseYAMLvars}{\luadirect{YAMLvars.parseYAMLvarsStr(penlight.tex.recordedbuf)}}
 % necessary hack to get rohead and lohead to work..
 % .. https://tex.stackexchange.com/questions/637018/setting-koma-heading-within-lua/637021?noredirect=1#comment1587387_637021
 
@@ -116,10 +115,10 @@
 
 
 
-\newenvironment{parseYAMLpdfdata}{\luadirect{_G[__PENLIGHT__].tex.startrecording()}}{
-  \luadirect{_G[__PENLIGHT__].tex.stoprecording()
-  YAMLvars.yaml2PDFmetadata(_G[__PENLIGHT__].tex.recordedbuf)
-  _G[__PENLIGHT__].tex.writePDFmetadata()
+\newenvironment{parseYAMLpdfdata}{\luadirect{penlight.tex.startrecording()}}{
+  \luadirect{penlight.tex.stoprecording()
+  YAMLvars.yaml2PDFmetadata(penlight.tex.recordedbuf)
+  penlight.tex.writePDFmetadata()
   }
 }
 



More information about the tex-live-commits mailing list.