summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luakeys/luakeys-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/generic/luakeys/luakeys-doc.tex')
-rw-r--r--macros/luatex/generic/luakeys/luakeys-doc.tex52
1 files changed, 48 insertions, 4 deletions
diff --git a/macros/luatex/generic/luakeys/luakeys-doc.tex b/macros/luatex/generic/luakeys/luakeys-doc.tex
index 99dfa6805b..3f7d1b0ea1 100644
--- a/macros/luatex/generic/luakeys/luakeys-doc.tex
+++ b/macros/luatex/generic/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