TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to render formulae in PNG format for use in various websites. The problem is, every rendering tool I've come across seems to assume a particular background color to perform anti-aliasing, resulting in nasty color fringes when the image is displayed on a different background color. Is there a way to perform the anti-aliasing in the alpha-channel so that the equation will look nice and crisp no matter what color the background it'll be displayed on is?

Or is it not possible?

share|improve this question

closed as off topic by yo', lockstep, Andrew Swann, Thorsten, Guido Nov 19 '12 at 11:10

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Welcome to TeX.SE. – Peter Grill Nov 19 '12 at 7:12
One solution is to render in high resolution, and then change white to transparent and then reduce the size, properly mixing black and transparent. I'm sure ImageMagick's convert is capable of it. – yo' Nov 19 '12 at 7:22
@PeterGrill thank you :) – Thomas Nov 19 '12 at 7:30
There are a number of online equation compilers listed at tex.stackexchange.com/a/1654/4012, in case one of these helps. – doncherry Nov 19 '12 at 7:31
@tohecz Thanks, that sounds like a good suggestion. Right now I've been doing it by rendering to SVG, then to a large transparent PNG, but it's rather long-winded - I will try your method. – Thomas Nov 19 '12 at 7:31
up vote 1 down vote accepted

There's a possibility to use ImageMagick's convert: you first generate a hi-res image, then you change white to transparent, and finally you scale the image down.

share|improve this answer

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