Background
Unfortunately, when hosting your blog with WordPress.com you can’t use the MathJax-LaTeX pluging, and have to use the default wordpress LaTeX.
The way it works, is by rendering the LaTeX math into an image, and sticks that image into your blogpost. Since it is an image, it has a background color. The feature was designed so that it tries to figure out the proper background color for your theme to fit the LaTeX in naturally. Unfortunately for me, my background color is white, but the LaTeX is rendered with background gray.
There is a way to change the color of a single equation. For instance:
$latex E = mc^2$
would produce the default background color, while
$latex E = mc^2&bg=ffffff$
would force the background to be white.
This is what I want to achieve, but for every equation in my post. I don’t want to have to type &bg=ffffff
at the end of each LaTeX environment manually (it is already a big enough hassle to write $latex
instead of just $
!).
Question
Is there a way to change the background color of all the math equations at once?
Alternatively, if no such method exists.
From where does the
$latex $
feature guess the background color, and how can I change what it guesses?
Keep in mind that I am on WordPress.com so I can’t simple switch to the MathJax-LaTeX plugin.
I thought I would provide a work-around that I have used. Using any editor that allows find-and-replace you can just do the following (assuming $ appears only as latex start/end parameter and not as a symbol by itself):
$
by&bg=ffffff$
(replace ffffff by your favourite colour)&bg=ffffff$latex
by$latex
It is a pretty bad workaround, since you will have to change the background color in a similar way on all posts if you ever change theme. However, it is much faster than going to each latex environment and changing it by hand.
A simple response: You need to do it manually each time. Remember the background color of LaTeX in wordpress.com is theme dependent. It doesn’t always look white (#fff). Some themes (e.g. Comet) show a darker background.