[pstricks] Ghostscript (or PostScript) errors reproducing pst-func examples

EMILIO RAMON GARCIA LADONA emilio at icm.csic.es
Fri Aug 18 00:44:34 CEST 2017


Hi,

I'm preparing a textbook that requires to include many graphics using  
pst-func package. In particular I'm trying to replicate the example  
given in chapter 6 of pst-func.doc about "\psSi,\pssi and \psCi"  
functions. There appears a problem when the "\psSi" and "\pssi"  
functions are included (see code below which is almost exactly to what  
appears in the doc). The code is compiled under the last texlive  
distribution and using the TeXworks GUI using the  
"tex-dvips-ps2pdf.bat" command. The error appears when running ps2pdf  
throwing a console message (see below) and fails to build a correct  
pdf. I will appreciate if somebody can explain me why and how can I  
circumvent it. I need to use many graphics using \psSi imperatively.

Thanks


========== ERROR Message ==================
Error: /undefinedresult in --div--
Operand stack:
    -206.282   #INF.0   35
Execution stack:
    %interp_exit   .runexec2   --nostringval--   --nostringval--    
--nostringval--   2   %stopped_push   --nostringval--    
--nostringval--   --nostringval--   false   1   %stopped_push   2015    
1   3   %oparray_pop   2014   1   3   %oparray_pop   1998   1   3    
%oparray_pop   1884   1   3   %oparray_pop   --nostringval--    
%errorexec_pop   .runexec2   --nostringval--   --nostringval--    
--nostringval--   2   %stopped_push   --nostringval--    
--nostringval--   --nostringval--   %loop_continue   --nostringval--
Dictionary stack:
    --dict:1212/1684(ro)(G)--   --dict:0/20(G)--   --dict:165/200(L)--  
   --dict:185/300(L)--   --dict:38/200(L)--   --dict:125/200(L)--    
--dict:53/100(L)--
Current allocation mode is local
Current file position is 264398
GPL Ghostscript 9.21: Unrecoverable error, exit code 1

========== CODE ==============
\documentclass[12pt,a4paper]{book}
\usepackage{mathtools, amssymb}
\usepackage{pstricks}
\usepackage{pstricks-add}
\usepackage{pst-math}
\usepackage{pst-func}

\begin{document}

\psset{xunit=0.5}
\begin{pspicture}(-15,-4.5)(15,2)
\psaxes[dx=1cm,Dx=2]{->}(0,0)(-15.1,-4)(15,2)
\psplot[plotpoints=1000]{-14.5}{14.5}{x RadtoDeg sin x div}
%\psSi[plotpoints=1500,linecolor=red,linewidth=1pt]{-14.5}{14.5}
%\pssi[plotpoints=1500,linecolor=blue,linewidth=1pt]{-14.5}{14.5}
\rput(-5,1.5){\color{red}$Si(x)=\int\limits_{0}^x\frac{\sin(t)}{t}dt$}
\rput(8,-1.5){\color{blue}$si(x)=-\int\limits_{x}^{\infty}  
\frac{\sin(t)}{t}dt=Si(x)-\frac{\pi}{2}$}
\rput(8,.5){$f(x)= \frac{\sin(t)}{t}$}
\end{pspicture}

\end{document}



More information about the PSTricks mailing list