[Problem] Typo in the \pst at checkfile macro (in `pst-eps')
Denis Girou
Denis.Girou at idris.fr
Wed Apr 26 20:31:27 CEST 2000
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------
Dariush Ghorbanzadeh <ghorbanzadeh at vcnam.cnam.fr> sent me a question about
the usage of the \PSTtoEPS macro (no matter here, as it concern only the
understanding of how inclusion of header files work in the various situations).
But at this occasion, looking more deeply at the code, I see the various
values accepted by the (undocumented, I think...) "makeeps" parameter of this
macro (the \PSTtoEPS is interesting but limited to "pure" graphic objects, so
no very used comparing to the TeXtoEPS environment). This parameter is
nevertheless useful for \PSTtoEPS. It accept the values "none", "new", "all"
and "all*". Default is "new", which is to say that the file will be created
only if it doesn't exist in the current directory. If it exist, nothing will
happen but no message will be sent (this is a common pitfall, that several
people submit me, when they change the source code and got always the same old
result...). With "all", the file will be created if it doesn't exist but
silently overwritten if it exist. And with "all*", a question will be asked
interactively, which is a useful option:
PSTricks warning:
!! File `test.eps' exists and will be erased if in current directory!
!! Make `test.eps'? (y=yes; n=no)
Nevertheles, I found that in this last case there is a typo in the code...
* 00/04/26 pst-eps.tex (97 patch 2): There is a typo in the \pst at checkfile
macro when using the "all*" value for the makeeps parameter.
(reported by Denis Girou <Denis.Girou at idris.fr>)
My test case is:
\documentclass{article}
\usepackage{pst-eps}
\makeatletter
\def\pst at checkfile#1{%
\ifcase\psk at makeeps
\@pstfalse
\or
\immediate\openin1=#1
\ifeof1\relax\@psttrue\else\@pstfalse\fi
\immediate\closein1
\or
\immediate\openin1=#1
\ifeof1
\@psttrue
\else
\typeout{^^J%
PSTricks warning:^^J%
!! File `#1' exists and will be erased if in current directory!^^J%
!! Make `#1'? (y=yes; n=no)}
\read16 to \pst at tempg
\if y\pst at tempg\relax\@psttrue\else\@pstfalse\fi
\fi
% DG/SR modification begin - Apr. 26, 2000 - Patch 2
% \immediate\closein1=#1
\immediate\closein1
% DG/SR modification end
\or
\@psttrue
\fi}
\makeatother
\pagestyle{empty}
\begin{document}
\PSTtoEPS[makeeps=all*]{test.eps}{\pscircle{1}}
\end{document}
-----------------------------------------------------------------------------
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