4
$\begingroup$

I like to work with the ReverseStyle stylesheet, in Mathematica, which is the closest to a Dark theme that's available by default. However, the default font color for math output from MaTeX is black, which is ineligible against the Dark theme.

How can I change the font color to white for the MaTeX output?

I tried different versions of this:

SetOptions[MaTeX, "Preamble" -> {"\\usepackage{color}\\color{red}"}]
$\endgroup$

1 Answer 1

6
$\begingroup$

How can I change the font color to white for the MaTeX output?

<< MaTeX`

SetOptions[MaTeX,
 "Preamble"->{"\\usepackage{color}\\usepackage{amsmath}\\everymath{\\color{red}}"}]

MaTeX[Sin[x], Magnification -> 2]

Mathematica graphics

I picked red above. Change that to white if you need.

Note that text used by Matex will also change color in the above. Here is an example

MaTeX["\\text{the result is }"<>ToString@TeXForm@Sin[x]]

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.