# thmtools - issue with head number style

I'm using thmtools to define a custom example environment. I'm styling the head as italic, but the number is not being styled correctly: it appears in normal mode instead of italic (the dot after the number is being styled correctly). If I style the head as bold, then the number is styled correctly. Am I missing something or is it a bug?

Minimal working example:

\documentclass[11pt,twoside]{article}

\usepackage{amsthm,thmtools}

\declaretheoremstyle[
name=Example,
spaceabove=\topsep, spacebelow=\topsep,
bodyfont=\normalfont,
qed=$\diamond$
]{example}
\declaretheorem[style=example]{example}

\begin{document}
\begin{example}
test
\end{example}
\end{document}

-

The problem is that thmtools defines

\def\NUMBER{\bgroup\@upn{##2}\egroup}


and

\let\@upn=\textup


so the change to italics won't have any effect on the number that will always be typeset in up-right font; one way to override this setting (and I am not sure if this is a good typographical practice) is to use preheadhook to redefine \@upn:

\documentclass[11pt,twoside]{article}

\usepackage{amsthm,thmtools}
\makeatletter
\declaretheoremstyle[
name=Example,
spaceabove=\topsep, spacebelow=\topsep,
bodyfont=\normalfont,
qed=$\diamond$
]{example}
\declaretheorem[style=example]{example}
\makeatother

\begin{document}
\begin{example}
test
\end{example}
\end{document}


-
\let\@upn\@firstofone will also remove a pair of braces; just nitpicking. :) I would prefer an upright number too. –  egreg Jan 12 '13 at 20:22