4

How can I easily change the typeface of remark titles in amsthm without having to define a completely new style using \newtheoremstyle.

More precisely, I have the following code:

\usepackage{amsthm}            
\theoremstyle{remark}          % in order to avoid content to be printed in italics
\newtheorem{remark}{Remark} 

PS: I have to use amsthm because coauthors want to use it. So solutions involving different theorem packages will not be helpful.

lpdbw
  • 8,330

2 Answers2

3

Define a theorem style the "short way" by adding to the remark style:

\documentclass{article}

\usepackage{amsthm}

\makeatletter
\def\th@newremark{\th@remark\thm@headfont{\bfseries}}
\makeatletter

\theoremstyle{newremark}
\newtheorem{remark}{Remark}

\begin{document}

\begin{remark}
Something
\end{remark}

\end{document}

enter image description here

egreg
  • 1,121,712
  • I will accept this solution because Gonzalo Medina's answer involves the etoolbox package and when working with coauthors it is usually better not load too many fancy packages because in the end nobody knows what all the packages do. – lpdbw May 30 '13 at 15:51
2

You can patch the \th@remark command and change the \itshape original declaration for \thm@headfont to wahtever you need (in my example code I used \normalfont):

\documentclass{article}
\usepackage{amsthm}            
\usepackage{etoolbox}

\makeatletter
\patchcmd{\th@remark}{\thm@headfont{\itshape}}{\thm@headfont{\normalfont}}{}{}
\makeatother

\theoremstyle{remark}
\newtheorem{remark}{Remark} 

\begin{document}

\begin{remark}
test
\end{remark}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128