muzimuzhi / thmtools

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

thmbox overrides chosen style (back to plain) #24

Closed DVdeLima closed 2 years ago

DVdeLima commented 2 years ago

I have made the following MWE to demonstrate this:

\documentclass{article}

\usepackage{amsthm}
\usepackage{thmtools}
    \declaretheorem[name=Example,
    style=definition,
    ]{ex1}

    \declaretheorem[name=Example,
    style=definition,
    thmbox=S,
    ]{ex2}

    \declaretheorem[name=Remark,
    style=remark,
    ]{ex3}

    \declaretheorem[name=Remark,
    thmbox=L,
    style=remark,
    ]{ex4}

\begin{document}    
    \begin{ex1}
        This is an example.
    \end{ex1}

    \begin{ex2}
        This is another example.
    \end{ex2}

    \begin{ex3}
        This is a remark.
    \end{ex3}

    \begin{ex4}
        This is another remark.
    \end{ex4}
\end{document}

The above generates the following output:

example

In both cases using thmbox overrode the definition and remark styles back to plain.

DVdeLima commented 2 years ago

This is actually a thmbox problem, which has to be styled specifically, regardless of plain, definition, or remark style.

Example:

thmbox={
    style=S,
    bodystyle=\normalfont},
thmbox={
    style=M,
    bodystyle=\normalfont,
    headstyle=\itshape},