# Why does Mathematica ignore my stylesheet for DisplayFormulaNumbered cells?

I made a custom stylesheet, installed it, and applied it to a new blank notebook. Adding a cell and changing it to Text results in the expected behavior. The font and font size change to whatever the stylesheet says.

But this does not happen for DisplayFormulaNumbered cells. The Front End ignores some (but not all!) of my stylesheet settings when formatting a cell as DisplayFormulaNumbered.

The stylesheet contains:

Cell[StyleData["DisplayFormulaNumbered"],
FontFamily->"CMU Serif",
FontSize->12,
FontWeight->"Plain",
FontSlant->"Plain",
PrivateFontOptions->{
"FontPostScriptName"->
"Automatic"},ExpressionUUID->"272b9ba5-a88d-4627-839e-26d5afa11266"]


But making a DisplayFormulaNumbered cell results in a 14-point, medium weight Source Code Pro font.

I can get it to pay attention to the font settings if I add DefaultFormatType->DefaultTextFormat but then it really does treat it as text, rather than as an equation in TraditionalForm, so integrals and sums are vertically compressed, etc.

By inspecting the options for numbered equations set to TraditionalForm via Cell->Convert To->TraditionalForm Display, I tried adding

SingleLetterItalics->True,
DelimiterMatching->None,


to the stylesheet. This succeeds in producing a 12-point plain-weighted font, just not CMU Serif. It's still Source Code Pro. Why any of these would affect the font, I cannot see.

This is very confusing. I thought the styles were applied in a cascade from Core.nb to Default.nb to my ScottStyle.nb, and finally any changes I make to cells directly in the Front End. But I can't see how I could get this behavior of paying attention to some but not all of my stylesheet commands without there being some other styling applied after my stylesheet but before anything I might do in the front end. Maybe TraditionalFunctionNotation overrules the font family but not the size and weight?

Moreover, Shift-Ctrl-E shows that the cell is indeed a DisplayFormulaNumbered cell and CurrentValue[{StyleDefinitions, "DisplayFormulaNumbered"}] shows FontFamily->CMU Serif but the actual font displayed is clearly SourceCode Pro.

What magic incantation should I chant to get a stylesheet to produce the same result as using the mouse to do Format->Style->DisplayFormulaNumbered, Cell->Convert To->TraditionalForm Display, ctrl-T, choose font and size?

StyleData["DisplayFormulaNumbered"] is not environment specific so e.g. StyleData["DisplayFormulaNumbered", "Working"] will take precedence over your settings.