# Graphs in questions - tikz [duplicate]

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

• Maybe bug the MathJax people to support TikZ? :) – J. M. ain't a mathematician Nov 8 '11 at 23:26
• Doesn't convert filename.pdf filename.png work? – lhf Nov 9 '11 at 0:16
• @lhf: you do get the PNG, indeed, but there was some reason —which I no longer remember,— which made me prefer the multistep thingie. – Mariano Suárez-Álvarez Nov 9 '11 at 0:20
• @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. – Willie Wong Nov 9 '11 at 9:24