Is it possible to make graphs in questions using tikz? Or must I insert it as a picture? I wanted to ask a question about graph theory. Thanks in advance!


Tikz does not (yet!) work.

You can compile the diagram into a pdf file, turn that into a png file (or another format), and embed that in a question.

In linux, I usually do this with

pdftops filename.pdf - | pstopnm | pnmtopng > filename.png
  • 1
    $\begingroup$ Maybe bug the MathJax people to support TikZ? :) $\endgroup$ – J. M. is a poor mathematician Nov 8 '11 at 23:26
  • $\begingroup$ Doesn't convert filename.pdf filename.png work? $\endgroup$ – lhf Nov 9 '11 at 0:16
  • $\begingroup$ @lhf: you do get the PNG, indeed, but there was some reason —which I no longer remember,— which made me prefer the multistep thingie. $\endgroup$ – Mariano Suárez-Álvarez Nov 9 '11 at 0:20
  • $\begingroup$ @Mariano: you mean besides needing Imagemagick installed? But if you have access to pdftops, you can also use pdftoppm -png filename.pdf > filename.png which belongs to the same software packages as pdftops (which would be the pdf library poppler). I can conceive, however, a good reason to chain pdf2ps (which belongs to ghostscript) and pstopnm and pnmtopng (which belong to netpbm) when neither poppler nor imagemagick are installed. $\endgroup$ – Willie Wong Nov 9 '11 at 9:24

You must log in to answer this question.

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