tags:

views:

337

answers:

3

I would like to ask two questions about the numbering schemes in Latex for which I am unable to find any precise reference. I will be very happy if somebody could help me out on this.

Question 1) Is it possible to number theorems and subsubsections consistently as follows:


2 Section two

2.1 A subsection

2.1.1 A subsubsection

Theorem 2.1.2 : Note that theorem number is behaving like the subsubsection number.

2.1.3 Next subsubsection

Theorem 2.1.4 Next theorem.

2.2 Next subsection

So basically I want my Theorem numbers to follow the same numbering as a subsubsection.


Question 2) Is it possible to make all the section and theorem numbers follow a paragraph number as shown below:


58 A paragraph

Theorem 58.1. A theorem in para 58.

59 Next paragraph

Theorem 59.1. Next theorem.

+9  A: 

First question:

Yes, this is possible, using the AMS \newtheorem command. There are two ways of using it:

\newtheorem{<name>}{<caption>}[<numbers within>]
\newtheorem{<name>}[<numbers like>]{<caption>}

The arguments name and caption speak for themselves. The optional arguments should be counters. When using the numbers within, a new counter (called name) is created, which is reset whenever the name is stepped. The second type of call, using numbers like does not create a new counter, but specifies which counter should be used to number this kind of theorem. Of course, when a theorem is inserted, this counter is also stepped.

In your situation, you should probably do something like

\newtheorem{myTheorem}[subsubsection]{Theorem}

Note in particular that --unlike macros-- counters are called without a backslash.

Second question:

Built-in counters in LaTeX usually come with a macro that takes the counter value, and formats is. For the counter foo, this macro would be \thefoo. Changing the appearance of the counter can be done like this:

\renewcommand{\thefoo}{\arabic{foo}}

will result in the value being typeset using arabic numerals. Ther's also \alph, \Alph, \roman and \Roman for numbers, capitals, lowercase Roman numerals and uppercase Roman numerals, respectively. Probably, different packages provide many more of such macros.

I'm not exactly sure what you need precisely, but try something like

\renewcommand{\thetheorem}{\theparagraph.\arabic{theorem}}

if theorems have their own counter. If you use another counter for theorems (like in Q1), modify the format macro for that counter instead.

Final comment

using

\newtheorem{myTheorem}[subsubsection]{Theorem}

will set the formatting of theorem numbers to what you would expect automatically: \thesubsubsection.\arabic{theorem}.

Martijn
Thanks Martijn for the detailed answer. I am very happy to be able to do this numbering now.
MNT
+1  A: 

Take a look at http://www.mackichan.com/index.html?techtalk/734.htm~mainFrame

midtiby
+3  A: 

You need to use

\newtheorem{theorem}[subsubsection]{Theorem} 

or

\newtheorem{theorem}[paragraph]{Theorem} 

See:

John
Thanks for the link!
MNT