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
\Tcircle{11} \Tcircle{21}

Why the error:

! Undefined control sequence. \c@lor@to@ps l.5 \pstree[levelsep=35pt]{\Tcircle{10}} ?

I compile with latexmk if that makes any difference:

enter image description here

share|improve this question
@ptrcao: I don't get any error. Please, add \listfiles in front of the code and show the output of this command that you easily find in the .log file. – egreg May 25 '11 at 10:16
@ptrcao --- Jasper Loy is correct, the problem is caused by using pdflatex, which does not work with pstricks. Try using latexmk -pdfdvi in place of latexmk. – Ian Thompson May 25 '11 at 14:48
@Jasper --- the manual says it uses dvipdf by default, and I think that uses ghostscript and dvips. It works fine on my system, but maybe -pdfps is a safer option. – Ian Thompson May 25 '11 at 15:02
@egreg Just clarifying your instructions; where does "\listfiles" go in the code exactly? Before \documentclass{article} or after \documentclass{article} but before \begin{document}, or after \begin{document} but before all the rest of the code? – ptrcao May 25 '11 at 15:51

You have several possibilities to run PostScript related code with pdflatex:

  • run xelatex instead of latexmk, which is the easiest way.

  • use package auto-pst-pdf and add the optional argument -shell-escape to the pdflatex call

  • instead of pdflatex run latex

see also: http://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput

share|improve this answer
@Herbert : I need latexmk for my bibliography, so it will run processors the correct number of times. I also want my output as a pdf file. Where does this leave me? – ptrcao May 25 '11 at 16:58
@ptrcao then use package auto-pst-pdf and add the option -shell-escape to the pdflatex call. – Herbert May 25 '11 at 17:13
I'm still relatively new to Latex, would you be so kind as to explicitly spell out the steps involved in adding the -shell-escape option? I use TexWorks. – ptrcao May 25 '11 at 17:38
I got this error: "! Undefined control sequence. <recently read> \c@lor@to@ps l.8 \pstree[levelsep=35pt]{\Tcircle{10}} ?" What now? – ptrcao May 25 '11 at 17:54

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.