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} % \subsection{Dependencies}
% \begin{macrocode} % \begin{macrocode}
\RequirePackage{l3keys2e} \RequirePackage{l3keys2e}
\RequirePackage{groupthm}
\RequirePackage[default styles]{thmstyle} \RequirePackage[default styles]{thmstyle}
% \end{macrocode} % \end{macrocode}
% %
@ -349,6 +348,22 @@
% \end{macrocode} % \end{macrocode}
% \end{variable} % \end{variable}
% %
%
%
% \begin{variable}{\g_@@_groupthm_option_clist}
%
%
%
% \begin{macrocode}
\clist_new:N \g_@@_groupthm_option_clist
% \end{macrocode}
% \end{variable}
%
%
%
%
%
%
% \subsection{Key interface} % \subsection{Key interface}
% %
% \begin{texnote} % \begin{texnote}
@ -362,22 +377,32 @@
% \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 } ,
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} % \end{macrocode}
% %
@ -408,6 +433,26 @@
\ProcessKeysOptions{ fancythm } \ProcessKeysOptions{ fancythm }
% \end{macrocode} % \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}
% %
% %
% %