implement caching options and pass them to groupthm

This commit is contained in:
Maximilian Keßler 2022-02-03 15:44:39 +01:00
parent f3f8254c3b
commit 9e214ef6cc

View file

@ -64,7 +64,6 @@
% \subsection{Dependencies}
% \begin{macrocode}
\RequirePackage{l3keys2e}
\RequirePackage{groupthm}
\RequirePackage[default styles]{thmstyle}
% \end{macrocode}
%
@ -348,6 +347,22 @@
\clist_new:N \l_@@_group_clist
% \end{macrocode}
% \end{variable}
%
%
%
% \begin{variable}{\g_@@_groupthm_option_clist}
%
%
%
% \begin{macrocode}
\clist_new:N \g_@@_groupthm_option_clist
% \end{macrocode}
% \end{variable}
%
%
%
%
%
%
% \subsection{Key interface}
%
@ -362,22 +377,32 @@
% \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 } ,
} ,
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 } ,
cache .code:n =
{
\clist_put_right:Nn \g_@@_groupthm_option_clist { cache = #1 }
} ,
cache .default:n = { true } ,
cache version .code:n =
{
\clist_put_right:Nn \g_@@_groupthm_option_clist { cache version = #1 }
} ,
cache version .default:n = { 0 } ,
}
% \end{macrocode}
%
@ -408,6 +433,26 @@
\ProcessKeysOptions{ fancythm }
% \end{macrocode}
%
% \begin{macro}{\@@_require_package:nn}
%
%
% \begin{macrocode}
\cs_new:Npn \@@_require_package:nn #1
{
\RequirePackage [ #1 ]
}
\cs_generate_variant:Nn \@@_require_package:nn { V n }
% \end{macrocode}
% \end{macro}
%
%
%
%
% \begin{macrocode}
\@@_require_package:Vn \g_@@_groupthm_option_clist { groupthm }
% \end{macrocode}
%
%
%