[pst-char] Problem when \pscharpath is included inside another macro

Denis Girou Denis.Girou at idris.fr
Fri Jul 3 19:04:37 CEST 1998


-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

  Martin Giese <giese at ira.uka.de> recently report a problem in `pst-char' when
the \pscharpath macro is used inside another one (in fact I found this problem
because he send to me an example he used with PST 0.93 which didn't work for
me...).

  Correction was easy when I have understood the problem.

  Thanks for the report!

  * 98/07/03 pst-grad.tex (97 patch 1): In the \pscharpath macro, the
PostScript code is not reset after it inclusion, which cause problem when
this macro is used inside another one.
(reported by Martin Giese <giese at ira.uka.de>)

  My test case is:

\documentclass{article}

\usepackage{pst-grad}
\usepackage{pst-char}

\makeatletter

\def\pscharpath at ii{%
  \leavevmode\hbox{%
    \pstVerb{\tx at CharPathShow}%
    \box\pst at hbox
    \pstVerb{/show /tx at CharPathSavedShow load def}%
    \begin at ClosedObj
      \def\pst at linetype{1}%
      \psdashadjustfalse
      \showpointsfalse
      \let\pst at newpath\@empty
      \def\use at pscode{%
        \pst at Verb{%
          gsave
            \tx at STV
            \pst at code
          grestore
% DG/SR modification begin - Jul.  3, 1998 - Patch 1
%          \if at star\else CP newpath moveto \fi}}%
          \if at star\else CP newpath moveto \fi}
        \gdef\pst at code{}}%
% DG/SR modification end
    \end at ClosedObj}}

\makeatother

\pagestyle{empty}

\begin{document}

\psframebox[fillstyle=gradient]{%
  \DeclareFixedFont{\RmLarge}{T1}{ptm}{m}{n}{3cm}
  \pscharpath[linestyle=none,fillstyle=gradient,gradend=red]{\RmLarge Test}}

\end{document}

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