Math & Science ⇒ brackets around theorem numbers
brackets around theorem numbers
Hi!
Is it possible to put brackets around theorem numbers? (I'm using amsthm which I think is loaded automatically by amsart nowadays.) This is especially of interest when the theorem numbers come before "Theorem" or "Corollary", and are numbered according to the equation counter.
Best regards.
- D.
Is it possible to put brackets around theorem numbers? (I'm using amsthm which I think is loaded automatically by amsart nowadays.) This is especially of interest when the theorem numbers come before "Theorem" or "Corollary", and are numbered according to the equation counter.
Best regards.
- D.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10344
- Joined: Mon Mar 10, 2008 9:44 pm
brackets around theorem numbers
Hi,
depending on the name of the counter used you could redefine its output. For instance if you are using a counter called corollary like with
you could use
Stefan
depending on the name of the counter used you could redefine its output. For instance if you are using a counter called corollary like with
Code: Select all
\newtheorem{corollary}{Corollary}
Code: Select all
\renewcommand*\thecorollary{[\arabic{corollary}]}
LaTeX.org admin
brackets around theorem numbers
Hi Stefan,
Thanks a lot for the idea. Yes, it does the job when we're using separate counters such as "corollary". However, if the theorems, corollaries, lemmas, are all numbered according to the equation counter, the redefinition doesn't seem to work---I just tried.
For instance, I have:
Is there a way to get it done in this case?
I suspect in this case the theorem number is printed directly from the equation counter (and not from the theorem counter), and e.g., has no effect on the output.
Best regards,
- D.
Thanks a lot for the idea. Yes, it does the job when we're using separate counters such as "corollary". However, if the theorems, corollaries, lemmas, are all numbered according to the equation counter, the redefinition doesn't seem to work---I just tried.
For instance, I have:
Code: Select all
\newtheorem{theorem}[equation]{Theorem}
\newtheorem{corollary}[equation]{Corollary}
\newtheorem{lemma}[equation]{Lemma}
\newtheorem{proposition}[equation]{Proposition}
I suspect in this case the theorem number is printed directly from the equation counter (and not from the theorem counter), and e.g.,
Code: Select all
\renewcommand*{\thetheorem}{(\theequation)}
Best regards,
- D.
Re: brackets around theorem numbers
With your code, equations and theorems share the same counter, named "equation". If you redefine \theequation to get brackets in theorems around the number, as a side effect, you will also get brackets in numbered equations. I don't find a good idea to use the same numbering sequence for two so different elements of the document. In addition, brackets around theorem or equation numbers could be confused with bibliographic references.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
brackets around theorem numbers
Hi Juanjo,
It's not square brackets but normal brackets `(' and `)', so there's no confusion with bibliographic elements. Using a single counter works pretty well when not too-many/all equations are numbered (which I personally think is a good thing), and there are quite a few lemmas in the document. The single counter makes it easy to get around the document if equation numbers and theorem/corollary/proposition/lemma numbers appear on the left (with \leqno if necessary). There are quite a few very good books written with this numbering scheme. I suspect with equation numbers on the right and theorem numbers on the left it doesn't make a good reading at all.
Best,
- D.
It's not square brackets but normal brackets `(' and `)', so there's no confusion with bibliographic elements. Using a single counter works pretty well when not too-many/all equations are numbered (which I personally think is a good thing), and there are quite a few lemmas in the document. The single counter makes it easy to get around the document if equation numbers and theorem/corollary/proposition/lemma numbers appear on the left (with \leqno if necessary). There are quite a few very good books written with this numbering scheme. I suspect with equation numbers on the right and theorem numbers on the left it doesn't make a good reading at all.

Best,
- D.
brackets around theorem numbers
In my (bad) English, these symbols [ ] are brackets and these ones ( ) are parentheses, from where my confusion.dnemoc wrote:It's not square brackets but normal brackets `(' and `)', so there's no confusion with bibliographic elements
I am so used to the "classic" numbering schemes that I find quite simple to "navigate" back and forth throught books and articles using them. Anyway, that's only a personal opinion.dnemoc wrote: Using a single counter works pretty well when not too-many/all equations are numbered (which I personally think is a good thing), and there are quite a few lemmas in the document. The single counter makes it easy to get around the document if equation numbers and theorem/corollary/proposition/lemma numbers appear on the left (with \leqno if necessary).(...) I suspect with equation numbers on the right and theorem numbers on the left it doesn't make a good reading at all.![]()
Could you cite any or provide a link to, say, Google books? I am curious about how they look.dnemoc wrote: There are quite a few very good books written with this numbering scheme.
Although I would never use it

Code: Select all
\documentclass[leqno]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsthm}
\swapnumbers
\newtheorem{theorem}[equation]{Theorem}
\newtheorem{corollary}[equation]{Corollary}
\newtheorem{lemma}[equation]{Lemma}
\newtheorem{proposition}[equation]{Proposition}
\renewcommand{\theequation}{(\arabic{equation})}
\makeatletter
\def\tagform@#1{\maketag@@@{\ignorespaces#1\unskip\@@italiccorr}}
\makeatother
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{lemma}\label{lem}
\lipsum[2]
\end{lemma}
\lipsum[3]
\begin{equation}\label{eq}
a+b+c+d+e+f+g+h+i=k+k+l+m+n+o+p+q.
\end{equation}
\lipsum[4]
\begin{theorem}
\lipsum[5]
\end{theorem}
Here we cite Lemma~\ref{lem} and equation~\eqref{eq}.
\end{document}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
brackets around theorem numbers
Hi Juanjo,
First of all, I am sorry, it's my bad English. You are very correct, I should have written parentheses. Thanks for the correction. We have become used to saying, quite incorrectly, ``square-brackets'' when referring to `[ ]', and this vocabulary has stuck with me.
This numbering scheme is indeed purely a matter of personal taste. Here are two books that I like very much, which incorporate the aforesaid numbering scheme:
Sharpe's General Theory of Markov Processes: http://books.google.ch/books?id=lMpIvtI ... =7#PPA1,M1
D. W. Stroock's Probability Theory, an Analytic View: http://books.google.ch/books?id=9uqZErf ... =4#PPR7,M1
There are others following similar ideas, a sort of `non-example' is Malliavin's Integration & Probability: http://books.google.ch/books?id=KK4WC-K ... 2#PPA13,M1
which doesn't read quite well because of the absence of parentheses
but is rather easy to navigate. This book is a jewel, but I found it extremely difficult to read.
Thanks for your example, it's been very helpful. How do you know about these intricacies? Is there any literature that explains LaTeX in this detail?
Best regards, and thanks again!
- D.
First of all, I am sorry, it's my bad English. You are very correct, I should have written parentheses. Thanks for the correction. We have become used to saying, quite incorrectly, ``square-brackets'' when referring to `[ ]', and this vocabulary has stuck with me.
This numbering scheme is indeed purely a matter of personal taste. Here are two books that I like very much, which incorporate the aforesaid numbering scheme:
Sharpe's General Theory of Markov Processes: http://books.google.ch/books?id=lMpIvtI ... =7#PPA1,M1
D. W. Stroock's Probability Theory, an Analytic View: http://books.google.ch/books?id=9uqZErf ... =4#PPR7,M1
There are others following similar ideas, a sort of `non-example' is Malliavin's Integration & Probability: http://books.google.ch/books?id=KK4WC-K ... 2#PPA13,M1
which doesn't read quite well because of the absence of parentheses

Thanks for your example, it's been very helpful. How do you know about these intricacies? Is there any literature that explains LaTeX in this detail?
Best regards, and thanks again!
- D.
brackets around theorem numbers
For the numbering scheme, I suppose you want to follow the model provided by General theory of Markov processes
(not so bad as I thought). The second book removes parentheses in theorem numbers. I agree with your opinion about the thid one.
(not so bad as I thought). The second book removes parentheses in theorem numbers. I agree with your opinion about the thid one.
The \newtheorem command is explained in any general textbook on LaTeX and \swapnumbers is documented in the manual of the amsthm package. The trick to remove parentheses (i.e. the redefinition of \tagform@) appears in mathmode.pdf.dnemoc wrote:How do you know about these intricacies? Is there any literature that explains LaTeX in this detail?
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
brackets around theorem numbers
You are right, I'ld like to follow the numbering scheme of General Theory...
Thanks a lot Juanjo!
Thanks a lot Juanjo!