texlive[70850] Master/texmf-dist: lua-placeholders (3apr24)

commits+karl at tug.org commits+karl at tug.org
Wed Apr 3 23:18:05 CEST 2024


Revision: 70850
          https://tug.org/svn/texlive?view=revision&revision=70850
Author:   karl
Date:     2024-04-03 23:18:05 +0200 (Wed, 03 Apr 2024)
Log Message:
-----------
lua-placeholders (3apr24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/lua-placeholders/README.md
    trunk/Master/texmf-dist/doc/lualatex/lua-placeholders/lua-placeholders-example/example.pdf
    trunk/Master/texmf-dist/doc/lualatex/lua-placeholders/lua-placeholders-manual.pdf
    trunk/Master/texmf-dist/doc/lualatex/lua-placeholders/lua-placeholders-manual.tex
    trunk/Master/texmf-dist/scripts/lua-placeholders/lua-placeholders-parser.lua
    trunk/Master/texmf-dist/scripts/lua-placeholders/lua-placeholders.lua
    trunk/Master/texmf-dist/tex/lualatex/lua-placeholders/lua-placeholders.sty

Modified: trunk/Master/texmf-dist/doc/lualatex/lua-placeholders/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/lua-placeholders/README.md	2024-04-03 21:17:51 UTC (rev 70849)
+++ trunk/Master/texmf-dist/doc/lualatex/lua-placeholders/README.md	2024-04-03 21:18:05 UTC (rev 70850)
@@ -1,5 +1,6 @@
 # Lua(TeX) Placeholders
 ![CTAN Version](https://img.shields.io/ctan/v/lua-placeholders)
+[![build](https://github.com/Xerdi/lua-placeholders/actions/workflows/build.yml/badge.svg)](https://github.com/Xerdi/lua-placeholders/actions/workflows/build.yml)
 
 A LaTeX package for specifying and inserting document placeholders with JSON or YAML formats.
 

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

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

Modified: trunk/Master/texmf-dist/doc/lualatex/lua-placeholders/lua-placeholders-manual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/lua-placeholders/lua-placeholders-manual.tex	2024-04-03 21:17:51 UTC (rev 70849)
+++ trunk/Master/texmf-dist/doc/lualatex/lua-placeholders/lua-placeholders-manual.tex	2024-04-03 21:18:05 UTC (rev 70850)
@@ -91,14 +91,13 @@
     For proper number formatting package \texttt{numprint}\cite{numprint} is required.
 
     \subsubsection{YAML Support}
-    If you're using JSON as \meta{recipe} and \meta{payload} format, the following requirements are no longer needed, since Lua\TeX{} already supports JSON formats out of the box.
+    Starting from version 1.0.2, the preferred YAML implementation has changed from \texttt{lyaml}\cite{lyaml} to \texttt{lua-tinyyaml}\cite{lua-tinyyaml}.
+    The reason for this change is that \texttt{lua-tinyyaml} doesn't require any platform-specific dependencies, such as \texttt{libYAML}\cite{libYAML}.
 
-    For YAML support, however, this package requires the \texttt{lyaml}\cite{lyaml} Lua module for parsing the YAML files.
-    This also includes the \texttt{libYAML}\cite{libYAML} platform dependent library and optionally LuaRocks for installing \texttt{lyaml}.
-    Another requirement is Lua, which version meets the Lua version used by Lua\TeX{}.
-    If no \texttt{LUA\_PATH} is set, and you use LuaRocks, this package tries to call the LuaRocks executable to find the \texttt{LUA\_PATH}.
-    If \texttt{lyaml} can't be loaded, this package will first try to fall back with \texttt{lua-tinyyaml}\cite{lua-tinyyaml} for lesser YAML support and secondly fall back on accepting JSON files only.
+    The older YAML implementation will still function for older installations that do not have \texttt{lua-tinyyaml}.
+    As before, when no YAML implementation is found, \texttt{lua-placeholders} will fall back to JSON support.
 
+
     \clearpage
     \section{Usage}
     This section describes the basic commands of \texttt{lua-placeholders}.
@@ -115,6 +114,7 @@
     \DescribeMacro{\loadpayload} The same behaviour counts for \cmd{\loadpayload}\oarg{namespace}\marg{filename}.
     The order of loading \meta{recipe} and \meta{payload} files doesn't matter.
     If the \meta{payload} file got loaded first, it will be yielded until the corresponding \meta{recipe} file is loaded.
+    When a file is loaded, a \LaTeX\ hook will trigger once for \texttt{namespace/\meta{namespace}} and once for \texttt{namespace\meta{namespace}/loaded}, respectively.
 
     All other macros of this package also take the optional \meta{namespace}, which by default is equal to \cmd{\jobname}.
     \DescribeMacro{\setnamespace} This default \meta{namespace} can be changed with \cmd{\setnamespace}\marg{new default namespace}.\\

Modified: trunk/Master/texmf-dist/scripts/lua-placeholders/lua-placeholders-parser.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/lua-placeholders/lua-placeholders-parser.lua	2024-04-03 21:17:51 UTC (rev 70849)
+++ trunk/Master/texmf-dist/scripts/lua-placeholders/lua-placeholders-parser.lua	2024-04-03 21:18:05 UTC (rev 70850)
@@ -19,6 +19,7 @@
 -- lua-placeholders-parser.lua and lua-placeholders-types.lua
 
 local LUA_VERSION = string.sub(_VERSION, 5, -1)
+local kpse = kpse or require('kpse')
 
 yaml_supported = false
 
@@ -87,6 +88,7 @@
     end
     local raw = file:read "*a"
     file:close()
+    kpse.record_input_file(filename)
     if ext == 'json' then
         return utilities.json.tolua(raw)
     else

Modified: trunk/Master/texmf-dist/scripts/lua-placeholders/lua-placeholders.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/lua-placeholders/lua-placeholders.lua	2024-04-03 21:17:51 UTC (rev 70849)
+++ trunk/Master/texmf-dist/scripts/lua-placeholders/lua-placeholders.lua	2024-04-03 21:18:05 UTC (rev 70850)
@@ -23,8 +23,8 @@
 end
 
 modules.lua_placeholders = {
-    version = "1.0.2",
-    date = "2024/02/21",
+    version = "1.0.3",
+    date = "2024/04/02",
     comment = 'Lua Placeholders — for specifying and inserting document parameters',
     author = 'Erik Nijenhuis',
     license = 'free'
@@ -78,7 +78,10 @@
     else
         namespace:load_recipe(raw_recipe)
     end
+    tex.print('\\NewHook{namespace/' .. name .. '}')
+    tex.print('\\NewHook{namespace/' .. name .. '/loaded}')
     tex.print('\\UseOneTimeHook{namespace/' .. name .. '}')
+    texio.write_nl(name)
     if namespace.payload_file and not namespace.payload_loaded then
         local raw_payload = load_resource(namespace.payload_file)
         if raw_payload.namespace then

Modified: trunk/Master/texmf-dist/tex/lualatex/lua-placeholders/lua-placeholders.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/lua-placeholders/lua-placeholders.sty	2024-04-03 21:17:51 UTC (rev 70849)
+++ trunk/Master/texmf-dist/tex/lualatex/lua-placeholders/lua-placeholders.sty	2024-04-03 21:18:05 UTC (rev 70850)
@@ -19,7 +19,7 @@
 % lua-placeholders-parser.lua and lua-placeholders-types.lua
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lua-placeholders}[2024/02/21 1.0.2 Lua Placeholders Package]
+\ProvidesPackage{lua-placeholders}[2024/04/02 1.0.3 Lua Placeholders Package]
 
 \RequirePackage{ifthen}
 \RequirePackage{luapackageloader}



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