Node Connections and Overlays?

Denis Girou Denis.Girou at idris.fr
Thu Apr 13 23:39:50 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.
-----------------------------------------------------------------------------

>>>>> "Holger.Meuss" == Holger Meuss <meuss at cis.uni-muenchen.de> writes:

    Holger.Meuss> has anybody encountered a similar problem with node connections and
    Holger.Meuss> overlays, or can somebody help me:

    Holger.Meuss> I try to make overlay slides with node A on the first slide, node B on 
    Holger.Meuss> the second and an edge between node A and node B on the second slide,
    Holger.Meuss> too. 

    Holger.Meuss> The problem is that the edge does not connect nodes A and B but
    Holger.Meuss> goes out of the respectivve slide. I imagine it tries to connect to the other
    Holger.Meuss> slide where node A (node B, resp.) is located. 

    Holger.Meuss> I tried it with the following simple lines:


    Holger.Meuss> \documentclass[a4,12pt]{seminar}

    Holger.Meuss> \usepackage{pst-tree}

    Holger.Meuss> \usepackage{semcolor}
    Holger.Meuss> \usepackage{semlayer}
    Holger.Meuss> \input{seminar.bug}

    Holger.Meuss> \begin{document}


    Holger.Meuss> \begin{slide}
    Holger.Meuss> \pstree{\Toval[name=A]{node A}}{}

    Holger.Meuss> \begin{overlay}{1}
    Holger.Meuss> \pstree{\Toval[name=B]{node B}}{}
    Holger.Meuss> \ncarc{->}{A}{B}

    Holger.Meuss> \end{overlay}
    Holger.Meuss> \end{slide}

    Holger.Meuss> \end{document}

    Holger.Meuss> Can anybody help me?

  This question really concern PSTricks (and not exclusively Seminar, which is
a different package, and absolutely out of topic in this mailing list - the
interest of mailing lists is that they stay concentrated on precise topics
and not be perturbated by all kinds of messages, as in nearly all Usenet
newsgroups).

  The interest of overlays is nearly for slides only, but the management of
overlays in Seminar is done by PSTricks, and, more, your problem is specific
to PSTricks nodes.

  Briefly speaking, I discover this problem myself few months ago, when I also 
tried to use overlays for a PSTricks diagram done with a "psmatrix" environment, 
so using nodes. The solution is easy (to use but not to found: I must
investigate the problem rather long time before to understand it). To use
overlays AND nodes, you must switch to another mode of management of overlays,
activated by the \AltOverlayMode macro (undocumented, as far as I know...).
But I can't explain why this mode is not the default (and unique) one...

  It is enough if you use plastic slides. If you use a projector and for
instance generate a PDF file to view with Acroread, you must use a "cumulative 
overlay" mode. The one described in the Seminar FAQ work for the "normal"
overlay mode and not the "alt" one. Here is what must be done for both cases
(of course, I would add it -one day, but I have currently no time for Seminar-
in a future version of the Seminar FAQ):

\documentclass[a4,12pt]{seminar}

\usepackage{pst-tree}

\usepackage{semcolor}
\usepackage{semlayer}
\input{seminar.bug}

\makeatletter

% For overlays, to force to print all preceding ones,
% showing "cumulative overlays"

\def\pst at initoverlay#1{%
\pst at Verb{%
% D.G. modification begin - 1998
/BeginOL {dup (all) eq exch TheOL le or 
{IfVisible not {Visible /IfVisible true def} if}
{IfVisible {Invisible /IfVisible false def} if}
ifelse} def
% D.G. modification end
\tx at InitOL /TheOL (#1) def}}

\def\AltOverlayMode{%
\def\pst at initoverlay##1{%
\pst at Verb{%
% D.G. modification begin - Mar.  1, 2000
/BeginOL {dup (all) eq exch TheOL le or 
{IfVisible not {Visible /IfVisible true def} if}
{IfVisible {Invisible /IfVisible false def} if}
ifelse} def
% D.G. modification end
\tx at InitOL
/Visible { initclip } def
/Invisible {CP newpath OLUnit itransform moveto clip newpath moveto} def
/TheOL (##1) def}}}

\makeatother

\begin{document}

\begin{slide}

\AltOverlayMode

\pstree{\Toval[name=A]{node A}}{}

\begin{overlay}{1}
  \pstree{\Toval[name=B]{node B}}{}
  \ncarc{->}{A}{B}
\end{overlay}

\end{slide}

\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