Group Abstract Group Abstract

Message Boards Message Boards

Equation numbering by chapters and sections

Posted 8 years ago

Hi, I would like to write a report which includes chapters, sections, and subsections. So, How do I number equations by chapter/section in Mathematica notebooks? For example, this equation is the 4th equation in chapter 2 section 1 : x+y=1 (2.1.4)

Kind regards, Omar

POSTED BY: Omar Alsuhaimi
6 Replies
Posted 3 years ago

Larry, Maybe you can help me with this: https://community.wolfram.com/groups/-/m/t/2694818?p_p_auth=7m5gRF9W Best regards, Irek

POSTED BY: irek7
Posted 8 years ago
POSTED BY: Omar Alsuhaimi
Attachment

Attachments:
POSTED BY: Larry Adelston
Posted 8 years ago
POSTED BY: Omar Alsuhaimi
Posted 8 years ago

Thanks so much Larry.

Kind Regards Omar

POSTED BY: Omar Alsuhaimi

Hi Omar,

Assuming that your using the "Textbook" stylesheet that's found in the menu Format > Stylesheet > Book, and the Cell in question has the Cell style "EquationNumbered", you can add an autonumber for the "Section" to the equation number by modifying the CellFrameLabels for the style "EquationNumbered".

  1. Select the notebook that you want to change
  2. In the menus choose Format > Edit Stylesheet... This will embed a custom stylesheet into your notebook.
  3. Paste the following Cell expression and click "Yes" when prompted "to interpret the text".

    Cell[StyleData["EquationNumbered"],
     CellFrameLabels->{{None, 
        Cell[
         TextData[{"(", 
           CounterBox["BookChapterNumber"], ".", 
           CounterBox["Section"], ".", 
           CounterBox["EquationNumbered"], ")"}]]}, {None, None}}]
    
POSTED BY: Larry Adelston
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard