3
$\begingroup$

This question already has an answer here:

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!

$\endgroup$

marked as duplicate by GNUSupporter 8964民主女神 地下教會, JonMark Perry, YuiTo Cheng, TheSimpliFire, Aqua May 28 at 12:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

7
$\begingroup$

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
$\endgroup$
  • 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

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