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.
2 Answers
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"]];

- 394,356
- 18
- 477
- 896
The style of the number is "DisplayFormulaEquationNumber". I'm going to assume you want all the displayed numbers to have the same style.
From the menu, choose Format > Edit Stylesheet...
Enter DisplayFormulaEquationNumber in the Enter a style name box (no quotes).
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:

- 235,386
- 17
- 334
- 747
-
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 00:28
-
-
-
-
"DisplayFormulaEquationNumber"is a more practical approach. – kglr Sep 13 '14 at 20:31