summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-11-17 21:02:07 +0000
committerKarl Berry <karl@freefriends.org>2022-11-17 21:02:07 +0000
commit13748bb6611bee0fb4e20bb703a26d778791bd21 (patch)
treed48dd68970984652f0c86ccd2ae1acefadab72ce /Master/texmf-dist/doc
parent98da629242a98dc1eec7813bc8ae24339697f7dc (diff)
luakeys (17nov22)
git-svn-id: svn://tug.org/texlive/trunk@65041 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/luatex/luakeys/README.md18
-rw-r--r--Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdfbin276812 -> 283942 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex130
3 files changed, 142 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/luatex/luakeys/README.md b/Master/texmf-dist/doc/luatex/luakeys/README.md
index 2bff44088bc..bd30edb0667 100644
--- a/Master/texmf-dist/doc/luatex/luakeys/README.md
+++ b/Master/texmf-dist/doc/luatex/luakeys/README.md
@@ -78,6 +78,9 @@ local defs = {
```lua
local opts = {
+ -- Configure the delimiter that assigns a value to a key.
+ assignment_operator = '=',
+
-- Automatically convert dimensions into scaled points (1cm -> 1864679).
convert_dimensions = false,
@@ -97,6 +100,12 @@ local opts = {
-- lower, snake, upper
format_keys = { 'snake' },
+ -- Configure the delimiter that marks the beginning of a group.
+ group_begin = '{',
+
+ -- Configure the delimiter that marks the end of a group.
+ group_end = '}',
+
-- Listed in the order of execution
hooks = {
kv_string = function(kv_string)
@@ -131,6 +140,9 @@ local opts = {
end,
},
+ -- Configure the delimiter that separates list items from each other.
+ list_separator = ',',
+
-- If true, naked keys are converted to values:
-- { one = true, two = true, three = true } -> { 'one', 'two', 'three' }
naked_as_value = false,
@@ -138,6 +150,12 @@ local opts = {
-- Throw no error if there are unknown keys.
no_error = false,
+ -- Configure the delimiter that marks the beginning of a string.
+ quotation_begin = '"',
+
+ -- Configure the delimiter that marks the end of a string.
+ quotation_end = '"',
+
-- { key = { 'value' } } -> { key = 'value' }
unpack = false,
}
diff --git a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf
index ee0f3411f6e..04e307a84d0 100644
--- a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf
+++ b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex
index dd6fcc0973c..f7d2940f664 100644
--- a/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex
+++ b/Master/texmf-dist/doc/luatex/luakeys/luakeys-doc.tex
@@ -58,7 +58,7 @@ The default value of the option “\texttt{#1}” is:
\href{https://github.com/Josef-Friedrich/luakeys}
{github.com/Josef-Friedrich/luakeys}%
}
-\date{0.7.0 from 2022/07/06}
+\date{0.8.0 from 2022/11/17}
\maketitle
@@ -357,7 +357,7 @@ The \lua{parse} function can be called with an options table. This
options are supported: \catcode`_=12
\directlua{luakeys.print_names('opts')}
-\InputLua[firstline=5,lastline=69]{opts/all-opts.lua}
+\InputLua[firstline=5,lastline=86]{opts/all-opts.lua}
\noindent
The options can also be set globally using the exported table
@@ -371,6 +371,32 @@ The options can also be set globally using the exported table
%
%%
+\subsubsection{Option “\texttt{assignment_operator}”}
+\label{option:assignment-operator}
+\label{options-delimiter}
+
+The option \lua{assignment_operator} configures the delimiter that
+assigns a value to a key. The default value of this option is
+\texttt{"="}.
+
+The code example below demonstrates all six delimiter related options.
+
+\InputLua[firstline=4,lastline=13]{opts/delimiters.lua}
+
+\begin{tabular}{ll}
+\textbf{Delimiter options} & \textbf{Section} \\
+assignment_operator & \ref{option:assignment-operator}\\
+group_begin & \ref{option:group-begin}\\
+group_end & \ref{option:group-end}\\
+list_separator & \ref{option:list-separator}\\
+quotation_begin & \ref{option:quotation-begin}\\
+quotation_end & \ref{option:quotation-end}\\
+\end{tabular}
+
+%%
+%
+%%
+
\subsubsection{Option “\texttt{convert_dimensions}”}
% Wenn Sie die Option \lua{convert_dimensions} auf \lua{true} setzen,
@@ -515,26 +541,76 @@ we can write ...
\subsubsection{Option “\texttt{format_keys}”}
+% Mit Hilfe der Option \lua{format_keys} können die Schlüssel formatiert
+% werden.
+With the help of the option \lua{format_keys} the keys can be formatted.
+% Die Werte dieser Option müssen in einer Tabelle angegeben werden.
+The values of this option must be specified in a table.
+
\begin{description}
-\item[lower] \strut
+\item[lower]
+
+% Um alle Schlüssel in \emph{Kleinbuchstaben} umzuwandeln, geben sie in
+% der Optionentabelle \lua{lower} an.
+To convert all keys to \emph{lowercase}, specify \lua{lower} in the
+options table.
\InputLua[firstline=4,lastline=5]{opts/format-keys.lua}
-\item[snake] \strut
+\item[snake]
+
+% Um alle Schlüssel in \emph{snake case} (Die Wörter sind durch
+% Unterstriche getrennt) umzuwandeln, geben sie in der Optionentabelle
+% \lua{snake} an.
+To make all keys \emph{snake case} (The words are separated by
+underscores), specify \lua{snake} in the options
+table.
\InputLua[firstline=11,lastline=12]{opts/format-keys.lua}
-\item[upper] \strut
+\item[upper]
+
+% Um alle Schlüssel in \emph{Grossbuchstaben} umzuwandeln, geben sie in der
+% Optionentabelle \lua{upper} an.
+To convert all keys to \emph{uppercase}, specify \lua{upper} in the
+options table.
\InputLua[firstline=18,lastline=19]{opts/format-keys.lua}
\end{description}
+% Sie können auch mehrere Formatierungsarten kombinieren.
+You can also combine several types of formatting.
+
+\InputLua[firstline=25,lastline=26]{opts/format-keys.lua}
+
\DefaultOptDescription{format_keys}
%%
%
%%
+\subsubsection{Option “\texttt{group_begin}”}
+\label{option:group-begin}
+
+The option \lua{group_begin} configures the delimiter that marks the
+beginning of a group. The default value of this option is \texttt{"\{"}.
+A code example can be found in section \ref{options-delimiter}.
+
+%%
+%
+%%
+
+\subsubsection{Option “\texttt{group_end}”}
+\label{option:group-end}
+
+The option \lua{group_end} configures the delimiter that marks the end
+of a group. The default value of this option is \texttt{"\}"}. A code
+example can be found in section \ref{options-delimiter}.
+
+%%
+%
+%%
+
\subsubsection{Option “\texttt{hooks}”}
% Die folgenden Hooks bzw. Callback-Funktionen ermöglichen es in den
@@ -623,6 +699,18 @@ as a parameter.
%
%%
+\subsubsection{Option “\texttt{list_separator}”}
+\label{option:list-separator}
+
+The option \lua{list_separator} configures the delimiter that separates
+list items from each other. The default value of this option is
+\texttt{","}. A code example can be found in section
+\ref{options-delimiter}.
+
+%%
+%
+%%
+
\subsubsection{Option “\texttt{naked_as_value}”}
% Mit Hilfe der Option \lua{naked_as_value} werden nackte Schlüssel
@@ -665,13 +753,37 @@ If we set the option \lua{no_error} to \lua{true}:
%
%%
+\subsubsection{Option “\texttt{quotation_begin}”}
+\label{option:quotation-begin}
+
+The option \lua{quotation_begin} configures the delimiter that marks the
+beginning of a string. The default value of this option is
+\texttt{'"'} (double quotes). A code example can be found in section
+\ref{options-delimiter}.
+
+%%
+%
+%%
+
+\subsubsection{Option “\texttt{quotation_end}”}
+\label{option:quotation-end}
+
+The option \lua{quotation_end} configures the delimiter that marks the
+end of a string. The default value of this option is \texttt{'"'}
+(double quotes). A code example can be found in section
+\ref{options-delimiter}.
+
+%%
+%
+%%
+
\subsubsection{Option “\texttt{unpack}”}
% Mit Hilfe der Option \lua{unpack} werden alle Tabellen, die nur aus
% einem einzigen nackten Schlüssel bzw. einen einzigen alleinstehenden
% Wert bestehen, aufgelöst.
With the help of the option \lua{unpack}, all tables that consist of
-only one a single naked key or a single standalone value are unpacked.
+only a single naked key or a single standalone value are unpacked.
\InputLua[firstline=4,lastline=5]{opts/unpack.lua}
@@ -1816,6 +1928,12 @@ An example of how to use the command in \LaTeX:
that means scan for tokens that are enclosed in square brackets
* extend and improve documentation
}
+\changes{0.8.0}{2022/11/17}{
+* Add 6 new options to change the delimiters: “assignment_operator”,
+ “group_begin”, “group_end”, “list_separator”, “quotation_begin”,
+ “quotation_end”.
+* Extend the documentation about the option “format_keys”.
+}
\pagebreak
\PrintChanges
\pagebreak