when I try to display a math equation with LaTeX, there is always whitespace to the right and left of the math equation. I am trying it with code like this:
\documentclass{standalone}
\begin{document}
%Math equation here
\end{document}
This method works for regular text, it just doesn't seem to work for math. Is there a solution?

$...$?\[...\]?\begin{align}...\end{align}? – Ryan Reich Oct 09 '11 at 20:18\[ y \]– Oct 09 '11 at 20:39\documentclass{standalone\begin{document}\[ \int_1^a{\frac{dx}{x}} = \ln a \]\[ \int{x^n} = \frac{x^{n+1}}{n+1}\]\end{document}– chbaker0 Oct 09 '11 at 20:42pdfcrop, as suggested in my comment where this original problem arose. However, this may be related to some options ofpreview. – Werner Oct 09 '11 at 20:43convert <filename>.PDF <filename>.PNGshould do the trick. It uses ImageMagick. – Werner Oct 09 '11 at 20:52texrendr.comfor rendering LaTeX math as a picture. It also has a feature to upload your code to an image hoster. – FUZxxl Oct 09 '11 at 22:33