# CellPrint to EquationNumbered using MaTeX

I'm writing an online book in a Mathematica template and would like to display equations using Szabolcs' wonderful MaTeX (LaTeX typesetting in Mathematica) because the readability is superior to the default from Mathematica. Thus I use:

<<MaTeX
SetOptions[MaTeX, "Magnification" -> 1.5];


This gives me the typography I seek:

MaTeX[HoldForm[Integrate[x^2, x] = x^3/3]]


I can then collapse the paired cells so that only the typeset equation is visible.

Fine.

However, I want such an equation to be in the EquationNumbered style, complete with automatic numbering. Right now I have to hand select each such typeset cell and use the pull-down menu to change its style to EquationNumbered.

I thought the right approach would be:

CellPrint[EquationNumbered[
MaTeX[HoldForm[Integrate[x^2, x] = x^3/3]]]]


but that does not work.

Question: How do I programmatically create an EquationNumbered that nevertheless has the style of MaTeX?

• It is also possible to edit the stylesheets to get the box ratios/fonts/layout nicer. I did that a few years back and it’s really paid off. I do all of my writing in Mathematica first now and then transfer to LaTeX for the second draft since it is much nicer/easier/less buggy to explore and edit iteratively in Mathematica for me May 28, 2021 at 20:58
• @b3m2a1: If you have stylesheets available, or can point to one online, I'd love to see it. I really need a style that mimics the Mathematica blue "reference" definitions of functions. (I don't know Mathematica didn't include that in the as a Style.) May 28, 2021 at 23:14

CellPrint[
`