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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose I have a series of theorems that I would like displayed as

Jim's Theorem.

Bob's Theorem.

Will's Theorem.

rather than as “Theorem (Jim).”, “Theorem (Bob).”, and “Theorem (Will)”. If I have a lot of these, it becomes tedious having to always go back to the preamble to define a new theorem environment. So I'm curious whether there may be some way to define a new theorem environment that accepts the theorem title as an argument. Ideally, I would like something which I can enter, for example, as

\begin{namedtheorem}{Jim's Theorem}

and which produces

Jim's Theorem. ...

I can achieve a pretty similar effect by defining a separate new environment, but I cannot get the spacing before and after it to match up with the normal spacing that precedes and follows a theorem environment.

Thanks for any suggestions you may have.

share|improve this question
Welcome to tex.sx! A tip: If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it). – Caramdir Mar 8 '11 at 4:08

You can use the amsthms customisable theoremstyles to do this. The trick is just figuring out what arguments to pass! By trial-and-error, I came up with the following:




\newtheoremstyle{named}{}{}{\itshape}{}{\bfseries}{.}{.5em}{\thmnote{#3's }#1}


Now let us present that most famous of all theorems.

All odd numbers are prime.

If you don't believe that Fred was involved, you may prefer the following.

All odd numbers are prime.

The proof of this is left as an exercise.
Of course, some may prefer to see this as follows.

All odd numbers are prime.

But still, we shan't bother with the proof here.
As we said, some people don't think that Fred had much to do with this.

All odd numbers are prime.

Nonetheless, the proof remains trivial.


Here's the result. Note that the first theorem is in the default style so it's the second pair that you should be looking at.

named theorems

(Added in edit: I wasn't clear what \thmnote was doing; a little further experimenting shows that if the optional argument isn't given then \thmnote swallows its argument whole so it can be used to change the behaviour depending on whether or not the argument is given. This makes it look better if you do forget the Fred.)

share|improve this answer

the ntheorem package is more flexible

% normal theorem
% Now the optional argument takes over

 Some text

\begin{namedtheorem}[Jim's Theorem.]
  Extra text
share|improve this answer
Nice solution. However, what I don't like about the ntheorem package is that it doesn't work with amsart class. Or does it? – Jairo Bochi Feb 19 at 10:19
@JairoBochi no, of course not, it autoloads amsthm which is not compatible with ntheorem (or something like that) – daleif Feb 19 at 12:03

How about this:

   \newtheorem*{thm#1}{#1's Theorem}\begin{thm#1}#2\end{thm#1}}

\namedthm{Jim}{Hello.  My name is Jim.}

\namedthm{Bob}{Hello.  My name is not Jim.}


One disadvantage is that it's a command, not an environment, and so you have to give the statement of the theorem as the second argument. But it's defined in terms of the \newtheorem command, so it should be typeset consistently with other theorems.

share|improve this answer
Using \newenvironment, you should be able to make the desired syntax from the question work. – Hendrik Vogt Mar 8 '11 at 10:22

Loop Space's answer is good, but has the disadvantage of clobbering the optional argument, so attribution can't be specified any more.

I'd suggest using a mandatory argument.


\swapnumbers % optional, of course
\newtheorem{thm}{Theorem}[section] % the main one
% other statement types

% for specifying a name
\theoremstyle{plain} % just in case the style had changed



A theorem


And a named theorem

\begin{namedthm}{Zorn's Lemma}[Zermelo]
All well-behaved ordered sets have maximal elements.


enter image description here

Of course the optional argument after the mandatory argument to \begin{namedthm} is really optional.

For unnumbered theorems, define a genericthm* theorem in the same fashion



\begin{namedthm*}{Zorn's Lemma}


\begin{namedthm*}{Zorn's Lemma}[Zermelo]

will do.

share|improve this answer
This works brilliantly for what I want! Thanks! Is it also possible to define the "thm" environment to behave normally if it hasn't an optional argument, and if it has an argument, behave like your namedthm ? – Kasper Oct 2 '14 at 11:28

Along the line of Hendrik's comment to John Palmieri's answer somewhere on this page (or maybe the previous or the next, if this question gets sufficiently many answers :) )


    \theoremstyle{plain}\newtheorem*{nmdthm\roman{nmdthmcnt}}{#2's Theorem}%


Test. This is

A theorem that I just proved recently

here's another

\begin{namedthm}{Some big-shot dude}
A theorem that I am just borrowing

And my theorem again,

\begin{namedthm}[version 2]{Willie}
Restatement of the theorem.

I use a counter for each theorem environment, instead of just the "name" of the contributor, so that spaces and special characters in the name won't break the \newtheorem command, and that I don't have to worry about name collisions. I also included compatibility with the optional argument for theorems, as you can see in the third example.

share|improve this answer

I'ld recommend taking a look at the various documents related to math typesetting available here: http://tug.org.in/ and in particular, the LaTeX primer document downloadable from http://sarovar.org/projects/ltxprimer/ The chapter on math typesetting in the latter discusses in detail how to do various kinds of customization of theorem names, etc.

share|improve this answer
The closest I found in ltxprimer is on page 113/114 in the chapter about typesetting theorems, but it doesn't say anything about the syntax the OP would like. – Hendrik Vogt Mar 8 '11 at 10:08

Your Answer


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.