4

Why this does not work?

\documentclass{minimal}
\usepackage{pstricks}
\usepackage{pst-node,pst-tree}
\begin{document}
\pstree{\Tdot}
{
  \Tdot
  \pstree{\Tdot}
  {
    \Tdot
    \Tdot
  }
}
\end{document}
  • 1
    You need to compile with latex+dvips and not pdflatex. – Alan Munn Nov 28 '13 at 14:34
  • You can also compile with xelatex – Johannes_B Nov 28 '13 at 14:38
  • 1
    @Johannes_B Although xelatex can often be used to compile pstricks code, (and this example will work) it's not a certainty. It's easy to construct examples that will compile properly with latex+dvips but not with xelatex. – Alan Munn Nov 28 '13 at 14:56
  • Welcome to the site! If you hover over the pstricks tag you'll see some information about it. If you click on the info button you'll see some information. Your question is one of the most frequently asked questions about pstricks – cmhughes Nov 28 '13 at 15:06
  • @AlanMunn: show me such easy example which doesn't run with xelatex – user2478 Nov 28 '13 at 15:21
3

Use

\documentclass{minimal}
\usepackage[pdf]{pstricks}%%%%%%%%%%%%
\usepackage{pst-node,pst-tree}
\begin{document}
\pstree{\Tdot}
{
  \Tdot
  \pstree{\Tdot}
  {
    \Tdot
    \Tdot
  }
}

\end{document}

and then compile it with pdflatex --shell-escape <file>.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.