Math & Science ⇒ brackets around theorem numbers
brackets around theorem numbers
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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- Joined: Mon Mar 10, 2008 9:44 pm
brackets around theorem numbers
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}]}
brackets around theorem numbers
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
brackets around theorem numbers
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}
brackets around theorem numbers
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
(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?
brackets around theorem numbers
Thanks a lot Juanjo!