All things I have:

  1. Install GhostScript 32 bit (My system is Window 7-32bit) .
  2. Write a batch file by Text Document and followed by .bat .

Its content ( of AS's answer ):

echo off

rem %1 TeX input filename without extension

if exist "%~1.pdf" del "%~1.pdf"

if exist "%~1.tex" latex -shell-escape "%~1.tex"

if exist "%~1.dvi" dvips -t unknown "%~1.dvi"

if exist "%~1.ps" gswin32c -dCompatibilityLevel=1.5 -dAutoRotatePages=/None -sDEVICE=pdfwrite -o "%~1.pdf" "%~1.ps"

for %%x in (aux dvi log out ps toc nav snm) do (if exist "%~1.%%x" del "%~1.%%x")
  1. Register the batch file to the PATH environment variable ( Address: Control Panel\All Control Panel Items\System , click Advanced system settings, click Environment Variables, look at System variables, choose Path, click edit, add " ;C:\texlive\PSTricksbatch;C:\Program Files\gs\gs9.26\bin ".

See my images

enter image description here enter image description here

  1. Replace any unused (for example, DVI Viewer) TeXStudio command with " pstricksbuilder2.bat % "...

Its image:

enter image description here enter image description here

  1. Change Build

Build & View: txs:///dvi-chain | txs:///view

Default Compiler: txs:///latex

Default Viewer: txs:///view-pdf

PDF Viewer: txs:///view-pdf-internal --embedded

Image as the following:

enter image description here


Examples include questions:

Please see the following examples:


\psline(0,1.3)(.4,2.3)  \uput[20](.3,2.4){$?$}

It produces a good picture :

enter image description here


{\psset{nodesepB=-1} \ncLine{M}{D} \ncLine{o-}{M}{E}}
\psline(D)(O)(E) \ncLine{o-o}{D}{E} \ncLine{o-}{O}{M}

Its image is BAD :

enter image description here



\pstCircleOA[linecolor=red!60,linestyle=dashed,Radius=\pstDistAB{M1}{Mab}] {A}{}


Its result is BAD :

enter image description here

  1. Animation doesn't work (the result of compiling is normally)!!

I don't know how to fix it. Help me to fix it!


    % Two lines above get compiling normally  <<<----
    % These line gets wrong compile.   <<<----
 %  Truly is so that ...

 %-------------------- write timeline file ---------------------%
   %remaining frames: overlay filled circle at its current postion
       ::\i % put filled circle on top
 %------------------- assemble animation -----------------------%
   %---- static material: axes, labels, curve ----%
  \psdot[dotsize=3mm](!\n\space dup DegtoRad exch sin)
  \psline[linestyle=dashed](!\n\space dup DegtoRad exch sin)(!\n\space 
  DegtoRad 0)
  • 1
    standalone uses the coordinates of the pspicture environment for clipping. If the values are missing then (10,10) will be assumed. Use proper values and everything will be fine! – user2478 Dec 14 '18 at 9:59
  • @Herbert I am a jolterhead..... It stills get a error.... – user173875 Dec 14 '18 at 10:05
  • please make a difference between "LaTeX error" or "wrong output". What do you get? – user2478 Dec 14 '18 at 10:06
  • @Herbert Sorry. Yes, it gets wrong output... – user173875 Dec 14 '18 at 10:07
  • 1
    for an animation you should't tell standalone that you are using pstricks, because standalone would crop the buttons away from the output. For the animation the single pages are larger than the coordinates of pspicture. – user2478 Dec 14 '18 at 12:16



I'll get

enter image description here

  • any problem in modification also the other coordinates for pspicture??? – user2478 Dec 14 '18 at 10:33
  • 2
    \begin{pspicture} without coordinates is nonsense for standalone. I already wrote that! – user2478 Dec 14 '18 at 10:46
  • Oh, I see. I have just gotten normally. I understood ... – user173875 Dec 14 '18 at 10:49
  • Why \begin{pspicture} without coordinates is nonsense for standalone ?... – user173875 Dec 14 '18 at 10:52
  • Because it is always 10cm x 10cm and this is only by random. a correct area – user2478 Dec 14 '18 at 10:54

Your Answer

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