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.

I'm using the following packages/options in my article:

\documentclass[b4paper,12pt]{article}   
\usepackage[english]{babel}
\usepackage{amssymb}                
\usepackage{amsmath}                
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{hyperref}               
\usepackage{graphicx}
\usepackage{color}              

\newtheoremstyle{break}
   {\topsep}{\topsep}%
   {\itshape}{}%
   {\bfseries}{}%
   {\newline}{}% 
\theoremstyle{break}

\newtheorem{theorem}{Theorem}%[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}{Definition}

\begin{definition}[Test]
This is a test definition
\end{definition}

I would like to have the name (here 'Test') not only in parentheses but also boldface. How can I achieve that?

Thank you!

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Your amsthm specification for the break theorem style should look like this:

\makeatletter
\newtheoremstyle{break}
   {\topsep}{\topsep}%
   {\itshape}{}%
   {\bfseries}{}%
   {\newline}
   {\thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
    \thmnote{ {\bfseries(#3)}}}% 
\makeatother

The header is managed using the ninth argument. I've just copied it from the amsmath source and replaced the note font with \bfseries. If you leave it empty, it defaults to the plain theorem header style.

Here's your original MWE with the above modification:

enter image description here

\documentclass[12pt]{article}   
%\usepackage[english]{babel}
%\usepackage{amssymb}                
%\usepackage{amsmath}                
%\usepackage{amsfonts}
\usepackage{amsthm}% http://ctan.org/pkg/amsthm
%\usepackage{hyperref}               
%\usepackage{graphicx}
%\usepackage{color}              

\makeatletter
\newtheoremstyle{break}
   {\topsep}{\topsep}%
   {\itshape}{}%
   {\bfseries}{}%
   {\newline}
   {\thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
    \thmnote{ {\bfseries(#3)}}}% 
\makeatother
\theoremstyle{break}

\newtheorem{theorem}{Theorem}%[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}{Definition}
\begin{document}
\begin{definition}[Test]
This is a test definition
\end{definition}
\end{document}
share|improve this answer
    
Thank you! This is exactly what I was looking for. I couldn't figure it out by looking for it in the source code...thanks for the help! –  Newby1 Jun 5 '12 at 19:09

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.