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.tex130
1 files changed, 124 insertions, 6 deletions
diff --git a/macros/luatex/generic/luakeys/luakeys-doc.tex b/macros/luatex/generic/luakeys/luakeys-doc.tex
index dd6fcc0973..f7d2940f66 100644
--- a/macros/luatex/generic/luakeys/luakeys-doc.tex
+++ b/macros/luatex/generic/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