From ed965bc461e61031728a3fa7ffd6c16bca399832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 23 Jan 2022 15:25:22 +0100 Subject: [PATCH] fix option parsing bugs --- doc/environments/fancythm/fancythm.dtx | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/doc/environments/fancythm/fancythm.dtx b/doc/environments/fancythm/fancythm.dtx index d640c6a..0c77800 100644 --- a/doc/environments/fancythm/fancythm.dtx +++ b/doc/environments/fancythm/fancythm.dtx @@ -301,29 +301,36 @@ % % \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} \keys_define:nn { fancythm } { - translator .bool_set:N = \g_@@_translator_bool , - translator .default:n = { true } , - generate ~ defaults .bool_set:N = \g_@@_generate_defaults_bool , - generate ~ defaults .default:n = { true } , + translator .bool_set:N = \g_@@_translator_bool , + translator .default:n = { true } , + generate defaults .bool_set:N = \g_@@_generate_defaults_bool , + generate defaults .default:n = { true } , number in .choices:nn = { document, section, subsection, chapter, part } { \counter_alias:nx { toplevel } { in \tl_use:N \l_keys_choice_tl } - } , - number in .default:n = { document } , - style .choices:nn = + } , + number in .default:n = { document } , + style .choices:nn = { fancy, plain, classic } { \str_set:Nn \g_@@_style_str { \tl_use:N \l_keys_choice_tl } - } , - style .default:n = { fancy } + } , + style .default:n = { fancy } , } % \end{macrocode} % % +% Process the given keys: +% % % \begin{macrocode} \ProcessKeysOptions{ fancythm }