Changing $latex $ equation background color globally

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):

  1. find-and-replace $ by &bg=ffffff$ (replace ffffff by your favourite colour)
  2. then find-and-replace &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.