I am familiar with using LaTeX on online websites (like MathOverflow or Physicsforums). My input is rendered using MathJax. However, I do not understand the LaTeX environment in its native OS form. I have downloaded MacTeX, and all I would like to do is make tiny little .png or .jpg files that each contain one equation.
After some Googling, I have tried something along the lines of:
\documentclass[preview]{standalone}
\begin{document}
\begin{equation}
\frac{1}{2} = 0.5
\end{equation}
\end{document}
followed by
pdflatex equation.tex
convert -density 300 equation.pdf -quality 95 equation.png
(using ImageMagick's convert
program), but the output contains a number next to my equation that I can't seem to get rid of. Also, this seems like a lot of work, and I don't need a whole documentclass
just for one equation. Not to mention pdflatex
produces a bunch of other auxiliary files that clutter up my directory during the conversion process. Is there some way I can just easily go from a file containing
\frac{1}{2} = 0.5
to equation.png
? Better yet, is there a simple way I can take a file containing a list of equations and have each of them converted into their own little .png image?
\[
and\]
– percusse Jan 13 '16 at 18:55\usepackage[paperwidth=3in,paperheight=1.5in]{geometry}
. It might be better done at theconvert
stage, though, with the-trim
option, which strips all pixels from the outside edges which match the corner pixels in color. – Brian Jan 13 '16 at 19:32$ a+b$
, or if needed the diplayed mode:$\sum_{0}^{k}$
. – Johannes_B Jan 13 '16 at 19:40