I am trying out pstricks as it contains some really nifty packages for electric and magnetic fields.
However, I cannot get it to work quite yet.

My setup is as follows:

  • TexMaker 4.4.1
  • MiKTeX 2.9
  • Windows 7

I have understood that there are some tricks to get pstricks to work (pun unintentional), and I think I am on the right track when I have configured TexMaker to QuickBuild in this manner:


Then, pressing F1 to QuickBuild produces .log, .dvi, .ps and .aux but no PDF.

Pressing "PS-PDF" produces Process exited with error(s), but no actual errors are listed and no log file created.

Pressing "DVI-PDF" in TexMaker produces a wall of errors and a PDF with a few letters:

enter image description here

enter image description here

I used the examplecode from the answer to this question:

\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}

So what have I done wrong?

I have now added -enable-write18 to the pdflatex command in TeXMaker and tried a different QuickBuild sequence:
PdfLaTex + Bib(la)tex + PdfLaTeX (x2) + View PDF

The change is that the pstricks part of the code does not output anything, and no error messages.

All I get is Figure 1: Graph of type - I matrix on the top of an empty A4 page.

Update: Pressing XeLaTeX twice in the quickbuild-menu works.:)

  • I have absolutely no problem with your code. The only things I changed are: replacing the latin1 option of inputenc with utf8 (my editor, like all modern editors sets this as the default) and removing \usepackage{pst-pdf} since auto-pst-pdf is loaded. Also, I only made a simple compilation (just pdflatex). Btw, it is better to play with \psset{unit=…} than using \psscalebox as the latter also scales text, arrowsize, &c. – Bernard Jul 12 '15 at 9:10
  • Thank you for your input. I replaced 'latin1' with 'utf8' and removed 'pst-pdf'. Still the pstricks part does not render. – fluxmodel Jul 12 '15 at 9:29
  • Hm, now I think I got it to work. Using xelatex :) – fluxmodel Jul 12 '15 at 9:33
  • I didn't think it was related. I only wanted to warn you of (minor) modifications. Could you simply use latex, then dvips, and see what you get with gsview (if you have ghostscript+gsview installed). I also tried the way latex->dvi->dvipdf and it doesn't work. – Bernard Jul 12 '15 at 9:37
  • Fine! It would be good to know what happened the latex->dvips->pstopdf way, though. Perhaps a problem of updating? – Bernard Jul 12 '15 at 9:40

Your Answer

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

Browse other questions tagged or ask your own question.