texlive[65342] Master/texmf-dist: luakeys (23dec22)
commits+karl at tug.org
commits+karl at tug.org
Fri Dec 23 22:05:14 CET 2022
Revision: 65342
http://tug.org/svn/texlive?view=revision&revision=65342
Author: karl
Date: 2022-12-23 22:05:14 +0100 (Fri, 23 Dec 2022)
Log Message:
-----------
luakeys (23dec22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf
trunk/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex
trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys-debug.sty
trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys.lua
trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys.sty
Modified: trunk/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex 2022-12-23 21:05:03 UTC (rev 65341)
+++ trunk/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex 2022-12-23 21:05:14 UTC (rev 65342)
@@ -60,7 +60,7 @@
\href{https://github.com/Josef-Friedrich/luakeys}
{github.com/Josef-Friedrich/luakeys}%
}
-\date{0.10.0 from 2022/12/16}
+\date{0.11.0 from 2022/12/23}
\maketitle
@@ -273,8 +273,9 @@
% Das Lua-Modul exportiert diese Funktionen und Tabellen:
The Lua module exports this functions and tables:
-\InputLua[firstline=3,lastline=13]{export.lua}
+\InputLua[firstline=3,lastline=15]{export.lua}
+\noindent
% Diese Dokumentation stellt nur die öffentlichen Funktionen und
% Tabellen vor.
This documentation presents only the public functions and tables.
@@ -333,6 +334,34 @@
%
%%
+\subsection{Function “\texttt{get_private_instance(): table}”}
+\label{function:get-private-instance}
+
+% Über die Tabelle \lua{opts} können die Standardoptionen global
+% geändert werden.
+The default options can be changed globally via the \lua{opts} table
+(\ref{table-opts}).
+% Um zu verhindern, dass andere Module die Standardeinstellungen
+% ändern, kann mit Hilfe der Funktion \lua{get_private_instance()} eine neue
+% Instanz des Moduls \lua{luakeys} erzeugt werden.
+To prevent another modules from changing the default settings, a new
+instance of the \lua{luakeys} module can be created using the
+\lua{get_private_instance()} function.
+
+\InputLua[firstline=3,lastline=4]{functions/get-private-instance.lua}
+
+\noindent
+% Die Funktion \lua{require()} gibt standardmäßig beim mehrmaligen
+% Aufruf immer die gleiche Tabelle zurück.
+The \lua{require()} function always returns the same table
+when called multiple times.
+
+\InputLua[firstline=14,lastline=17]{functions/get-private-instance.lua}
+
+%%
+%
+%%
+
\subsection{Function “\texttt{parse(kv_string, opts): result, unknown,
raw}”}
\label{parse}
@@ -355,20 +384,37 @@
\subsection{Options to configure the \texttt{parse} function}
\noindent
-The \lua{parse} function can be called with an options table. This
-options are supported: \catcode`_=12
+% Die Funktion \lua{parse} kann mit einer Optionstabelle aufgerufen
+% werden.
+The \lua{parse} function can be called with an options table.
+% Diese Optionen werden unterstützt:
+This options are supported: \catcode`_=12
\directlua{luakeys.print_names('opts')}
\InputLua[firstline=5,lastline=94]{opts/all-opts.lua}
+\subsection{Table “\texttt{opts}”}
+\label{table-opts}
+
\noindent
+% Die Optionen können auch global über die exportierte Tabelle
+% \lua{opts} gesetzt werden:
The options can also be set globally using the exported table
-|opts|:
+\lua{opts}:
\InputLua[firstline=4,lastline=4]{opts/exported-default-opts.lua}
\InputLua[firstline=10,lastline=11]{opts/exported-default-opts.lua}
+\noindent
+% Damit es zu keinen Wechselwirkungen mit anderen Paketen kommt, die auch
+% |luakeys| verwenden und die Optionen global setzen, ist es anzuraten,
+% die Funktion \lua{get_private_instance()} zum Laden das Paket verwenden.
+To avoid interactions with other packages that also use |luakeys| and
+set the options globally, it is recommended to use the
+\lua{get_private_instance()} function
+(\ref{function:get-private-instance}) to load the package.
+
%%
%
%%
@@ -888,6 +934,8 @@
\InputLua[firstline=4,lastline=16]{functions/define.lua}
\noindent
+% Bei verschachtelten Definitionen können nur die letzten beiden
+% Möglichkeiten zur Angabe der Schlüsselnamen verwendet werden.
For nested definitions, only the last two ways of specifying the key
names can be used.
@@ -2029,7 +2077,7 @@
“quotation_end”.
* Extend the documentation about the option “format_keys”.
}
-\changes{0.10.0}{2022/12/16}{
+\changes{0.9.0}{2022/11/21}{
* The definition attibute “pick” accepts a new data type: “any”.
* The attribute value “true” for the attribute “pick” is deprecated.
* The attribute “pick” accepts now multiple data types specified in
@@ -2042,6 +2090,10 @@
* Add new options to specify which strings are recognized as Boolean
values.
}
+\changes{0.11.0}{2022/12/23}{
+* Add a new function called “get_private_instance()” to load a private
+ version of the luakeys module.
+}
\pagebreak
\PrintChanges
Modified: trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys-debug.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys-debug.sty 2022-12-23 21:05:03 UTC (rev 65341)
+++ trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys-debug.sty 2022-12-23 21:05:14 UTC (rev 65342)
@@ -17,6 +17,6 @@
% luakeys-debug.sty and luakeys-debug.tex.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luakeys-debug}[2022/12/16 0.10.0 Debug package for luakeys.]
+\ProvidesPackage{luakeys-debug}[2022/12/23 0.11.0 Debug package for luakeys.]
\input luakeys-debug.tex
Modified: trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys.lua 2022-12-23 21:05:03 UTC (rev 65341)
+++ trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys.lua 2022-12-23 21:05:14 UTC (rev 65342)
@@ -1270,8 +1270,18 @@
-- @section
local export = {
- version = { 0, 10, 0 },
+ version = { 0, 11, 0 },
+ ---Get a new instance of the luakeys module.
+ ---
+ --- at return table # A new instance of the luakeys module.
+ get_private_instance = function()
+ package.loaded.luakeys = nil
+ local luakeys = require('luakeys')
+ package.loaded.luakeys = nil
+ return luakeys
+ end,
+
namespace = namespace,
---This function is used in the documentation.
Modified: trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys.sty 2022-12-23 21:05:03 UTC (rev 65341)
+++ trunk/Master/texmf-dist/tex/luatex/luakeys/luakeys.sty 2022-12-23 21:05:14 UTC (rev 65342)
@@ -17,5 +17,5 @@
% luakeys-debug.sty and luakeys-debug.tex.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luakeys}[2022/12/16 0.10.0 Parsing key-value options using Lua.]
+\ProvidesPackage{luakeys}[2022/12/23 0.11.0 Parsing key-value options using Lua.]
\directlua{luakeys = require('luakeys')}
More information about the tex-live-commits
mailing list.