From b0a8290c0709824d100907478e75601540597423 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 4 Apr 2022 20:56:44 +0000 Subject: luakeys (4apr22) git-svn-id: svn://tug.org/texlive/trunk@62904 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf | Bin 159798 -> 169502 bytes .../texmf-dist/doc/luatex/luakeys/luakeys-doc.tex | 52 +++++++++++++++++++-- 2 files changed, 48 insertions(+), 4 deletions(-) (limited to 'Master/texmf-dist/doc/luatex') diff --git a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf index 0f796cc12c4..07f14d206b7 100644 Binary files a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf and b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf differ diff --git a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex index 99dfa6805be..3f7d1b0ea10 100644 --- a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex +++ b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex @@ -30,7 +30,7 @@ \url{josef@friedrich.rocks}\\% \href{https://github.com/Josef-Friedrich/luakeys}{github.com/Josef-Friedrich/luakeys}% } -\date{v0.4 from 2021/12/31} +\date{v0.5 from 2022/04/04} \maketitle @@ -526,16 +526,34 @@ In plain \TeX: \end{minted} \noindent -The function can be called with a options table. This two options are -supported. +The function can be called with an options table. This options are +supported: \begin{minted}{lua} local result = parse('one,two,three', { convert_dimensions = false, - unpack_single_array_value = false + unpack_single_array_value = false, + standalone_as_true = false, + converter = function(key, value, depth, current_table, root_table) + return key, value + end, + case_insensitive_keys = false, }) \end{minted} +\noindent +The options can also be set globally using the exported table +|default_options|: + +\begin{minted}{lua} +luakeys.parse('dim=1cm') -- {dim = 1864679} +luakeys.default_options.convert_dimensions = false +-- or: +-- local defaults = luakeys.default_options +-- defaults.convert_dimensions = false +luakeys.parse('dim=1cm') -- {dim = '1cm'} +\end{minted} + %% % %% @@ -695,6 +713,26 @@ An example of how to use the command in \LaTeX: \clearpage +\subsection{luakeys.tex} + +\inputminted[linenos=true]{latex}{luakeys.tex} + +%% +% +%% + +\clearpage + +\subsection{luakeys.tex} + +\inputminted[linenos=true]{latex}{luakeys.tex} + +%% +% +%% + +\clearpage + \subsection{luakeys-debug.tex} \inputminted[linenos=true]{latex}{luakeys-debug.tex} @@ -726,6 +764,12 @@ An example of how to use the command in \LaTeX: * Parser: Remove support from Lua numbers with exponents (for example '5e+20') * Switch the Lua testing framework to busted } +\changes{v0.5}{2022/04/04}{ +* Add possibility to change options globally +* New option: standalone\_as\_true +* Add a recursive converter callback / hook to process the parse tree +* New option: case\_insensitive\_keys +} \pagebreak \PrintChanges \pagebreak -- cgit v1.2.3