A bug in PSTricks

Denis Girou Denis.Girou at idris.fr
Fri Aug 8 15:49:54 CEST 1997


-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

>>>>> "Raymond.Toy" == Raymond Toy <toy at rtp.ericsson.se> writes:

    Raymond.Toy> Gentlemen,

    Raymond.Toy> Just downloaded the July 30, 1997 version of PStricks, and I came
    Raymond.Toy> across the following bug.  This doesn't happen with my old (93?)
    Raymond.Toy> version of PStricks.

    Raymond.Toy> The following sample file shows the bug.  The two labels "CTS BS" and
    Raymond.Toy> "Macro BS" are supposed to be in a column, right justified.  When the
    Raymond.Toy> lines with PST at Diamond are uncommented, the labels are no longer in a
    Raymond.Toy> column.  Also, the first and last diamonds are supposed to correspond to the
    Raymond.Toy> start of the ends of line segment.  They don't.  The last diamond
    Raymond.Toy> should be centered on the line segment after the label "CTS BS".

    Raymond.Toy> This all worked correctly with the previous version.

    Raymond.Toy> Can you help me fix this?

    Raymond.Toy> Ray

    Raymond.Toy> \documentclass{article}
    Raymond.Toy> \usepackage{pstricks}
    Raymond.Toy> \psset{unit=5in,xunit=6in,yunit=4.5in}

    Raymond.Toy> \begin{document}
    Raymond.Toy> \begin{figure}[tbhp]
    Raymond.Toy>   \begin{center}
    Raymond.Toy>     \pspicture(0,0)(1,1)
    Raymond.Toy>     \ifx\nofigs\undefined
    Raymond.Toy>     \catcode`@=11
    Raymond.Toy> \newpsobject{PST at Border}{psline}{linewidth=.0015,linestyle=solid}
    Raymond.Toy> \newpsobject{PST at Axes}{psline}{linewidth=.0015,linestyle=dotted,dotsep=.004}
    Raymond.Toy> \newpsobject{PST at Solid}{psline}{linewidth=.0015,linestyle=solid}
    Raymond.Toy> \newpsobject{PST at Dashed}{psline}{linewidth=.0015,linestyle=dashed,dash=.01 .01}
    Raymond.Toy> \newpsobject{PST at Dotted}{psline}{linewidth=.0025,linestyle=dotted,dotsep=.008}
    Raymond.Toy> \newpsobject{PST at LongDash}{psline}{linewidth=.0015,linestyle=dashed,dash=.02 .01}
    Raymond.Toy> \newpsobject{PST at Diamond}{psdots}{linewidth=.001,linestyle=solid,dotstyle=square,dotangle=45}
    Raymond.Toy> \rput[r](0.8730,0.8540){CTS BS}
    Raymond.Toy> \PST at Solid(0.8890,0.8540)
    Raymond.Toy> (0.9680,0.8540)

    Raymond.Toy> \PST at Solid(0.2089,0.8635)
    Raymond.Toy> (0.2089,0.8635)
    Raymond.Toy> (0.5399,0.8635)
    Raymond.Toy> (0.6817,0.8635)

    Raymond.Toy> % Uncomment these to see the bug
    Raymond.Toy> %\PST at Diamond(0.2089,0.8635)
    Raymond.Toy> %\PST at Diamond(0.5399,0.8635)
    Raymond.Toy> %\PST at Diamond(0.6817,0.8635)
    Raymond.Toy> %\PST at Diamond(0.9285,0.8540)
    Raymond.Toy> \rput[r](0.8730,0.8120){CTS MS}
    Raymond.Toy> \PST at Dashed(0.8890,0.8120)
    Raymond.Toy> (0.9680,0.8120)

    Raymond.Toy> \rput[r](0.8730,0.7700){Macro BS}
    Raymond.Toy> \PST at Dotted(0.8890,0.7700)
    Raymond.Toy> (0.9680,0.7700)
    Raymond.Toy> \fi
    Raymond.Toy> \endpspicture
    Raymond.Toy>     \caption{a figure}
    Raymond.Toy>     \label{fig:figure}
    Raymond.Toy>   \end{center}
    Raymond.Toy> \end{figure}
    Raymond.Toy> \end{document}

  Thank you for your bug report. This one is easy to fix.

  This is one of the famous spurious blanks, in pstricks.tex (97 one).
Just change:

% DG/SR modification begin - Aug. 7, 1997
%\edef\psk at dotangle{\psk@@dotangle rotate }
\edef\psk at dotangle{\psk@@dotangle rotate }%
% DG/SR modification end

  What you must know is that PSTricks 97 was built based on a preliminary
version of the never released 0.94 one, kindly provided by Timothy in 1994.
We try to compare it with the "0.93a PSTricks + pst-beta.tex + pstricks.bug
+ pst-beta.bug + other bugs reported" to do the best version that we
(Sebastian and me) could do. For instance, the code of \psset at dotangle was
changed in pst-beta.tex and changed again in pre-0.94 version (with the
spurious blank never detected before).

  Nevertheless, all code for dots seems to verify. Greg Byrd
<gbyrd at Umunhum.Stanford.edu> report last week on this list another bug with
dotangle parameter usage, in the \psplot macro. Code for dots is used in
various places (showpoint, \psplot, \psdot, \psdots, \dataplot and other
\...plot macros) with several bundles. The change noticed by Greg on the code
of the 0.93a patched 2 version was motivated by a bug reported in June 1996
on dotstyle usage for \fileplot. His correction (to come back to the previous
code) correct the problem, but not other one which can be found. And I also
see in my tests that my previous solution of the problem reported by Ivan
Maio <maio at pol88a.polito.it> on \psdot cause another problem by side effect.
I have found some corrections which in my tests seems to work in all (?!)
situations, but I'm not very pleased with that because it require some small
changes in several macros. As I'll be in holidays in few hours with no more
time to work on these problems, I prefer to wait until September to see if
I can found a solution nearest to the original code.

  Good month for those who will work...

D.G.

-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------



More information about the PSTricks mailing list