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

Often one wants to quickly generate an image from a small piece of TeX. (E.g. for inclusion in a question here.) What's the quickest way of doing it?

share|improve this question
Duplicate: TeX to image over command line – Peter Grill Sep 24 '12 at 16:50
Hmm. The answers that don't mention mathurl, and adding it in an answer seems inappropriate (since it's not a commandline tool). Also, for those of us on Windows, commandline is relatively awkward. – Mohan Sep 24 '12 at 16:55
I'd say that the question Peter links to should be edited to be more general so that mathurl is an answer to it. – Loop Space Sep 25 '12 at 11:32
up vote 4 down vote accepted

http://mathurl.com/ generates PNGs.

share|improve this answer
Credit to tex.stackexchange.com/questions/3396/… for the pointer. (It took a lot of searching to find, and lacked the [graphics] tag, so I created a more specific question.) – Mohan Sep 24 '12 at 16:47

The standalone package produces documents with a page size cropped to the text so the resulting pdf can be directly used as the image file in some circumstances. Search this site for standalone and you'll see it used in many examples.

What I usually do for images for answers posted here (on windows) is I just run the example and preview in acrobat or xpdf or whatever and then use the print screen key and paste it into paint or some other editor and manually crop. That way I can crop to the part that is relevant to the answer rather than the full text of lipsum blah blahh that often gets used in examples.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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