3

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}
4

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,

0

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}
      ...................................

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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