\RequirePackage{pst-all}
\RequirePackage{fancyvrb}
\RequirePackage{shortvrb}
\RequirePackage{array,longtable}
%\endinput
\definecolor{wheat}{rgb}{.96, .87, .7}
\definecolor{lightblue}{rgb}{.68, .85, .9}
\definecolor{brown}{rgb}{.65, .16, .16}
\definecolor{pink}{rgb}{1, .75, .8}
\definecolor{palegreen}{rgb}{.6, .98, .6}
\definecolor{white}{rgb}{1, 1, 1 }
\catcode`\<=13
\def\Main#1{{\MainFont\string#1}}
\def\MainFont{\ttfamily\upshape}          % For macro definitions.
\def\ArgFont{\sffamily\mdseries\upshape}           % For meta arguments.
\def\OptArgFont{\sffamily\mdseries\itshape}  % For optional arguments.
\def<#1>{{\normalfont\itshape#1\/}}
% parameter descriptions are always in a table
\def\Par#1{\@ifnextchar({\@Par#1}{\@@Par#1()}}
\def\@Par#1=#2(#3){%
    {\normalfont #1}={\ArgFont#2}& #3}
% Short-cuts for coordinates:
\def\x#1{{\normalfont\itshape $x$#1\/}}
\def\y#1{{\normalfont\itshape $y$#1\/}}
\def\z#1{{\normalfont\itshape $z$#1\/}}
\def\c#1{(\x{#1},\kern 1pt\y{#1})}
\def\cAny{(\x{},\kern 1pt\y{})}
% In each case:
%  1. definition is delimited only by end-of-line.
%  2. {}, () and [] are literal, with contents set in \ArgFont
%  3. = and , are literal.
%  4. `foo' is for optional arguments.
%  5. <foo> is meta, as usual.
\begingroup
  \catcode`\<=1 \catcode`\>=2
  \catcode`\{=13 \catcode`\}=12
  \catcode`\[=13
  \gdef\@MD<%
    \catcode`\{=13 \catcode`\}=12 \catcode`\[=13
    \def{##1}<\{<\ArgFont ##1\/>\}>%
    \def[##1]<\string[<\ArgFont ##1\/>]>>
\endgroup
\begingroup
  \catcode`\(=13
  \catcode`\,=13
  \catcode`\==13
  \gdef\MacroDefCodes{%
    \@MD
    \catcode`\(13
    \catcode`\^^M12
    \catcode`\`13
    \catcode`\,13
    \catcode`\!1
    \catcode`\@2
    \def~{}%
    \def={{\fontshape{n}\selectfont\string=}}%
    \def,{{\fontshape{n}\selectfont\string,}}%
    \def(##1){\string({\ArgFont ##1})}}
\endgroup

\begingroup
  \catcode`\`=13 \gdef`#1'{{\OptArgFont #1}}
\endgroup

\begingroup
  \catcode`\^^M=12\relax%
  \gdef\GetMacroDef#1{\begingroup\MacroDefCodes\@GetMacroDef{#1}}%
  \gdef\@GetMacroDef#1#2^^M{#1{#2}\endgroup}%
\endgroup

% For listing macro definitions in a "description" environment:
\def\PSTCom{\GetMacroDef\@PSCom}
\def\@PSCom#1{\@@PSCom#1\@nil}
\def\@@PSCom#1\@nil{\MainFont\Main#1}
\def\PSTComOpt{\GetMacroDef\@PSTComOpt}
\def\@PSTComOpt#1{\@@PSComOpt#1\@nil}
\def\@@PSComOpt#1#2\@nil{\@PSCom{#1{\OptArgFont*[{\ArgFont settings}]}#2}}
\MakeShortVerb{\"}
\DeleteShortVerb{\|}
\def\PST{\textsf{PSTricks}}
\def\PS{\textsc{PostScript}}
\def\Special{{\normalfont\ttfamily\char'134special}}
\def\Lcs#1{{\normalfont\ttfamily\char'134#1}}
\def\Program#1{\emph{#1}}
\def\Lpack#1{\emph{#1}}
%----------- Zandtisms --------------------
\def\Usage#1{{\UsageFont\string#1}}
\def\MainFont{\fontfamily{\ttdefault}\fontseries{bc}\fontshape{n}\selectfont
\large}% For macro definitions.
\def\UsageFont{\fontfamily{\ttdefault}\fontseries{bc}\fontshape{n}\selectfont}
     % For in-line macro names.
\def\InlineFont{\ttfamily}             % For other in-line snipets of code.
\let\main\textbf
\let\usage\emph
% ---------- for array.sty --------------
\def\arraybackslash{\let\\=\@arraycr}
\newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
% ----------- harvard-style citations ------------------
\def\@cite#1#2{{#1\if@tempswa , #2\fi}}
\def\ETAL{{\em et al\/}}%

\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{; }\@ifundefined
        {b@\@citeb}{$\underline{\mbox{\@citeb}}$\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{#1}}%
% label for a bibliography citation not produced
 \def\@biblabel#1{\hfill}  

% with page or fig no
\def\Cite#1#2{\cite[#2]{#1}}%
% year only, with page or fig no
\def\Yearcite#1#2{\yearcite[#2]{#1}}%
\let\@internalcite\cite
\def\cite{\def\citename##1{##1}\@internalcite}%
% \yearcite gives only the date
\def\yearcite{\def\citename##1{}\@internalcite}%
%
\def\endPSExample{%
  \EndExample
\VerbatimInput[gobble=0,fontsize=\small,
%      frame=topline,
framerule=1.5pt]{\EXdir\theeps@counter}%
\begin{center}
    \ifgrid\vskip 8pt \fi
    \expandafter\pspicture\PictureSize
    \ifgrid\usergrid\else\relax\fi
    \input{\EXdir\theeps@counter}
    \endpspicture
    \ifgrid\vskip 8pt \fi
        \EndRuleExample
\end{center}
 }%
\renewenvironment{example**}%
{\def\Write@Ex##1{}\BeginExample}%
{%
\EndExample
\VerbatimInput[gobble=0,fontsize=\small,
      %frame=topline,
framerule=1.5pt]{\EXdir\theeps@counter}%
\begin{center}
\input{\EXdir\theeps@counter}
        \EndRuleExample
\end{center}
}
\def\Lenv#1{\texttt{#1}}
\newcolumntype{H}[1]{>{\raggedright\hangindent=.5em\arraybackslash}p{#1}}
\def\Figword{Fig.~}
\input{spqr2.sty}
\catcode`\<=12
\endinput
