3

Why PStricks compiles only with XeLaTeX engine and not PDFLaTeX.

When I compile with PDFLaTeX I get the error that PDFLaTeX is not able to find package pstricks.

2
  • 2
    This is because it is based on postscript. There is the auto-pst-pdf package that you can use for compilers other than xelatex. (I have been using pstricks for almost 2 decades but switched to TikZ with one motivation being that it does not require any of this.)
    – user121799
    Apr 23, 2019 at 18:05
  • Even XeTeX sometimes fails. The canonical way of processing documents with PSTricks is latex+dvips+ps2pdf.
    – AlexG
    Apr 23, 2019 at 18:20

1 Answer 1

5

Run the following document with

pdflatex --shell-escape <filename>

and you'll get a pdf output.

\documentclass{article}
\usepackage{pst-eucl}
\usepackage[pspdf=-dNOSAFER]{auto-pst-pdf}

\begin{document}

\psset{unit=0.75}
\begin{pspicture}[showgrid](-5,-5)(13,10)
    \pstTriangle[fillstyle=solid,fillcolor=red!60,opacity=0.3](0,0){A}(6,0){B}(2,4){C}
    \pstCircleABC[PosAngle=60]{A}{B}{C}{O}
    \pstBissectBAC[linestyle=none]{B}{A}{C}{A'}
    \pcline[linestyle=dotted,nodesepB=-5cm](A)(A')
    \pcline[linestyle=dashed,nodesepB=-5cm](A)(B)
    \pcline[linestyle=dashed,nodesepB=-5cm](A)(C)
    \pstOutBissectBAC[PointSymbol=none,PointName=none,linestyle=none]{C}{B}{A}{CBA}
    \pstOutBissectBAC[PointSymbol=none,PointName=none,linestyle=none]{A}{C}{B}{ACB}
    \pstInterLL{B}{CBA}{C}{ACB}{M1}
    \pstProjection[PointName=I_1]{A}{B}{M1}[Mab]
    \pstCircleOA[linecolor=red!60]{M1}{Mab}
    \pstCircleOA[linecolor=red!60,linestyle=dashed,Radius=\pstDistAB{M1}{Mab}]{A}{}
    \pstInterCC[Radius=\pstDistAB{M1}{Mab}]{A}{}{M1}{}{P1}{P2}
    \psdots(P1)(P2)
    \pstBissectBAC[linestyle=none]{A}{B}{C}{B'}
    \pstInterLL[PointName=none]{A}{A'}{B}{B'}{Mi}
    \psRelNode[angle=90](Mi)(A'){1}{ABi}\psdot(ABi)
    \pcline[linestyle=dotted,nodesepB=-3cm](ABi)(Mi)
    \pstInterLL[PointName=none]{A}{B}{Mi}{ABi}{E}\psdot(E)
    \pstProjection[PointName=none]{A}{B}{Mi}[D]\psdot(D)
    \psRelNode[angle=90](E)(B){2}{E'}\psdot(E')
    \pstInterLL[PointName=none]{A}{A'}{E}{E'}{X}\psdot(X)
    \pstCircleOA[linecolor=blue,linewidth=1.5pt,
    fillstyle=solid,fillcolor=blue!50,opacity=0.3]{X}{E}
    \pcline[linestyle=dotted](Mi)(D)
    \pcline[linestyle=dotted](X)(E)
\end{pspicture}

\end{document}

enter image description here

3
  • Herbert is coming. Apr 29, 2019 at 9:43
  • @ArtificialHairlessArmpit ... back? How do you know?
    – AlexG
    Apr 29, 2019 at 10:19
  • 1
    @AlexG: Because I can read his coding style. Apr 29, 2019 at 10:37

You must log in to answer this question.

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