Let me begin with a confession: when someone says ``command line'' I nearly pee because I get so scared. I know that means I'm asking my question to the wrong community, and yes, I'm seeing someone about my problems. I don't want to talk about it anymore.

This thread asks almost exactly the same question I am interested in. I have two small additions to that post: is it possible to do the exact same thing for a xypic image (I would assume this is the case), and how do I do the part that's all ``code-ish''?

For those who don't want to go read the other thread, here's the simple version: I have three xypic drawings that I want to make .png or .jpg (or whatever) files from. How do I do that?

In case it matters: I use a mac with OSX10.8.4 installed, and when I try really really hard I've managed to find and open a terminal window in the past. I then usually get scared and run away.


1 Answer 1


You could simply use the standalone documentclass with the png option, which will automatically convert the picture into a PNG after the compilation.

Simply compiling the following...

A \ar[r] \ar[d] & B \ar[d] \\
C \ar[r] & D

... will result in this PNG (in addition to the usual PDF document):

  • 1
    png conversion requires: -shell-escape or --enable-write18(MiKTeX) enabled eg: pdflatex -shell-escape filename.tex and imagemagick installed Commented Jun 28, 2013 at 19:48
  • May be possible Feature request: It would be nice if all xy-pic package components could be loaded via standalone Options like TikZ and PSTricks \documentclass[png,xy-all]{standalone} Commented Jun 28, 2013 at 19:56
  • @texenthusiast: I'm writing in TeXworks (answering your other question) and where/how do I do the ``-shell-escape'' thing to which you refer? This is exactly what is making the compiler sad when I run it. Commented Jul 8, 2013 at 13:57
  • 2
    I spoke too soon... this thread answers the question I just asked. In combination, the two answers solve the problem I asked about. Woohoo! Commented Jul 8, 2013 at 14:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .