Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

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/


  • Prev by Date: Re: Keeping the Legendre polynomials in expressions without finding the explicit polinomials
  • Next by Date: Re: goto and label (cont)
  • Previous by thread: Re: Numbering equations
  • Next by thread: Re: Numbering equations