fix option parsing bugs

This commit is contained in:
Maximilian Keßler 2022-01-23 15:25:22 +01:00
parent beb4b7af0a
commit ed965bc461

View file

@ -301,29 +301,36 @@
% %
% \subsection{Key interface} % \subsection{Key interface}
% %
% Note that unfortunately, none of the keynames really containes a space.
% \LaTeX2e strips spaces before loading a package, so introducing them here
% would make them inaccessible.
%
%
% \begin{macrocode} % \begin{macrocode}
\keys_define:nn { fancythm } \keys_define:nn { fancythm }
{ {
translator .bool_set:N = \g_@@_translator_bool , translator .bool_set:N = \g_@@_translator_bool ,
translator .default:n = { true } , translator .default:n = { true } ,
generate ~ defaults .bool_set:N = \g_@@_generate_defaults_bool , generate defaults .bool_set:N = \g_@@_generate_defaults_bool ,
generate ~ defaults .default:n = { true } , generate defaults .default:n = { true } ,
number in .choices:nn = number in .choices:nn =
{ document, section, subsection, chapter, part } { document, section, subsection, chapter, part }
{ {
\counter_alias:nx { toplevel } { in \tl_use:N \l_keys_choice_tl } \counter_alias:nx { toplevel } { in \tl_use:N \l_keys_choice_tl }
} , } ,
number in .default:n = { document } , number in .default:n = { document } ,
style .choices:nn = style .choices:nn =
{ fancy, plain, classic } { fancy, plain, classic }
{ {
\str_set:Nn \g_@@_style_str { \tl_use:N \l_keys_choice_tl } \str_set:Nn \g_@@_style_str { \tl_use:N \l_keys_choice_tl }
} , } ,
style .default:n = { fancy } style .default:n = { fancy } ,
} }
% \end{macrocode} % \end{macrocode}
% %
% %
% Process the given keys:
%
% %
% \begin{macrocode} % \begin{macrocode}
\ProcessKeysOptions{ fancythm } \ProcessKeysOptions{ fancythm }