0

I know how to do this:

enter image description here

where the Definition 3 is bold. You just do this:

\newtheorem{def}{Definition}
...    
\begin{def}
A \textit{field} $\mathbb{F}$.
\end{def}

Wondering how to do it like this though:

enter image description here

where it has the name of the definition in bold to. Wondering if there is a function or something I could create to do this:

\newtheorem{defn}{Definition ([PARAMETER])}
...    
\begin{def[label="Field"]}
A \textit{field} $\mathbb{F}$.
\end{def}
Johannes_B
  • 24,235
  • 10
  • 93
  • 248
Lance
  • 1,799

1 Answers1

2

In the amsthm documentation there is an example in 4.3.2 which shows how to do this: You first define a new theoremstyle with a bold note:

\newtheoremstyle{bfnote}%
  {}{}
  {\itshape}{}
  {\bfseries}{.}
  { }{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}

Then you activate it with

\theoremstyle{bfnote}

Now you can define your theorem (The name def is invalid here):

\newtheorem{defi}{Definition}

In your document, you can use it like this:

\begin{defi}[Graph]
  A \textit{field} $\mathbb{F}$.
\end{defi}

enter image description here