1

While scrolling through the most popular questions i found this one: Nice scientific pictures show off. I tried compiling some of the scientific illustrations provided. Found that those that included pstricks gave me exactly the same error.

For example:

Compiling Electric field due to 3 charges gave me the following error:

enter image description here

After some digging, found some answers here: Undefined control sequence in basic pstricks work.

Went to the Menu > Options > Configure Texmaker > TeX commands tab, wrote in the pdflatex line: pdflatex -synctex=1 -shell-escape -interaction=nonstopmode %.tex. Still i could not compile the file without getting the same error.

Also tried compiling with LaTex+dvips+ps2pdf+Viewpdf This time I got a pdf file of 24 pages, that included 24 instances of the animation.

Any suggestions?

chadoulis
  • 702
  • 1
  • 6
  • 21

1 Answers1

2

You get 24 pages which can then be later converted to an animation with a program like convert. However, this one can be run with pdflatex --shell-escape <file> and you'll get only one page:

\documentclass{article}
\usepackage{pst-electricfield}
\usepackage{auto-pst-pdf}

\begin{document}
\begin{pspicture*}(-4,-4)(4,4)
    \psElectricfield[Q={[-1 3 0 PtoC][1 1 1][1 -1 -1]},linecolor=red]
\end{pspicture*}
\end{document}

enter image description here