5

Consider the following MWE:

\documentclass[border=5pt,pstricks]{standalone}
\usepackage{pstricks,pst-plot,pst-math}
\listfiles

\begin{document}

\psset{xunit=1.05cm,yunit=1.05cm}
\begin{pspicture*}(-1.38,-2.28)(4.19,4.45)
   \psgrid[subgriddiv=0,gridlabels=0,gridcolor=lightgray](0,0)(-1.38,-2.28)(4.19,4.45)
   \psset{xunit=0.21cm,yunit=0.21cm,algebraic=true,dotstyle=o,dotsize=3pt
     0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
   \psaxes[labelFontSize=\scriptstyle,xAxis=true,yAxis=true,Dx=5,Dy=5,ticksize=-2pt
   0,subticks=2]{->}(0,0)(-6.92,-11.39)(20.96,22.23)[x,140] [y,-40]
   \psplot[plotpoints=200]{-6.91776797358592}{-1.4000001}{(x^3-3*x^2-6*x+8)/(x^2-3.6*x-7)}
   \psplot[plotpoints=200]{-1.399999}{4.99999}{(x^3-3*x^2-6*x+8)/(x^2-3.6*x-7)}
   \psplot[plotpoints=200]{5.00001}{22.5}{(x^3-3*x^2-6*x+8)/(x^2-3.6*x-7)}
   \psline[linestyle=dashed,dash=2pt 2pt](-1.4,-11.39)(-1.4,22.23)
   \psline[linestyle=dashed,dash=2pt 2pt](5,-11.39)(5,22.23)
\end{pspicture*}

\psset{xunit=0.5cm,yunit=0.5cm}
\begin{pspicture*}(-7.87,-8.58)(10.82,6.44)
   \psgrid[subgriddiv=0,gridlabels=0,gridcolor=lightgray](0,0)(-7.87,-8.58)(10.82,6.44)
   \psset{xunit=0.5cm,yunit=0.5cm,algebraic=true,dotstyle=o,dotsize=3pt
     0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
   \psaxes[labelFontSize=\scriptstyle,xAxis=true,yAxis=true,Dx=1,Dy=1,ticksize=-2pt
   0,subticks=2]{->}(0,0)(-7.87,-8.58)(10.82,6.44)[x,140] [y,-40]
   \psplot[plotpoints=200]{-7.75}{-4.73}{TAN(x)}
   \psplot[plotpoints=200]{-4.7}{-1.58}{TAN(x)}
   \psplot[plotpoints=200]{-1.56}{1.56}{TAN(x)}
   \psplot[plotpoints=200]{1.58}{4.70}{TAN(x)}
   \psplot[plotpoints=200]{4.72}{7.84}{TAN(x)}
   \psplot[plotpoints=200]{7.86}{11}{TAN(x)}
   \psline[linestyle=dashed,dash=2pt 2pt](1.57,-8.58)(1.57,6.44)
   \psline[linestyle=dashed,dash=2pt 2pt](4.71,-8.58)(4.71,6.44)
   \psline[linestyle=dashed,dash=2pt 2pt](7.85,-8.58)(7.85,6.44)
   \psline[linestyle=dashed,dash=2pt 2pt](-1.57,-8.58)(-1.57,6.44)
   \psline[linestyle=dashed,dash=2pt 2pt](-4.71,-8.58)(-4.71,6.44)
\end{pspicture*}

\end{document}

When printing this document from Adobe Reader 11.0.12 on a Windows 7 machine, artifacts as in the picture below appear:

enter image description here

However, they do not show up in the viewer. I do not get them when printing from OS X's Preview.app or from Foxit Reader on a Windows 8.1 machine. The issue does not seem linked to the print driver, as it happens with different printers.

The problem originally appeared in a document created by a friend of mine, I just took it over. She uses MikTeX 2.9 (and some not really up-to-date versions of PS Tricks), I tried it with TeX Live 2014 on a Mac and TeX Live 2015 on Windows 8.1. My package versions are

pstricks.sty    2013/12/12 v0.60 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex    2014/10/25 v2.60 `PSTricks' (tvz,hv)
pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
  pst-fp.tex    2014/10/25 v2.60 `PST-fp' (hv)
pst-plot.sty    2011/04/13 package wrapper for pst-plot.tex (hv)
pst-xkey.sty    2005/11/25 v1.6 package wrapper for pst-xkey.tex (HA)
pst-plot.tex    2014/08/23 1.70 `pst-plot' (tvz,hv)
pst-math.sty    2014/07/30 package wrapper for PSTricks pst-math.tex

What makes the issue even stranger is the fact that in the TAN-plot, the problem only appears in the bottom right corner:

enter image description here

Even though this seems to be an Adobe problem, I still ask the question on TeX.SX, hoping that someone knows a workaround. The thing is: my friend has to give the PDF to someone who will print it with Adobe reader, so changing the reader is not a solution.

1
  • I can't reproduce your problem printing with Acrogat Reader DC. – Bernard Aug 27 '15 at 13:11
1

With an up-to-date TeXLive 2015 you'll get

\documentclass[border=5pt,pstricks]{standalone}
\usepackage{pst-plot}
\listfiles

\begin{document}

    \psset{xunit=1.05cm,yunit=1.05cm,plotpoints=200}
    \begin{pspicture*}(-1.38,-2.28)(4.19,4.45)
    \psgrid[subgriddiv=0,gridlabels=0,gridcolor=lightgray](0,0)(-1.38,-2.28)(4.19,4.45)
    \psset{xunit=0.21cm,yunit=0.21cm,algebraic,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
    \psaxes[labelFontSize=\scriptstyle,Dx=5,Dy=5,
      ticksize=-2pt 0,subticks=2]{->}(0,0)(-6.92,-11.39)(20.96,22.23)[x,140] [y,-40]
    \psplot{-6.91776797358592}{-1.4000001}{(x^3-3*x^2-6*x+8)/(x^2-3.6*x-7)}
    \psplot{-1.399999}{4.99999}{(x^3-3*x^2-6*x+8)/(x^2-3.6*x-7)}
    \psplot{5.00001}{22.5}{(x^3-3*x^2-6*x+8)/(x^2-3.6*x-7)}
    \psline[linestyle=dashed,dash=2pt 2pt](-1.4,-11.39)(-1.4,22.23)
    \psline[linestyle=dashed,dash=2pt 2pt](5,-11.39)(5,22.23)
    \end{pspicture*}

    \psset{xunit=0.5cm,yunit=0.5cm}
    \begin{pspicture*}(-7.87,-8.58)(10.82,6.44)
    \psgrid[subgriddiv=0,gridlabels=0,gridcolor=lightgray](0,0)(-7.87,-8.58)(10.82,6.44)
    \psset{algebraic,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
    \psaxes[labelFontSize=\scriptstyle,ticksize=-2pt 0,
      subticks=2]{->}(0,0)(-7.87,-8.58)(10.82,6.44)[x,140][y,-40]
    \multido{\rA=-7.75+3.1415}{6}{\psplot{\rA}{\rA\space 3 add}{TAN(x)}}
    \multido{\rB=-4.71+3.1415}{5}{\psline[linestyle=dashed,dash=2pt 2pt](\rB,-8.58)(\rB,6.44)}
    \end{pspicture*}

\end{document}

enter image description here

4
  • Thank you Herbert. I don't quite get it: The PDFs actually do look like this with my TeX Live 2014 and 2015, and even with my friend's Miktex. However, when printing the images, the straight lines appear -- but only under certain circumstances. If I print her file from my Mac, it is all fine. If she prints it at home from Foxit, its good. If she prints it on the school's computer (Windows 7, Adobe Reader), it's bad. – Philipp Imhof Aug 27 '15 at 15:47
  • please send me your dvi, ps and pdf by private mail – user2478 Aug 27 '15 at 15:51
  • I am glad to do so. Just to make sure....are you who I think you are: the author of "Grafik mit PostScript für TeX und LaTeX"? I am confused, because of your profile (Hanoi, age 19). – Philipp Imhof Aug 27 '15 at 16:04
  • The first one is correct :-) – user2478 Aug 27 '15 at 16:06

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.