provide lots of default theorems

This commit is contained in:
Maximilian Keßler 2022-01-23 19:01:02 +01:00
parent f4887160ed
commit 33a2294692

View File

@ -391,25 +391,13 @@
thmtools .clist_set:N = \l_@@_key_thmtools_clist ,
thmtools .default:n = {} ,
}
\keys_define:nn { @@ / providedtheorem }
{
name .tl_set:N = \l_@@_key_name_tl ,
name .default:n = \c_novalue_tl ,
mdframed .tl_set:N = \l_@@_key_mdframed_tl ,
mdframed .default:n = \c_novalue_tl ,
style .tl_set:N = \l_@@_key_style_tl ,
style .default:n = \c_novalue_tl ,
group .clist_set:N = \l_@@_key_group_clist ,
group .default:n = {} ,
thmtools .clist_set:N = \l_@@_key_thmtools_clist ,
thmtools .default:n = {} ,
}
% \end{macrocode}
%
%
% Process the given keys:
%
% \begin{macrocode}
\keys_set:nn { fancythm } { translator, generate defaults, number in, style }
\ProcessKeysOptions{ fancythm }
% \end{macrocode}
%
@ -745,14 +733,108 @@
% \end{macro}
%
%
%
% \begin{macro}{\fancythm_provide_big_theorem:nn}
% \begin{macrocode}
\cs_new:Npn \fancythm_provide_big_theorem:nn #1 #2
{
\@@_provide_package_theorem:nnn { #1 } { #2 } { big }
}
% \end{macrocode}
% \end{macro}
%
%
%
% \begin{macro}{\fancythm_provide_small_theorem:nn}
% \begin{macrocode}
\cs_new:Npn \fancythm_provide_small_theorem:nn #1 #2
{
\@@_provide_package_theorem:nnn { #1 } { #2 } { small }
}
% \end{macrocode}
% \end{macro}
%
%
%
% \begin{macro}{\fancythm_provide_tiny_theorem:nn}
% \begin{macrocode}
\cs_new:Npn \fancythm_provide_tiny_theorem:nn #1 #2
{
\@@_provide_package_theorem:nnn { #1 } { #2 } { tiny }
}
% \end{macrocode}
% \end{macro}
%
%
%
%
% \begin{macrocode}
\AddToHook { begindocument / before } [ fancythm ]
\bool_if:NT \g_@@_generate_defaults_bool
{
\@@_provide_package_theorem:nnn { style = thmgreenmargin } { example } { big }
\@@_provide_package_theorem:nnn { style = thmorangemarginandfill} { lemma } { big }
\AddToHook { begindocument / before } [ fancythm ]
{
\fancythm_provide_big_theorem:nn { style = thmredmarginandfill } { theorem }
\fancythm_provide_big_theorem:nn { style = thmredmarginandfill } { proposition }
\fancythm_provide_big_theorem:nn { style = thmredmarginandfill } { corollary }
\fancythm_provide_big_theorem:nn { style = thmbluemarginandfill } { definition }
\fancythm_provide_big_theorem:nn { style = thmorangemarginandfill} { lemma }
\fancythm_provide_big_theorem:nn { style = thmgreenmargin } { example }
\fancythm_provide_big_theorem:nn
{
style = thmredmarginbluefill,
name = Theorem ~ and ~ Definition
} { theoremdef }
\fancythm_provide_big_theorem:nn
{
style = thmredmarginbluefill,
name = Proposition ~ and ~ Definition
} { propositiondef }
\fancythm_provide_big_theorem:nn
{
style = thmorangemarginbluefill,
name = Lemma ~ and ~ Definition
} { propositiondef }
% \end{macrocode}
% \begin{macrocode}
\fancythm_provide_small_theorem:nn { style = thmvioletmargin } { notation }
\fancythm_provide_small_theorem:nn { style = thmyellowmargin } { remark }
\fancythm_provide_small_theorem:nn { style = thmgoldmargin } { praise }
\fancythm_provide_small_theorem:nn { style = thmblackmarginandfill } { question }
\fancythm_provide_small_theorem:nn { style = thmblackmargin } { orga }
\fancythm_provide_small_theorem:nn { style = thmredmargin } { fact }
\fancythm_provide_small_theorem:nn
{
style = thmyellowmargin,
name = Trivial ~ Nonsense
} { trivial }
\fancythm_provide_small_theorem:nn
{
style = thmvioletmargin,
name = Abuse ~ of ~ Notation
} { abuse }
\fancythm_provide_small_theorem:nn
{
style = thmyellowmargin,
name = Oral ~ remark
} { oral }
% \end{macrocode}
% \begin{macrocode}
\fancythm_provide_tiny_theorem:nn { } { variant }
\fancythm_provide_tiny_theorem:nn { } { assumption }
\fancythm_provide_tiny_theorem:nn { } { note }
\fancythm_provide_tiny_theorem:nn { } { warning }
\fancythm_provide_tiny_theorem:nn { } { goal }
\fancythm_provide_tiny_theorem:nn { } { strategy }
\fancythm_provide_tiny_theorem:nn { } { problem }
\fancythm_provide_tiny_theorem:nn { } { info }
\fancythm_provide_tiny_theorem:nn { } { observe }
\fancythm_provide_tiny_theorem:nn { } { property }
\fancythm_provide_tiny_theorem:nn { } { intuition }
\fancythm_provide_tiny_theorem:nn { } { recall }
\fancythm_provide_tiny_theorem:nn { } { idea }
\fancythm_provide_tiny_theorem:nn { } { exercise }
\fancythm_provide_tiny_theorem:nn { } { reminder }
}
}
% \end{macrocode}
%