# How do I reset Mathematica's DisplayFormulaNumbered cell style numbering?

Since I am writing many equations, in various chapters, I need a way to reset numbering in this cell style. The following shows what I need:

x + y = 15 (1)

x - z = 12 (2)

Next chapter

3x + w = 1 (1)

This does not happen, instead of the last "(1)", a "(3)" appears.

• A resembling type of formatting of the numeration I have used in the StyleSheet Textbook. There the numeration is given as (1.2) where 1 is the chapter number and 2 is that of the formula in this chapter. – Alexei Boulbitch Mar 28 '18 at 14:35

Here's how I made the DisplayFormulaNumbered counter restart in each Section:

Step 1: copy the Default.nb stylesheet to a local stylesheet, ResetNumbering.nb

Step 2: using a text editor, edit ResetNumbering.nb, find the section beginning Cell[StyleData["Section"] ...], then move down to the command CounterAssignments->{{...}}. Insert {"DisplayFormulaNumbered", 0} into the list, following the syntax. Save.

Step 3: in the notebook where this is to be used, use menu Format -> StyleSheet -> Other to select ResetNumbering.nb as the stylesheet.

Vary this to taste.

This does not seem to work well retroactively, i.e. best do this before beginning the notebook.

• I tried it and it worked! Thank you. – Diego Robino May 6 '18 at 0:25