I am trying to get PSTricks to work with PDFLaTeX in order to create scientific diagrams in the report I am producing.

My document is currently as follows (I've included potentially extraneous packages because I'm not sure what could have an impact on PSTricks):






\title{Rotational Dynamics}
\author{Thomas Russell}
\date{March 2014}

   %% Triangle in red:
   %% Bezier curve in green:
   %% Circle in blue with radius 1:


And this compiles fine, but rather than embedding the image in the target PDF file, it creates a PostScript file: rotational-dynamics-autopp.ps and then embeds it in rotational-dynamics-autopp.pdf.

I am compiling the LaTeX file with the following build option in Texmaker:

pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex
  • Compile your code with XeLaTeX not with pdflatex.
    – user31034
    Commented Mar 4, 2014 at 11:58

2 Answers 2


That file runs fine in my up-to-date TeXLive 2013. However, try


and, by the way, use

\usepackage[T1]{fontenc}%%%%%    use T1 encoded fonts
  • Thank you, adding the crop=off option seems to have fixed it! Commented Mar 4, 2014 at 11:43
  • Not to be pedantic but the name of the LaTeX distribution is "TeX Live", not "TeXLive". (See tug.org/texlive/.) Commented Mar 4, 2014 at 12:05

Use the following packages in the preamble:

  1. \usepackage{pstricks-add}
  2. \usepackage{auto-pst-pdf}
  3. \usepackage{pst-pdf}

Before you run the file using Quick Build (usually F1 button), go to the Texmaker Options-> Configure Texmaker-> Quick Build and change the quick build command to "Latex+dvips+ps2pdf+viewpdf".


Now you are done. Oh but there may be one more problem cropping up. Something like "Enable Write 18" or "shell escape disabled". You can sort out that problem by the beautiful answer given in this link: How can I enable write 18 on a MikTeX installation.

I am providing a sample tex file for drawing a simple graph:

\psscalebox{0.5 0.5} % Change this value to rescale the drawing.
\psline[linecolor=black, linewidth=0.04, dotsize=0.07055cm 6.0]{-*}(3.2,1.805)(1.2,-0.595)
\psline[linecolor=black, linewidth=0.04, dotsize=0.07055cm 6.0]{-*}(3.2,1.805)(2.4,-1.395)
\psline[linecolor=black, linewidth=0.04, dotsize=0.07055cm 6.0]{-*}(3.2,1.805)(4.0,-1.395)
\psline[linecolor=black, linewidth=0.04, dotsize=0.07055cm 6.0]{*-*}(3.2,1.805)(5.6,-0.195)
\rput{66.6232}(2.6010673,-3.5480006){\psarc[linecolor=black, linewidth=0.04, linestyle=dashed, dash=0.17638889cm 0.10583334cm, dimen=outer](4.0,0.205){1.6}{208.56584}{270.0}}
\rput[bl](0.0,-1.395){\Large{ 1($\beta$)}}
\rput[bl](2.0,-2.195){\Large{ 2($\beta$)}}
\rput[bl](4.0,-2.195){\Large{ 3($\beta$)}}
\rput[bl](6.0,-0.595){\Large{ $n-1(\beta)$}}
\caption{Graph of type - I matrix}\label{t1}

The output in the pdf is :

Figure generated by PStricks code

Now, how to write these PStricks codes ?? Do we have to remember all the commands ?? No !! not at all !! Its very easy to generate these codes automatically by drawing the figures using Latex Draw. You can get this amazing free software at this link: http://latexdraw.sourceforge.net/

Thats all you need to know about using PStricks codes !!!

You must log in to answer this question.

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