[OS X TeX] numbering (fwd)

Don Green Dragon fergdc at shaw.ca
Mon Jan 31 22:57:57 EST 2011


Hello All,

Yes, the material below was discussed a long time ago, but at that time I did not follow what was going on, but kept the message thinking that some day in the future it would be of interest. Well . . . that day is here!  ;-)

> <<snip>>

> On May 20, 2010, at 2:47 PM, George Gratzer wrote:
>> On 2010-05-20, at 12:22 PM, Alan Munn wrote:
>>> 
>>> \renewcommand{\thetheorem}{\Roman{chapter}.\arabic{theorem}}
>>> 
>>> 
>>> Make sure it's after the \counterwithout command. (Assuming this  
>>> question follows up on your wanting all the theorems sequentially  
>>> numbered and not restarting each chapter.
<<snip>>
> But then you need to show exactly what you're doing.  The following  
> works for me:
> 
> \documentclass{book}
> \usepackage{amsmath,amsthm}
> \theoremstyle{plain}
> \newtheorem{theorem}{Theorem}[chapter]
> \usepackage{chngcntr}
> \counterwithout{theorem}{chapter}
> \renewcommand{\thetheorem}{\Roman{chapter}.\arabic{theorem}}

I don't follow Alan's comment "Make sure it's after the \counterwithout command." because on commenting out the \counterwithout command, Alan's code typeset as George wanted. Also, on commenting out the line <\usepackage{chngcntr}> as well, the typeset was correct!!!

However, since George wants chapters numbered as I, II, III, . . .  I used the following preamble to obtain the desired form:

\documentclass{book}
\usepackage{amsmath,amsthm}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[chapter]
%\usepackage{chngcntr}
%\counterwithout{theorem}{chapter}
\renewcommand{\thetheorem}{\Roman{chapter}.\arabic{theorem}}
\renewcommand{\thechapter}{\Roman{chapter}}

Could not find anything about \counterwithout nor \usepackage{chngcntr} in The LaTeX Companion nor did the bash shell turn up anything via $texdoc .... However, on commenting out the \usepackage{chngcntr} line but leaving \counterwithout intact, the error message was that "\counterwithout was an undefined control sequence" which makes sense.

> \begin{document}
> \chapter{A chap}
> \section{A section}
> 
> \begin{theorem}
> \[ \pi
> \]
> \end{theorem}
> 
> \chapter{Another chap}
> \begin{theorem}
> \[
> \pi^{2}
> \]
> \end{theorem}
> \end{document}
> 
> Alan

<<snip>>

I have this uncomfortable feeling that, once again, I'm missing something!


Don Green Dragon
fergdc at Shaw.ca





More information about the MacOSX-TeX mailing list