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 would like to global define the theorem environment such that the name of the thereom (like ABC in the following example) is emphasized (either \textit or \textbf), how can I do that?

I know I can do it one by one, but it would be more convienent to define it globally.

\begin{theorem}[ABC]
\end{theorem}
share|improve this question
4  
What theorem package are you using? Please create a minimal working example (MWE) that we can work with. –  Werner Feb 27 at 17:49
1  
Based on the general inquiry, I think you'll find what you need in terms of customization in one of the following posts: How to make the optional title of a theorem bold with amsthm?; How to remove brackets from the optional title in amsthm?; How can I make a custom theorem for a definition? –  Werner Feb 27 at 18:02

2 Answers 2

If you are using amsthm, you can declare a new theorem style using \newtheoremstyle:

\documentclass{article}
\usepackage{amsthm}
\newtheoremstyle{mystyle}
  {\topsep}%
  {\topsep}%
  {\itshape}%
  {}%
  {\bfseries}
  {.}
  {.5em}%
  {\thmname{#1}~\thmnumber{#2}\thmnote{ (#3)}}%
\theoremstyle{mystyle}
\newtheorem{theorem}{Theorem}

\begin{document}

\begin{theorem}[ABC]
test
\end{theorem}

\end{document}

enter image description here

Another option is to use the thmtools package as a front-end for amsthm or ntheorem:

\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools}

\declaretheoremstyle[notefont=\bfseries,bodyfont=\itshape]{mystyle}
\declaretheorem[style=mystyle]{theorem}

\begin{document}

\begin{theorem}[ABC]
test
\end{theorem}

\end{document}

I used \bfseries for the annotation font, but you can use \itshape instead if italics are preferred,

share|improve this answer

With the ntheorem package, you use a theoremstyle, that describes the general layout, and specify font characteristics, numbering, position of margin, separator, endtheorem mark, &c. A specification is valid for all subsequently declared "new theorems", until another specification replaces it. You can define new theoremstyles, either with the own syntax of the package or with the help of the mathtoolspackage.

There are 9 predefined theorem styles; plain, break, change, margin, change break, marginbreak, nonumberplain, nonumberbreak and empty. Framed or shaded theorems are also possible

Here is an example, just to show how it works:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath} % Or mathtools

\usepackage[thref,amsmath,endmarks]{ntheorem}

        \theoremstyle{plain}

         \theoremheaderfont{\bfseries}
         \theorembodyfont{\itshape}
         \theoremseparator{.}
                \newtheorem{Thm}{Theorem}
                \newtheorem{Prop}{Proposition}

         \theoremheaderfont{\scshape\upshape}
         \theorembodyfont{\upshape}
                \newtheorem{Def}{Definition}

        \theoremstyle{break}
            \theoremseparator{:}
            \newtheorem{Example}{Example}

        \theoremstyle{nonumberplain}
            \theoremsymbol{\square}
             \newtheorem{Proof}{Proof}

     \begin{document}
      ...................................
share|improve this answer

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.