# Change font of formula number in DisplayFormulaNumbered

I am trying to change the font of the formula number in a cell which has style DisplayFormulaNumbered. I can easily change the font of the formula I enter by selecting it and using the format menu. But the number to the right of the formula wont change. Any help with this would be greatly appreciated. I am using mathematica 9.

You can get the Style definitions for "DisplayFormulaNumbered" using

CurrentValue[{StyleDefinitions, "DisplayFormulaNumbered"}]

{CellMargins -> {{66, Inherited}, {Inherited, Inherited}},
StripStyleOnPaste -> True,
CellFrameLabels -> {{None,
Cell[TextData[{"(", CounterBox["DisplayFormulaNumbered"], ")"}],
"DisplayFormulaEquationNumber"]}, {None, None}},
DefaultFormatType -> DefaultInputFormatType,
"HyphenationOptionsHyphenationCharacter" -> "\[Continuation]",
LanguageCategory -> "Formula", ScriptLevel -> 0,
SingleLetterItalics -> True,
CounterIncrements -> "DisplayFormulaNumbered",
MenuSortingValue -> 1710, FontFamily -> "Arial", FontSize -> 14,
FontColor -> GrayLevel[0.2],
UnderoverscriptBoxOptionsLimitsPositioning -> True}


and for "DisplayFormulaEquationNumber" using

CurrentValue[{StyleDefinitions, "DisplayFormulaEquationNumber"}]

{FontFamily -> "Arial", FontSize -> -1 + Inherited}


You can use this information to define your custom style for numbered display formulas:

SetOptions[EvaluationNotebook[],
StyleDefinitions ->
Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]],
Cell[StyleData["myNumberedDisplayFormula"],
CellMargins -> {{66, Inherited}, {Inherited, Inherited}},
StripStyleOnPaste -> True,
CellFrameLabels -> {{None,
Cell[TextData[{"(", CounterBox["myNumberedDisplayFormula"],
")"}], FontColor -> Orange, FontFamily -> Inherited,
FontSize -> -1 + Inherited]}, {None, None}},
DefaultFormatType -> DefaultInputFormatType,
"HyphenationOptionsHyphenationCharacter" -> "\[Continuation]",
LanguageCategory -> "Formula", ScriptLevel -> 0,
SingleLetterItalics -> True,
CounterIncrements -> "myNumberedDisplayFormula",
MenuSortingValue -> 1710, FontFamily -> "Arial", FontSize -> 14,
FontColor -> GrayLevel[.2],
UnderoverscriptBoxOptionsLimitsPositioning -> True]},
Saveable -> True,
StyleDefinitions -> "PrivateStylesheetFormatting.nb"]];


• You just beat me! (+1) I think my answer is sufficiently different, although there are similarities. – Michael E2 Sep 13 '14 at 20:16
• @Michael, just saw (and upvoted :)) your answer. I think editing the stylesheet and changing the style definition for "DisplayFormulaEquationNumber" is a more practical approach. – kglr Sep 13 '14 at 20:31
• That worked great, but killed some other styles that I had defined before. I was wondering how I can preserve my current customizations and implement these new ones? – Virgo Sep 14 '14 at 0:41
• @physicsphile, perhaps you can add the new style to the stylesheet containing your customizations; e.g. as in this Q/A – kglr Sep 14 '14 at 4:05

The style of the number is "DisplayFormulaEquationNumber". I'm going to assume you want all the displayed numbers to have the same style.

1. From the menu, choose Format > Edit Stylesheet...

2. Enter DisplayFormulaEquationNumber in the Enter a style name box (no quotes).

3. Select the cell and format as you wish. You can use the font menu commands or the Options inspector to modify the style. You can also use the Cell > Show Expression to manually enter options.

Example stylesheet, which "DisplayFormulaEquationNumber" styled to be large and bold:

The equations in the notebook:

• Thanks, my current workbook didn't have the option to enter the stylename. I went to the stylesheet that it inherited from and I could do it there. But unfortunately I found changing the fonts did not propagate through to my notebook. – Virgo Sep 14 '14 at 0:28
• @physicsphile Did you try reopening your notebook? – Michael E2 Sep 14 '14 at 0:29
• Yes, it din't seem to make any difference. – Virgo Sep 14 '14 at 0:53
• @physicsphile, I put some screenshots to show what I get. – Michael E2 Sep 14 '14 at 2:05
• Thanks, it works when I start a new file but not on my old file. – Virgo Sep 14 '14 at 4:13