Re: Numbering equations
- To: mathgroup at smc.vnet.net
- Subject: [mg57828] Re: Numbering equations
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Thu, 9 Jun 2005 05:55:29 -0400 (EDT)
- Organization: The University of Western Australia
- References: <d868p8$c36$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <d868p8$c36$1 at smc.vnet.net>, "dkl8" <klepachd at gmail.com>
wrote:
> I am interested in numbering equations in the following way :
>
> chapter 1
> (1.1)
> (1.2)
> ...
>
> chapter 2
> (2.1)
> (2.2)
> ...
> etc.
>
> Is there a simple way to do that ?
Yes. This may sound complicated but it is actually quite straightforward
and logical. Three things are required:
[1] You need a Chapter heading style. I would suggest taking an existing
Style (such as Section) in an existing StyleSheet (say Article Classic,
which has a NumberedEquation style), copying and pasting it into the
StyleSheet and then modifying its name to Chapter. It is easiest to use
Format | Show Expression
and edit the raw cell to modify its name to "Chapter". You need to
modify the names in each of the style environments as well.
[2] You can modify the properties of the "Chapter" style using either
Format | Show Expression
or via the Option Inspector. In particular, you need to set
CellGroupingRules -> {"SectionGrouping", 20} -- the number defines the
hierarchical ordering.
CounterIncrements -> Chapter -- you want the Chapter counter to
increment each time you start a new Chapter.
CounterAssignments->{{"Section", 0}, {"Subsection", 0},
{"Subsubsection", 0}, {"NumberedEquation", 0}} -- you want the
section, subsection, subsubsection, and equation counters to reset
whenever you start a new Chapter.
[3] Now edit the "NumberedEquation" style, which is in the "Styles for
Automatic Numbering" section so that it includes counters for both the
"Chapter" and "NumberedEquation". Unformatting the "NumberedEquation"
style, the appropriate part of the "NumberedEquation" style should become
TextData[
{
"(",
CounterBox[ "Chapter"],
"."
CounterBox[ "NumberedEquation"]
")"
}]
Now everything should work as required.
Cheers,
Paul
--
Paul Abbott Phone: +61 8 6488 2734
School of Physics, M013 Fax: +61 8 6488 1014
The University of Western Australia (CRICOS Provider No 00126G)
AUSTRALIA http://physics.uwa.edu.au/~paul
http://InternationalMathematicaSymposium.org/IMS2005/