Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

For theorems in my contribution I use \theoremstyle{plain}. This style prints theorem label in bold italics, eg. 'Theorem 1.', which is followed by text in italics. How could I set 'Theorem 1.' to italics to match the theorem content?

I read related question

Non italic text in theorems, definitions, examples

but I was not able to extract the answer.

share|improve this question
1  
See tex.stackexchange.com/a/38264/5626 and change \itshape to \itshape\bfseries (and other settings accordingly). But first of all: why on earth would you want to do that!? –  mbork Jun 30 '12 at 11:45
    
Thanks. 1) I don't like bold up followed by italics, so I set everything to italics. 2) if 1) makes no sense, I simply don't like present scheme. –  boy Jun 30 '12 at 11:50
add comment

1 Answer

up vote 2 down vote accepted

This might be the theorem scheme that you're after, called mytheorem:

enter image description here

\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{amsthm}% http://ctan.org/pkg/amsthm
\makeatletter
\newtheoremstyle{mytheorem}% <name>
  {3pt}% <Space above>
  {3pt}% <Space below>
  {\itshape}% <Body font>
  {}% <Indent amount>
  {\itshape\bfseries}% <Theorem head font>
  {.}% <Punctuation after theorem head>
  {.5em}% <Space after theorem heading>
  {\thmname{#1}\thmnumber{\@ifnotempty{#1}{ }#2}%
   \thmnote{ {\the\thm@notefont(#3)}}}% <Theorem head spec (can be left empty, meaning `normal')>
\makeatother
\theoremstyle{mytheorem}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}\lipsum[1]\end{theorem}
\end{document}

The key here is to include a theorem head specification (argument #9) in order to reformat the theorem number from \textup (or \@upn) to plain. Here's the default definition of the theorem head specification (associated with the plain style):

\def\thmhead@plain#1#2#3{%
  \thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
  \thmnote{ {\the\thm@notefont(#3)}}}

Note the forced \@upn (defined as \textup).

share|improve this answer
    
Looks much better this way. Many thanks. –  boy Jun 30 '12 at 14:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.