muzimuzhi / thmtools

New home for LaTeX package bundle thmtools
LaTeX Project Public License v1.3c
18 stars 3 forks source link

documentation: example with `thmbox={<kv-list>}` #35

Open mbertucci47 opened 1 year ago

mbertucci47 commented 1 year ago

Since theorems declared with the thmbox key do not respect most (all?) options from a style declared with \declaretheoremstyle, it would be useful to have an example in the documentation that uses the fact that the value of thmbox= can be a list of thmbox keys, similar to what is already done for shadethm. For example, something like

\declaretheorem[thmbox={L,bodystyle=\normalfont\noindent,leftmargin=1cm}]{boxtheorem}

There is the issue of needing four # in the parameters of headstyle and titlestyle mentioned in #25, but this could also be documented or an alternative approach given using \thmboxoptions:

\declaretheorem[thmbox={L,bodystyle=\normalfont\noindent,leftmargin=1cm}]{boxtheorem}
\thmboxoptions{headstyle={\textsc{#1 #2}}}

Note that \thmboxoptions must be used after since thmbox is not loaded prior to using the thmbox key.

It could be argued that users should just move to using ~mdframed or~ tcolorbox for fancy theorems, but I think thmbox gives a nice lightweight alternative that doesn't need to be abandoned quite yet.

muzimuzhi commented 1 year ago

It could be argued that users should just move to using mdframed or tcolorbox for fancy theorems, but I think thmbox gives a nice lightweight alternative that doesn't need to be abandoned quite yet.

+1 You've said the best I can argue :D

Will add an example following your suggesttion, and maybe partially solve #25 as well.