\RequirePackage{pstricks}
\@ifundefined{pst@getref}
  {% We are using a modern PSTricks.
   \RequirePackage{pst-node}}
  {% We are using an old PSTricks.
   % Some of the functionality we may need is only in the pst-beta.tex
   % file, which reimplements the functionality of pst-node.tex.  If
   % pst-beta.tex exists in our TEXINPUTS path, it should work with
   % this version of PSTricks, so load it.
   \IfFileExists{pst-beta.sty}
     {\RequirePackage{pst-beta}}
     {% pst-beta.sty could not be found, so try loading the old
      % pst-node.sty (and pst-node.tex) file and hope the
      % functionality is sufficient.
      \RequirePackage{pst-node}}}

% Following line is necessary to get the nesting of the file loading
% announcements correct.
\relax
