[pstricks] The psbezier anomaly within pscustom

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri Aug 27 17:11:03 CEST 2010


Am 27.08.2010 16:31, schrieb Dwight Aplevich:

>> Inside \pscustom the current point is always taken into account
>> and you have to define with the liftpen setting what to do
>> when the next line starts at another point.
> 
> The consequence is that coordinate arguments have to be changed
> depending on
> 1.  whether there is a current point;

a current point is only taken into account inside \pscustom

> 2.  whether the command is within \pscustom;

yes

> 3.  whether the command is \psbezier (or \pscurve);

no, there is no difference in the behaviour, the first pair
of coordinates is the current point, the reason why
\pscurve works with only two given points:

\documentclass{article}
\usepackage{pstricks}

\pagestyle{empty}
\begin{document}

\begin{pspicture}(4,4)
\pscustom[fillstyle=solid,fillcolor=red!40]{
  \psline(3,3)      % current point was 0,0
  \pscurve(4,2)(3,1)% current point was 3,3
  \psline(3,0)}     % corrent point was 3,1
\end{pspicture}

\end{document}

> 4.  the version of PSTricks.

right

> This means that
> 1.  legacy diagrams are broken, going back to the mid-1990s;
> 2.  the workflow for generating PSTricks code has to be changed.

no, if you want the old behaviour use \usepackage[97]{pstricks}
However, the old behaviour was a bug! Because the current point was
taken into account for \pscurve, but _not_ for \psbezier.

> You may know that I distribute the dpic interpreter that converts pic code
> to PSTricks, among other formats.  The most recent changes were brought
> to my attention by a user of that package.  For my part, I am working with
> other authors on a new edition of a book in print, and I (and others)
> will have
> to take the time to find a way to produce robust diagram code for several
> current diagrams.

create a file pstricks.pic which you read with \input{pstricks.pic}
which redefines \psbezier with the old code. On the other hand it
should be possible to create an optional argument "noCurrentPoint"
for pscustom, if it may be useful for your needs.

Herbert


More information about the PSTricks mailing list