% \iffalse meta-comment
%
% Time-stamp: "pict2e.dtx 2004-08-06 15:01:38 CEST Tuesday hubertjg"
%
%
% Copyright (C) 2003, 2004
% Rolf Niepraschk, Rolf.Niepraschk@ptb.de
% Hubert Gaesslein, HubertJG@open.mind.de
%
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
%
% This work has the LPPL maintenance status "author-maintained".
%
% This work consists of all files listed in manifest.txt.
%
%
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] % ???
%<package>\ProvidesPackage{pict2e}
%<package>  [2004/08/06 v0.2q Improved picture commands (HjG,RN)]
%
%<*driver>
\listfiles
\errorcontextlines5
\documentclass{ltxdoc}
\usepackage{pict2e} % [pstarrows]
%%\usepackage[debug]{pict2e}
\IfFileExists{ebezier.sty}{\usepackage{ebezier}}{%
  } % \providecommand*\cbezier{}
\usepackage{color}
\usepackage{graphicx}
\usepackage{array}
%%\usepackage{pstcol}
\usepackage{longtable}
\IfFileExists{geometry.sty}{%
  \usepackage[left=\marginparwidth,textwidth=1.15\textwidth,%
    top=20mm,bottom=30mm]{geometry}}{}
\IfFileExists{url.sty}{\usepackage{url}}
  {\newcommand*\url[1]{\texttt{#1}}}
%%\OnlyDescription
%%\AlsoImplementation
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
%%\tracingmacros\maxdimen
%%\tracingall \tracingonline0
%%\loggingall
  \setlength\emergencystretch{3em}
  \DocInput{pict2e.dtx}
\end{document}
%</driver>
% \fi
%
% \GetFileInfo{pict2e.sty}
% \def\docdate{2004/08/06}
%
% \CheckSum{1499}
%
% ^^A ========
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%
% ^^A ========
%
% \makeatletter
% \@ifundefined{ifdeveloping}{\newif\ifdeveloping}{} ^^A false by default
% \makeatother
%
% ^^A ========
%
% \ifdeveloping ^^A Should be further refined
%
% \changes{v0.1a}{2003/07/18}{First version. New code for \cmd{\@sline}. (RN)}
% \changes{v0.1b}{2003/07/20}{New code for \cmd{\@circle} and \cmd{\@dot}
%   added. (RN)}
% \changes{v0.1c}{2003/07/21}{More flexibility with sampling the graphic
%   operators in token register (\cmd{\pIIe@GRAPH}). (RN)}
% \changes{v0.1c}{2003/07/21}{Code for \cmd{\@bezier} added. (RN)}
% \changes{v0.1d}{2003/07/22}{New code for \cmd{\cbezier}
%                 (package `ebezier'). (RN)}
% \changes{v0.1e}{2003/07/24}{New option ``debug''}
% \changes{v0.1f}{2003/08/17}{Changed mode numbers. (RN)}
% \changes{v0.1f}{2003/08/17}{\cmd{\pIIe@add@rcurveto} added. (RN)}
% \changes{v0.1f}{2003/08/17}{\cmd{\pIIe@add@XY} added. (RN)}
% \changes{v0.1g}{2003/08/23}{Changed code for \cmd{\pIIe@add@qcircle}.
%                             (HjG,RN)}
% \changes{v0.1g}{2003/08/23}{New code for \cmd{\@oval}. (HjG,RN)}
% \changes{v0.1i}{2003/08/28}{Translation, scaling, rotation added. (HjG,RN)}
% \changes{v0.1j}{2003/08/29}{Loads now `color.cfg' instead of `graphics.cfg'
%    for system default driver (no more trouble with commands like
%             \cmd{\DeclareGraphicsRule}) (RN)}
% \changes{v0.1j}{2003/08/29}{Driver specific code now in new files
%    ``p2e-DRIVER.def''. (RN)}
% \changes{v0.1k}{2003/08/30}{\cmd{\pIIe@PTtoBP} removed. Scaling with
%    PS/PDF code instead. (RN)}
% \changes{v0.1l}{2003/09/24}{First implementation of \cmd{\vector}. (RN,HjG)}
% \changes{v0.1m}{2003/09/26}{\cmd{\vector} complete (arctan version). (RN,HjG)}
% \changes{v0.1n}{2003/10/01}{Loads now the own configuration file `pict2e.cfg'
%    instead of `color.cfg' (RN,HjG)}
% \changes{v0.1n}{2003/10/01}{New Option `hide' suppresses the ps or pdf output (RN)}
% \changes{v0.1o}{2003/10/17}{New implementation of opt. arg. to \cmd{\oval} (HjG,RN)}
% \changes{v0.1p}{2003/10/29}{Improve \cmd{\@sline} (HjG,RN)}
% \changes{v0.1p}{2003/10/29}{Some cleaning (HjG,RN)}
% \changes{v0.1p}{2003/10/29}{Rudimentary Documentation, translated to English (HjG,RN)}
% \changes{v0.1q}{2003/11/02}{Small fixes in documentation (HjG)}
% \changes{v0.1r}{2003/11/12}{Cleaning and revamping (RN,HjG)}
% \changes{v0.1r}{2003/11/12}{Rename commands: operators get `@op' suffix,
%   drawing commands loose `@add' (RN,HjG)}
% \changes{v0.1s}{2003/11/13}{Avoid use of dimen registers
%   \cmd{\@tempdima} and \cmd{\@tempdimb} in all but low level auxillary
%   macros -- avoid potential pitfall (RN,HjG)}
% \changes{v0.1t}{2003/11/13}{Some code and documentation cleaning (RN)}
% \changes{v0.1u}{2003/11/18}{M-x delete-trailing-whitespace (HjG)}
% \changes{v0.1u}{2003/11/19}{Some cleaning and revamping (HjG)}
% \changes{v0.1u}{2003/11/20}{Finally, bring code snippets in a more
%   meaningful order (HjG)}
% \changes{v0.1u}{2003/11/21}{Save many tokens by introducing ancillary macros (HjG)}
% \changes{v0.1v}{2003/11/21}{More cleaning and revamping (HjG)}
% \changes{v0.1v}{2003/11/22}{Return of ``cleaning and revamping'' (HjG)}
% \changes{v0.1w}{2003/11/25}{Son of ``cleaning and revamping'' (HjG)}
% \changes{v0.1w}{2003/11/25}{More documentation about usage (HjG)}
% \changes{v0.1w}{2003/11/27}{Small fixes (RN,HjG)}
% \changes{v0.1x}{2003/11/27}{Improve PSTricks-like arrows. (RN,HjG)}
% \changes{v0.1y}{2003/11/27}{Implement LaTeX-like arrows. (RN,HjG)}
% \changes{v0.1z}{2003/12/04}{Change \cmd{\cbezier}. (RN,HjG)}
% \changes{v0.2a}{2003/12/04}{Return of the son of ``cleaning and revamping'' (HjG)}
% \changes{v0.2a}{2003/12/05}{M-x delete-trailing-whitespace (HjG)}
% \changes{v0.2}{2003/12/11}{Minor changes. (RN,HjG)}
% \changes{v0.2b}{2003/12/13}{Merge v0.2a and v0.2 (HjG)}
% \changes{v0.2c}{2003/12/13}{Grandson of ``cleaning and revamping'' (HjG)}
% \changes{v0.2c}{2003/12/13}{Try new driver for \textsf{xdvi}---to no avail (HjG)}
% \changes{v0.2*}{2003/12/17}{Improve LaTeX-like arrows. (RN,HjG)}
% \changes{v0.2d}{2003/12/18}{Merge v0.2c and v0.2*. (HjG)}
% \changes{v0.2e}{2003/12/18}{Merge new figures created by RN. (HjG)}
% \changes{v0.2e}{2003/12/19}{Return of the grandson of ``cleaning and revamping'' (HjG)}
% \changes{v0.2f}{2003/12/19}{Cousin of ``cleaning and revamping'' (HjG)}
% \changes{v0.2f}{2003/12/20}{Return of the cousin of ``cleaning and revamping'' (HjG)}
% \changes{v0.2g}{2003/12/21}{Nephew of ``cleaning and revamping'' (HjG)}
% \changes{v0.2h}{2004/01/07}{Documentation and small code improvements (RN,HjG)}
% \changes{v0.2i}{2004/01/29}{Slope arguments for \cmd{\vector} restricted
%           to values $\vert s \vert \le 1000$ (RN,HjG)}
% \changes{v0.2i*}{2004/02/11}{Final touches for release (RN)}
% \changes{v0.2j}{2004/02/19}{Final touches for release (HjG)}
% \changes{v0.2k}{2004/03/24}{Return of the nephew of ``cleaning and revamping'' (HjG)}
% \changes{v0.2k}{2004/03/26}{Better control for history entries
%     while debugging (HjG)}
% \changes{v0.2l}{2004/04/08}{Added redefinition of \cmd{\line} (RN,HjG)}
% \changes{v0.2m}{2004/04/10}{Minor touches (HjG)}
% \changes{v0.2n}{2004/04/22}{Added lppl (RN,HjG)}
% \changes{v0.2o}{2004/06/25}{Fix two bugs (HjG)}
% \changes{v0.2o}{2004/06/25}{Numerous small fixes in documentation (HjG)}
% \changes{v0.2p}{2004/07/06}{Small fixes in documentation (HjG)}
%
% \fi
%
% \changes{v0.1a}{2003/07/18}{First version. (RN)}
% \changes{v0.2j}{2004/02/27}{First release to CTAN
%                             (2004/02/19 v0.2j). (LaTeX Team)}
% \changes{v0.2n}{2004/05/27}{Second release to CTAN
%                             (2004/04/22 v0.2n). (RN/HjG)}
% \changes{v0.2o}{2004/06/25}{Third release to CTAN
%                             (2004/06/25 v0.2o). (RN/HjG)}
% \changes{v0.2p}{2004/07/28}{Fourth release to CTAN
%                             (2004/07/28 v0.2p). (RN)}
% \changes{v0.2q}{2004/08/06}{Fourth release to CTAN
%                             (2004/08/06 v0.2q). (RN/HjG)}
%
%
% \DoNotIndex{\newcommand,\renewcommand,\newenvironment,\renewenvironment}
% \DoNotIndex{\providecommand,\def,\edef,\let,\gdef,\xdef,\global,\newtoks}
% \DoNotIndex{\RequirePackage,\DeclareOption,\ProcessOptions,\ExecuteOptions}
% \DoNotIndex{\input,\InputIfFileExists}
% \DoNotIndex{\@ifdefinable,\@ifundefined,\@percentchar}
% \DoNotIndex{\AtBeginDocument,\AtEndOfPackage}
% \DoNotIndex{\PackageError,\PackageWarning,\PackageWarningNoLine,\PackageInfo}
% \DoNotIndex{\MessageBreak,\typeout}
%
% \DoNotIndex{\z@,\z@skip,\p@,\@ne,\tw@,\thr@@,\@iv,\two@fourteen,\strip@pt}
% \DoNotIndex{\the,\if,\else,\or,\fi,\ifnum,\ifdim,\ifcase,\ifodd}
% \DoNotIndex{\advance,\multiply,\divide}
% \DoNotIndex{\@tfor,\do}
% \DoNotIndex{\csname,\endcsname,\begingroup,\endgroup}
% \DoNotIndex{\expandafter,\afterassignment,\noexpand}
%
% \changes{v0.1w}{2003/11/25}{Index use of temporary registers
%     while debugging (HjG)}
% \changes{v0.2k}{2004/03/26}{Better control for indexing temporary
%     registers while debugging (HjG)}
%^^A \ifdim0pt<\overfullrule\else
% \ifdeveloping\else
%  \DoNotIndex{\@tempdima,\@tempdimb,\@tempdimc,\@tempcnta,\@tempcntb}
%  \DoNotIndex{\@halfwidth,\@wholewidth,\unitlength}
%  \DoNotIndex{\@clnwd,\@clnht,\@ovdx,\@ovdy,\@ovro,\@ovri,\@ovxx,\@ovyy}
%  \DoNotIndex{\@xarg,\@xdim,\@yarg,\@ydim,\@linelen,\@dashdim,\dimen@}
% \fi
%
% \DoNotIndex{\reserved@a,\relax,\protect,\space}
% \DoNotIndex{\if@tempswa,\@tempswatrue,\@tempswafalse}
% \DoNotIndex{\if@ovt,\if@ovb,\if@ovl,\if@ovr}
% \DoNotIndex{\@ovttrue,\@ovbtrue,\@ovltrue,\@ovrtrue}
% \DoNotIndex{\@ovtfalse,\@ovbfalse,\@ovlfalse,\@ovrfalse}
%
% \DoNotIndex{\pdfcompresslevel}
%
% \DoNotIndex{\x,\y}
% ^^A \DoNotIndex{}
%
% \newcommand*\BigIndent{\hspace{.2\linewidth}}
% \renewcommand*\floatpagefraction{0.8}
%
% \newcommand*\PS{PostScript}
% \newcommand*\PSTricks{PSTricks}
% \newcommand*\PDF{PDF}
% \newcommand*\SL{Standard \LaTeX}
% ^^A stolen from pictex.tex
% \newcommand*\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC}
% \newcommand*\PiCTeX{\PiC\kern-.11em\TeX}
% \newcommand*\teTeX{te\kern-.11em\TeX}
% \newcommand*\TeXlive{\TeX live}
%
% \newenvironment*{ltxquote}{\quote\slshape}{\endquote}
%
% \changes{v0.2k}{2004/03/26}{Better control over funny pagestyle
%     while debugging (HjG)}
% \changes{v0.2l}{2004/04/08}{Even better control over funny pagestyle
%     while debugging (RN)}
% \ifdeveloping
%   \makeatletter
%
%   \newcommand*\isodattim{}
%   \begingroup
%     \count@\time
%     \divide\count@ 60
%     \count2=-\count@
%     \multiply\count2 60
%     \advance\count2 \time
%     \xdef\isodattim{^^A
%       \the\year-\two@digits{\the\month}-\two@digits{\the\day}^^A
%       ~\two@digits{\the\count@}:\two@digits{\the\count2}}
%   \endgroup
%
%   \newcommand*\ps@myfootings{^^A cf. \ps@plain
%     \let\@mkboth\@gobbletwo
%     \let\@oddhead\@empty
%     \let\@evenhead\@empty
%     \def\@oddfoot{\reset@font
%       \rlap{\textsf{\filename}~\fileversion~\filedate}^^A
%       \hfil\thepage\hfil
%       \llap{\TeX ed \texttt{\isodattim}}}^^A
%     \def\@evenfoot{\reset@font
%       \rlap{\TeX ed \texttt{\isodattim}}^^A
%       \hfil\thepage\hfil
%       \llap{\filedate~\fileversion~\textsf{\filename}}}^^A
%   }
%   \pagestyle{myfootings}
%   \let\pagestyle\@gobble
%   \let\thispagestyle\@gobble
%
%   \makeatother
% \else
%   \makeatletter
% ^^A   \ifdim\overfullrule>\z@\else\let\ps@myfootings\ps@plain\fi
%   \makeatother
% \fi
%
% \DeleteShortVerb{\|}
% \newcommand*\abs[1]{\ensuremath{|#1|}}
% \MakeShortVerb{\|}
%
% ^^A ========
%
% \newcommand*\OPOINT{^^A
%   \begingroup
%     \setlength\unitlength{.8pt}^^A
%     \circle{5}^^A
%   \endgroup
% }
% \newcommand*\FPOINT{^^A
%   \begingroup
%     \setlength\unitlength{.8pt}^^A
%     \circle*{5}^^A
%   \endgroup
% }
% \newcommand*\THICKLINES{\linethickness{1.4pt}}
% \newcommand*\CBEZIER[4]{^^A
%   \cbezier(#1)(#2)(#3)(#4)^^A
%   \put(#2){\FPOINT}\put(#3){\FPOINT}}
%
% \newcommand*\LINETEST[1][1]{^^A
% \setlength\unitlength{.007\linewidth}^^A
% \begin{minipage}{100\unitlength}
%   \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
%   \begin{picture}(100,100)^^A (-50,-50)^^A
%     \put(0,0){\framebox(100,100){}}^^A
%     \linethickness{2.6\unitlength}
%     \put(0,0){\line(1,0){50}}^^A
%     \put(0,0){\line(2,1){50}}^^A
%     \put(0,0){\line(1,1){50}}^^A
%     \put(0,0){\line(1,2){50}}^^A
%     \put(0,0){\line(0,1){50}}^^A
%     \ifnum #1>0
%       \color{red}^^A
%       \linethickness{3.8\unitlength}^^A
%       \put(50,0){\line(966,259){25}}^^A 15 degrees
%       \put(50,0){\line(866,500){25}}^^A 30 degrees
%       \put(50,0){\line(707,707){25}}^^A 45 degrees
%       \put(50,0){\line(500,866){25}}^^A 60 degrees
%       \put(50,0){\line(259,966){25}}^^A 75 degrees
%       \normalcolor^^A
%     \fi
%     \color{blue}^^A
%     \thicklines
%     \put(50,0){\line(4,2){50}}
%     \put(50,0){\line(2,4){50}}
% ^^A    \put(50,0){\line(5,5){50}}
%   \end{picture}^^A
% \end{minipage}
% }
%
% \newcommand*\VECTORTEST[1][1]{^^A
% \setlength\unitlength{.007\linewidth}^^A
% \begin{minipage}{100\unitlength}
%   \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
%   \begin{picture}(100,100)(-50,-50)^^A
%     \put(-50,-50){\framebox(100,100){}}^^A
%     \thinlines
%     \put(0,0){\vector(1,0){50}}^^A
%     \thicklines
%     \put(0,0){\vector(2,1){50}}^^A
%     \linethickness{1.4pt}^^A
%     \put(0,0){\vector(1,1){50}}^^A
%     \linethickness{2.0pt}^^A
%     \put(0,0){\vector(1,2){25}}^^A
%     \ifnum #1>0
%       \color{red}^^A
%       \linethickness{2.6pt}^^A
%       \put(0,0){\vector(259,966){13}}^^A 75 degrees
%       \linethickness{3.8pt}^^A
%       \put(0,0){\vector(-259,966){13}}^^A
%       \normalcolor^^A
%     \fi
%     \linethickness{3.2pt}^^A
%     \put(0,0){\vector(0,1){50}}^^A
%     \linethickness{4.4pt}^^A
%     \put(0,0){\vector(-1,1){50}}^^A
%     \linethickness{5.0pt}^^A
%     \put(0,0){\vector(-1,-1){50}}^^A
%     \linethickness{8.0pt}^^A
%     \put(0,0){\vector(1,-1){50}}^^A
%     \thicklines^^A
%     \thinlines^^A
%     \put(1,-30){\line(1,0){10}}^^A
%     \put(-1,-30){\line(-1,0){10}}^^A
%     \put(0,-30){\vector(0,-1){0}}^^A
%     \put(0,-30){\vector(1,1){0}}^^A
%     \put(0,-30){\vector(-1,1){0}}^^A
% ^^A     \put(0,15){\psline[linecolor=green,linewidth=8.0pt,unit=\unitlength]{->}(50,-50)}^^A
%   \end{picture}^^A
% \end{minipage}
% }
%
% \newcommand*\CIRCLETEST[1][1]{^^A
% \setlength\unitlength{.007\linewidth}^^A
% \setlength\fboxsep{0pt}
% \fbox{^^A
% \begin{minipage}{118\unitlength}
%   \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
%   \begin{picture}(118,60)(-45,-30)^^A
%     \linethickness{1.6pt}^^A
%     \put(-30,0){\circle{15}}^^A
%     \put(-20,0){\circle{20}}^^A
%     \put(-10,0){\circle{25}}^^A
%     \put(0,0){\circle{30}}^^A
%     \put(10,0){\circle{35}}^^A
%     \put(20,0){\circle{40}}^^A
%     \put(30,0){\circle{45}}^^A
%     \put(40,0){\circle{50}}^^A
%   \end{picture}^^A
%   \par
%   \begin{picture}(118,35)(-45,-20)^^A
%     \put(-20,0){\circle*{30}}^^A
%     \put(-10,0){\circle*{25}}^^A
%     \put(0,0){\circle*{20}}^^A
%     \put(10,0){\circle*{15}}^^A
%     \put(20,0){\circle*{12}}^^A
%     \put(30,0){\circle*{9}}^^A
%     \put(40,0){\circle*{6}}^^A
%     \put(50,0){\circle*{3}}^^A
%   \end{picture}^^A
% \end{minipage}}
% }
%
% \newcommand*\OVALTESTi[1][1]{^^A
% \setlength\unitlength{.007\linewidth}^^A
% \begin{minipage}{100\unitlength}
%   \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
%   \begin{picture}(100,80)^^A
%     \put(0,0){\framebox(100,80){}}
% ^^A \linethickness{1\unitlength}
%   \thicklines
% ^^A  \color{blue}^^A
%   \put(55,40){\oval[2](80,70)[r]}^^A
%   \put(55,40){\oval[2](65,40)[r]}^^A
%   \put(55,40){\oval[2](60,20)[r]}^^A
%   \put(55,40){\oval[2](55,15)[r]}^^A
%   \put(55,40){\oval[2](50,10)[r]}^^A
%   \put(55,40){\oval[2](45,5)[r]}^^A
%   \put(55,40){\oval[2](40,2)[r]}^^A
% ^^A   \color{black}^^A
%   \put(45,40){\oval(80,70)[l]}^^A
%   \put(45,40){\oval(65,40)[l]}^^A
%   \put(45,40){\oval(60,20)[l]}^^A
%   \put(45,40){\oval(55,15)[l]}^^A
%   \put(45,40){\oval(50,10)[l]}^^A
%   \put(45,40){\oval(45,5)[l]}^^A
%   \put(45,40){\oval(40,2)[l]}^^A
%   \end{picture}^^A
% \end{minipage}
% }
%
% \newcommand*\OVALTESTii[1]{^^A
% \renewcommand*\maxovalrad{#1}^^A
% \setlength\unitlength{.0060\linewidth}^^A
% \noindent
% \begin{minipage}{155\unitlength}
%   \begin{picture}(155,50)^^A
%     \put(0,0){\framebox(155,50){}}^^A
%     \put(0,0){^^A NE
%       \setlength\unitlength{.5\unitlength}^^A
%       \begin{picture}(100,100)(-50,-50)^^A
%         \put(-50,-50){\framebox(100,100){}}^^A
%         \put(0,0){\oval(80,80)}%
%         \put(0,0){\makebox(0,0){2.5}}%
%       \end{picture}^^A
%     }^^A
%     \put(55,0){^^A NW
%       \setlength\unitlength{.4\unitlength}^^A
%       \begin{picture}(100,100)(-50,-50)^^A
%         \put(-50,-50){\framebox(100,100){}}^^A
%         \put(0,0){\oval(80,80)}%
%         \put(0,0){\makebox(0,0){2}}%
%       \end{picture}^^A
%     }^^A
%     \put(100,0){^^A SW
%       \setlength\unitlength{.3\unitlength}^^A
%       \begin{picture}(100,100)(-50,-50)^^A
%         \put(-50,-50){\framebox(100,100){}}^^A
%         \put(0,0){\oval(80,80)}%
%         \put(0,0){\makebox(0,0){1.5}}%
%       \end{picture}^^A
%     }^^A
%     \put(135,0){^^A SE
%       \setlength\unitlength{.2\unitlength}^^A
%       \begin{picture}(100,100)(-50,-50)^^A
%         \put(-50,-50){\framebox(100,100){}}^^A
%         \put(0,0){\oval(80,80)}%
%         \put(0,0){\makebox(0,0){1}}%
%       \end{picture}^^A
%     }^^A
%   \end{picture}^^A
% \end{minipage}
% }
%
% \newcommand*\QBEZIERTEST[1][1]{^^A
% \setlength\unitlength{.007\linewidth}^^A
% \begin{minipage}{120\unitlength}
%   \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
%   \begin{picture}(120,100)^^A
%     \put(0,0){\framebox(120,100){}}
%     \qbezier[0](10,10)(40,90)(110,90)
%     \put(10,10){\FPOINT}\put(40,90){\OPOINT}\put(110,90){\FPOINT}
%     \color{green}^^A
%     \qbezier[0](10,10)(20,90)(30,10)
%     \put(10,10){\FPOINT}\put(20,90){\OPOINT}\put(30,10){\FPOINT}
%   \end{picture}^^A
% \end{minipage}
% }
%
% \newcommand*\CBEZIERTEST[1][1]{^^A
% \setlength\unitlength{.01\linewidth}^^A
% \begin{minipage}{80\unitlength}
%   \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
%   \begin{picture}(80,80)(-40,-40)^^A
%     \put(-40,-40){\framebox(80,80){}}
%     \cbezier(-10,-10)(-30,30)(30,30)(30,-5)
%     \cbezier(30,-5)(30,-30)(0,-35)(-20,-20)
%     \put(-10,-10){\FPOINT}
%     \put(-30,30){\OPOINT}\put(30,30){\OPOINT}
%     \put(30,-5){\FPOINT}
%     \put(30,-30){\OPOINT}\put(0,-35){\OPOINT}
%     \put(-20,-20){\FPOINT}
%     \color{green}^^A
%     \cbezier(0,36)(24,36)(24,24)(0,0)
%     \cbezier(0,0)(-24,-24)(-24,-36)(0,-36)
%     \put(0,36){\FPOINT}
%     \put(24,36){\OPOINT}\put(24,24){\OPOINT}
%     \put(0,0){\FPOINT}
%     \put(-24,-24){\OPOINT}\put(-24,-36){\OPOINT}
%     \put(0,-36){\FPOINT}
%   \end{picture}^^A
% \end{minipage}
% }
%
% \newcommand*\QCBEZIERTEST[1][1]{^^A
% \setlength\unitlength{.007\linewidth}^^A
% \begin{minipage}{100\unitlength}
%   \ifnum #1>0 \else\OriginalPictureCmds\fi^^A
%   \begin{picture}(100,120)(-50,-60)^^A
%     \put(-50,-60){\framebox(100,120){}}
%     \color{green}^^A
%     \qbezier[0](-40,-30)(-30,10)(0,10)
%     \qbezier[0](0,10)(30,10)(40,50)
%     \put(-40,-30){\FPOINT}\put(-30,10){\OPOINT}
%     \put(0,10){\FPOINT}
%     \put(30,10){\OPOINT}\put(40,50){\FPOINT}
%     \color{black}^^A
%     \cbezier[0](-40,-50)(-20,30)(20,-50)(40,30)
%     \put(-40,-50){\FPOINT}\put(-20,30){\OPOINT}
%     \put(20,-50){\OPOINT}\put(40,30){\FPOINT}
%   \end{picture}^^A
% \end{minipage}
% }
%
% ^^A ========
%
% \newcommand*\Acknowledgements{%
% \section*{Acknowledgements}
% We would like to thank Michael Wichura for granting us permission to
% use his implementation of the algorithm for ``pythagorean addition''
% from his \PiCTeX\ package.
% Thanks go to Michael Vulis (MicroPress) for hints regarding a driver
% for the \textsf{V\TeX} system.
% Walter Schmidt has reviewed the documentation and code, and has
% tested the V\TeX\ driver.
% The members of the ``\TeX-Stamm\-tisch'' in Berlin, Germany, have
% been involved in the development of this package as our guinea pigs,
% i.e., alpha-testers;
% Jens-Uwe Morawski and Herbert Voss have also been helpful with many
% suggestions and discussions.
% \par
% Finally we thank the members of The \LaTeX\ Team for taking the time
% to evaluate our new implementation of the picture mode commands, and
% eventually accepting it as the ``official'' \textsf{pict2e} package,
% as well as providing the \texttt{README} file.
% \par
% }
%
% ^^A ========
%
% \title{The \textsf{pict2e} package\thanks{This document
%   corresponds to \textsf{\filename} \fileversion,
%   dated \filedate, documentation dated \docdate.}}
% \author{%
%   Hubert G\"a{\ss}lein\thanks{\texttt{HubertJG@open.mind.de}}
%   \,and
%   Rolf Niepraschk\thanks{\texttt{Rolf.Niepraschk@ptb.de}}}
%
% \date{\filedate}
%
% \maketitle
%
% \begin{abstract}
%      This package was described in the 2nd edition of ``\LaTeX{}: A
%      Document Preparation System'', but the \LaTeX{} project team
%      declined to produce the package.
%      For a long time, \LaTeX{} has included a ``pict2e package''
%      that merely produced an apologetic error message.
%
%      The new package extends the existing \LaTeX{} \texttt{picture}
%      environment, using the familiar technique (cf.\ the
%      \textsf{graphics} and \textsf{color} packages) of driver
%      files.
%      In the user-level part of this documentation there is a fair
%      number of examples of use, showing where things are improved by
%      comparison with the \SL\ \texttt{picture} environment.
% \end{abstract}
%
% \tableofcontents
%
% \listoffigures
%
% \section{Introduction}
%
% Here's a quote from the obsolete original official version of the
% \textsf{pict2e} package (1993--2003):
% \begin{ltxquote}
%   The package \textsf{pict2e} that is mentioned in the 2nd edition of
%   ``\LaTeX: A Document Preparation System'' has not yet been produced.
%   It is unlikely that the \LaTeX3 Project Team will ever produce this
%   package thus we would be very happy if someone else creates it.
% \end{ltxquote}
% Finally,
% \marginpar[\hfill\texttt{:-)}]{\texttt{:-)}}
% someone has produced a working implementation of the
% \textsf{pict2e} package.
%
% This package redefines some of the drawing commands of the \LaTeX\ %
% \textsf{picture} environment.
% Like the \textsf{graphics} and \textsf{color} packages, it uses
% driver files.
%
% ^^A Depending on the output format, we use \PS\ or \PDF\ Operators.
% Currently there are only back-ends for \PS\ and \PDF.
% (Other output formats may be added in the future.)
%
% \bigskip ^^A \pagebreak[2]
% \noindent
% Note/Warning:
% \begin{itemize}
% \item Documentation has been written somewhat ``hastily'' and may be
% inaccurate.
% \item
% The status of this package is currently somewhere between ``beta''
% and ``release'' \dots\
% Users and package programmers should \emph{not} rely on
% \emph{any} feature sported by the internal commands.
% (Especially, the internal control sequence names may change without
% notice in future versions of this package.)
% \end{itemize}
%
% \section{Usage}
%
% To use the \textsf{pict2e} package, you put a
% |\usepackage|\linebreak[0]\oarg{optionlist}\linebreak[0]|{pict2e}|
% instruction in the preamble of your document.
% Likewise, class or package writers just say
% |\RequirePackage|\linebreak[0]\oarg{optionlist}\linebreak[0]|{pict2e}|
% in an appropriate place in their class or package file.
% (Nothing unusual here.)
%
% \noindent
% Like the \textsf{graphics} and \textsf{color} packages, the
% \textsf{pict2e} package supports a
% configuration file (see Section~\ref{sec:cfg-file}).
%
% \subsection{Package options}
%
% \subsubsection{Driver options}
%
%  \begin{minipage}{.5\textwidth}
%  \begin{tabular}{@{}lc@{\qquad\qquad}lc@{}}
%    driver  & notes  &    driver   & notes\\ \hline
%    dvips   &  x     &    dvipsone &  x? \\
%    xdvi    &  x     &    dviwindo &  x? \\
%    pdftex  &  x     &    dvipdf   &  x? \\
%    vtex    &  x     &    textures &  x? \\
%    dvipdfm &  x     &    pctexps  &  x? \\
%    oztex   & (x)    &    pctex32  &  x? \\ \hline
% ^^A emtex & --
%  \end{tabular}
%
%  \smallskip
%  \noindent x\,=\,supported; (x)\,=\,supported but untested; \par
%  \noindent x?\,=\,not yet implemented
% ^^A --\,=\,unlikely to be ever supported
%  \end{minipage}
%
%  \smallskip
%  The driver options are (mostly) implemented by means of definition
%  files (|p2e-|\meta{driver}\linebreak[0]|.def|).
%  For details, see file \texttt{p2e-drivers.dtx}.
%
% \begin{em}
%  Note:
%  You should specify the same driver for \textsf{pict2e} you use with
%  the \textsf{graphics/x} and \textsf{color} packages.
%  Otherwise, things may go haywire.
% \par
% \end{em}
%
% \subsubsection{Other options}
%
% Currently, there are two options that allow you to choose between
% variants of the arrows-heads generated by the \cmd{\vector}
% command.
% See Figure~\ref{fig:vector:comparison}
% in Section~\ref{sec:usage:vector} for the difference.
%
% \noindent
%  \begin{tabular}{@{}lp{.7\textwidth}@{}}
%    option     & meaning \\
%  \hline
%    ltxarrows   & Draw \LaTeX\ style vectors (default). \\
%    pstarrows   & Draw \PSTricks\ style vectors. \\
%  \hline
%  \end{tabular}
%
% \subsubsection{Debugging options}
%
% These options are (mainly) for development and testing purposes.
%
% \noindent
%  \begin{tabular}{@{}lp{.7\textwidth}@{}}
%    option     & meaning \\
%  \hline
%    original   & Suppresses the new definitions. \\
%    debug      & Suppresses the compressing of pdf\TeX\ output;
%                 marks the \textsf{pict2e} generated code in the output
%                 files. \\
%    hide       & Suppresses all graphics output from \textsf{pict2e}. \\
%  \hline
%  \end{tabular}
%
% \subsection{Configuration file}
% \label{sec:cfg-file}
%
% Similar to the \textsf{graphics} and \textsf{color} packages,
% in most cases it is not necessary to give a driver option explicitly
% withe the \cmd{\usepackage} (or \cmd{\RequirePackage}) command,
% if a suitable configuration file \texttt{pict2e.cfg} is present on your
% system (see the example file \texttt{pict2e-example.cfg}).
% On many systems it may be sufficient to copy
% \texttt{pict2e-example.cfg} to \texttt{pict2e.cfg};
% on others you might need to modify your copy to suit your system.
%
% \subsection{Details: Changes to user-level commands}
%
% This section describes the improvements of the new implementation of
% (some of) the \texttt{picture} commands.
% For details, look up ``\texttt{pict2e} package'' in the index of the
% \LaTeX\ manual~\cite{LAMPORT}.
%
% Here's a collection of quotes relevant to the \textsf{pict2e} package
% from the \LaTeX\ manual~\cite{LAMPORT}.
%
% ^^A Indicate Chapter/Section with these quotes ???
%
% From \cite[p.~118]{LAMPORT}:
% \begin{ltxquote}
%   However, the \texttt{pict2e} package uses device-driver support to
%   provide enhanced versions of these commands that remove some of
%   their restrictions.
%   The enhanced commands can draw straight lines and arrows of any
%   slope, circles of any size, and lines (straight and curved) of any
%   thickness.
% \end{ltxquote}
%
% From \cite[p.~179]{LAMPORT}:
% \begin{ltxquote}
%   \begin{description}
%   \item[\texttt{pict2e}]
%     Defines enhanced versions of the \texttt{picture} environment
%     commands that remove restrictions on the line slope, circle
%     radius, and line thickness.
%   \end{description}
% \end{ltxquote}
%
% From \cite[pp.~221--223]{LAMPORT}:
% \begin{ltxquote}
%   \begin{description}
%   \item[\cmd{\qbezier}]\mbox{}\\
%     (With the \texttt{pict2e} package, there is no limit to the
%     number of points plotted.)
%   \item[\cmd{\line}\textrm{ and }\cmd{\vector}]
%     Slopes $\abs x,\abs y \le 6 \mbox{ or } 4$, with no common
%     divisor except $\pm1$:\\
%     (These restrictions are eliminated by the \texttt{pict2e}
%     package.)
%   \item[\cmd{\line}\textrm{ and }\cmd{\vector}]
%     Smallest horizontal extent of sloped lines and vectors that can
%     be drawn:\\
%     (This does not apply when the \texttt{pict2e} package is
%     loaded.)
%   \item[\cmd{\circle}\textrm{ and }\cmd{\circle*}]
%     Largest circles and disks that can be drawn:\\
%     (With the \texttt{pict2e} package, any size circle or disk can
%     be drawn.)
%   \item[\cmd{\oval}]
%     \oarg{rad}:\\
%     An explicit \emph{rad} argument can be used only with the
%     \texttt{pict2e} package; the default value is the radius of the
%     largest quarter-circle \LaTeX\ can draw without the
%     \texttt{pict2e} package.
%   \end{description}
% \end{ltxquote}
%
% \subsubsection{Line}
% \label{sec:usage:line}
%
% \DescribeMacro\line
%  |\line|\parg{X,Y}\marg{LEN}\\
% In the \SL\ implementation the slope arguments \parg{X,Y} are
% restricted to integers in the range $-6 \le X,Y \le +6$, with no
% common divisors except $\pm 1$.
% (I.e., $X$ and $Y$ must be relatively prime.)
% Furthermore, only horizontal and vertical lines can assume arbitrary
% thickness;
% sloped lines are restricted to the widths given by
% the |\thinlines| and |\thicklines| declarations
% (i.e., 0.4pt and 0.8pt, respectively).
%
% From \cite[p.~222]{LAMPORT}:
% \begin{ltxquote}
% These restrictions are eliminated by the \texttt{pict2e} package.
% \end{ltxquote}
%
% However, to avoid overflow of \TeX's integer (dimen) arithmetic,
% the current implementation restricts the slope arguments to
% integers in the range $-1000 \le X,Y \le +1000$, which should be
% enough.
% ^^A ???
%
% Furthermore, unlike the \SL\ implementation, which silently converts
% the ``impossible'' slope to a vertical line extending in the upward
% direction ($(0,0) \mapsto (0,1)$), the \textsf{pict2e} package now
% treats this as an error.
% ^^A ???
%
% In the \SL\ implementation the horizontal extent of sloped lines
% must be at least 10\,pt.
% ^^A exactly or approximately ???
%
% From \cite[p.~222]{LAMPORT}:
% \begin{ltxquote}
% This does not apply when the \texttt{pict2e} package is loaded.
% \end{ltxquote}
%
% Figure~\ref{fig:line} shows the difference between the old and new
% implementations:
% The black lines in the left half of each picture all have slopes
% that conform to the restrictions of \SL.
% However, with the new implementation of \textsf{pict2e} sloped lines
% may assume any arbitrary width given by the |\linethickness|
% declaration.
% The right half demonstrates that now arbitrary slopes are possible.
%
% The blue lines represent ``illegal'' slopes specifications,
% i.e., with common divisors.
% Note the funny effect \SL\ produces in such cases.
% (In \LaTeX\ releases prior to 2003/12/01,
% some such ``illegal'' slopes might even lead to infinite loops!
% Cf.\ problem report latex/3570.)
%
% The new implementation imposes no restriction with respect to line
% thickness, minimal horizontal extent, and slope.
%
% The red lines correspond to angles of \(15^\circ\), \(30^\circ\),
% \(45^\circ\), \(60^\circ\), and \(75^\circ\), respectively.
% This was achieved by multiplying the sine and cosine of each angle
% by 1000 and rounding to the nearest integer, like this:
%\begin{verbatim}
%       \put(50,0){\line(966,259){25}}
%       \put(50,0){\line(866,500){25}}
%       \put(50,0){\line(707,707){25}}
%       \put(50,0){\line(500,866){25}}
%       \put(50,0){\line(259,966){25}}
%\end{verbatim}
%
% \begin{figure}
% \noindent
% \begin{tabular}
%   {@{}>{\centering}p{.5\textwidth}@{}
%       >{\centering}p{.5\textwidth}@{}}
%   \textbf{Original Commands}  &  \textbf{New Commands} \tabularnewline[1ex]
%   \LINETEST[0]                &  \LINETEST
% \end{tabular}
% \caption{Line}
% \label{fig:line}
% \end{figure}
%
% \subsubsection{Vector}
% \label{sec:usage:vector}
%
% \DescribeMacro\vector
%  |\vector|\parg{X,Y}\marg{LEN}\\
% In the \SL\ implementation the slope arguments \parg{X,Y} are
% restricted to integers in the range $-4 \le X,Y \le +4$, with no
% common divisors except $\pm 1$.
% (I.e., $X$ and $Y$ must be relatively prime.)
% Furthermore, arrow heads come only in two shapes, corresponding to
% the |\thinlines| and |\thicklines| declarations.
% (There's also a flaw: the lines will be printed over the arrow
% heads.
% ^^A pr/???
% See vertical vector in Figure~\ref{fig:vector}.)
%
% From \cite[p.~222]{LAMPORT}:
% \begin{ltxquote}
% These restrictions are eliminated by the \texttt{pict2e} package.
% \end{ltxquote}
%
% However, to avoid overflow of \TeX's integer (dimen) arithmetic,
% the current implementation restricts the slope arguments to
% integers in the range $-1000 \le X,Y \le +1000$, which should be
% enough.
% ^^A ???
%
% Furthermore, unlike the \SL\ implementation, which silently converts
% the ``impossible'' slope to a vertical vector extending in the upward
% direction ($(0,0) \mapsto (0,1)$), the \textsf{pict2e} package now
% treats this as an error.
% ^^A ???
%
% In the \SL\ implementation the horizontal extent of sloped vectors
% must be at least 10\,pt.
% ^^A exactly or approximately ???
%
% From \cite[p.~222]{LAMPORT}:
% \begin{ltxquote}
% This does not apply when the \texttt{pict2e} package is loaded.
% \end{ltxquote}
%
% Figure~\ref{fig:vector} shows the difference between the old and new
% implementations:
% The black arrows all have ``legal'' slopes.
% The red arrows have slope arguments out of the range permitted by \SL.
% Slope arguments that are ``illegal'' in \SL\ produce results similar
% to those with the \cmd{\line} command (this has not been
% demonstrated here).
%
% The new implementation imposes no restriction with respect to line
% thickness, minimal horizontal extent, and slope.
%
% As with \SL, the arrow head will always be drawn.
% In particular, only the arrow head will be drawn, if the total length
% of the arrow is less than the length of the arrow head.
% ^^A \SL: only if =0 ???
% See right hand side of Figure~\ref{fig:vector:comparison}.
%
% \begin{figure}
% \noindent
% \begin{tabular}
%   {@{}>{\centering}p{.5\textwidth}@{}
%       >{\centering}p{.5\textwidth}@{}}
%   \textbf{Original Commands}  &  \textbf{New Commands} \tabularnewline[1ex]
%   \VECTORTEST[0]         &  \VECTORTEST[1]
% \end{tabular}
% \caption{Vector}
% \label{fig:vector}
% \end{figure}
%
% The current version of the \textsf{pict2e} package offers two
% variants for the shape of the arrow heads, controlled by package
% options.
% One variant tries to mimic the fonts used in the \SL\
% implementation (package option \textsf{ltxarrows}, the default;
% see Figure~\ref{fig:vector:comparison}, top row),
% though it is difficult to extrapolate from just two design sizes.
% The other one is implemented like the arrows of the \PSTricks\
% package~\cite{PSTRICKS} (package option \textsf{pstarrows};
% see Figure~\ref{fig:vector:comparison}, bottom row).
% ^^A See Figure~\ref{fig:vector:comparison}.
%
% \begin{figure}
% \setlength\unitlength{.004\linewidth}^^A
% \centering
% \begin{picture}(200,100)
%   \put(0,0){\framebox(200,100){}}
%   \linethickness{12\unitlength}
%   \makeatletter \let\pIIe@vector=\pIIe@vector@pst \makeatother
%   \put(15,25){\vector(1,0){100}}
%   \put(185,25){\vector(1,0){0}}
%   \makeatletter \let\pIIe@vector=\pIIe@vector@ltx \makeatother
%   \put(15,75){\vector(1,0){100}}
%   \put(185,75){\vector(1,0){0}}
% \end{picture}
% \caption[Vector: shape variants of the arrow-heads]%
%   {Vector: shape variants of the arrow-heads.
%   Top: \LaTeX\ style vectors.
%   Bottom: \PSTricks\ style vectors.}
% \label{fig:vector:comparison}
% \end{figure}
%
% \subsubsection{Circle and Dot}
% \label{sec:usage:circle+dot}
%
% \DescribeMacro\circle
% \DescribeMacro{\circle*}
%  |\circle|\marg{DIAM}\\
%  |\circle*|\marg{DIAM}\\
% The (hollow) circles and disks (filled circles) of the \SL\ ^^A
% implementation had severe restrictions on the number of different
% diameters and maximum diameters available.
%
% From \cite[p.~222]{LAMPORT}:
% \begin{ltxquote}
% With the \texttt{pict2e} package, any size circle or disk can be
% drawn.
% \end{ltxquote}
%
% \noindent
% With the new implementation there are no more restrictions to the
% diameter argument.
% (However, negative
% ^^A or zero
% diameters are now trapped as an error.)
%
% Furthermore, hollow circles (like sloped lines) can now be drawn
% with any line thickness.
% Figure~\ref{fig:circle-dot} shows the difference.
%
% \begin{figure}
% \noindent
% \begin{tabular}
%   {@{}>{\centering}p{.5\textwidth}@{}
%       >{\centering}p{.5\textwidth}@{}}
%   \textbf{Original Commands}  &  \textbf{New Commands} \tabularnewline[1ex]
%   \CIRCLETEST[0]            &  \CIRCLETEST
% \end{tabular}
% \caption{Circle and Dot}
% \label{fig:circle-dot}
% \end{figure}
%
% \subsubsection{Oval}
% \label{sec:usage:oval}
%
% \DescribeMacro\oval
%  |\oval|\oarg{rad}\parg{X,Y}\oarg{POS}\\
% In the \SL\ implementation, the user has no control over the shape
% of an oval besides its size, since its corners would always consist
% of the ``quarter circles of the largest possible radius less than or
% equal to \emph{rad}''~\cite[p.~223]{LAMPORT}.
%
% From \cite[p.~223]{LAMPORT}:
% \begin{ltxquote}
% An explicit \emph{rad} argument can be used only with the
% \texttt{pict2e} package; the default value is the radius of the
% largest quarter-circle \LaTeX\ can draw without the \texttt{pict2e}
% package.
% \end{ltxquote}
%
% This default value is 20\,pt, a length.
% However, in an early reimplementation of the picture
% commands~\cite{PSPICTURE}, there is such an optional argument too,
% but it is given as a mere number, to be multiplied by |\unitlength|.
%
% Since both alternatives may make sense, we left the choice to the
% user.
% \ (See Figure~\ref{fig:oval:rad:2} for the differences.) \ ^^A
% I.e., this implementation of \cmd{\oval} will ``auto-detect''
% whether its \oarg{rad} argument is a length or a number.
% \DescribeMacro\maxovalrad
% Furthermore, the default value is not hard-wired either;
% the user may access it under the moniker \cmd{\maxovalrad},
% by the means of \cmd{\renewcommand*}.
% (Names or values of length and counter registers may be given as
% well, both as an explicit \oarg{rad} argument and when redefining
% \cmd{\maxovalrad}.)
%
% (Both \oarg{rad} and the default value \cmd{\maxovalrad} are ignored
% in ``standard \LaTeX\ mode'').
%
% The behaviour of |\oval| in the absence of the \oarg{rad} argument
% is shown in Figure~\ref{fig:oval:rad:1}, left half of each picture.
% Note that in the \SL\ implementation there is a minimum radius as
% well (innermost ``salami'' is ``broken'').
% In the right half of each picture, a \oarg{rad} argument has been
% used: it has no effect with the original |\oval| command.
%
% \begin{figure}
% \noindent
% \begin{tabular}
%   {@{}>{\centering}p{.5\textwidth}@{}
%       >{\centering}p{.5\textwidth}@{}}
%   \textbf{Original Commands}   &  \textbf{New Commands}\tabularnewline[1ex]
%   \OVALTESTi[0]           &  \OVALTESTi
% \end{tabular}
% \caption{Oval: Radius argument for \cmd{\oval} vs.\ \cmd{\maxovalrad}}
% \label{fig:oval:rad:1}
% \end{figure}
%
% Both \oarg{rad} and \cmd{\maxovalrad} may be given as an explicit
% (rigid) length (i.e., with unit) or as a number.
% In the latter case the value is used as a factor to multiply by
% \cmd{\unitlength}.
% \ (A length or counter register will do as well, of course.)
%
% If a number is given, the rounded corners of an oval will scale
% according to the current value of \cmd{\unitlength}.
% (See Figure~\ref{fig:oval:rad:2}, first row.)
%
% If a length is specified, the rounded corners of an oval will be the
% same regardless of the current value of \cmd{\unitlength}.
% (See Figure~\ref{fig:oval:rad:2}, second row.)
%
% The default value is 20\,pt as specified for the \oarg{rad}
% argument of \cmd{\oval} by the \LaTeX\ manual \cite[p.~223]{LAMPORT}.
% (See Figure~\ref{fig:oval:rad:2}, third row.)
%
% \bigskip
%
% \begin{figure}
% \centering
% \noindent
% \begin{tabular}{@{}c@{}}
% \textbf{Original Commands},
%  \oarg{rad} or \cmd{\maxovalrad} ignored\\[1ex]
% \OriginalPictureCmds\OVALTESTii{0}\tabularnewline[1ex]\tabularnewline
% \textbf{New Commands},
%  \oarg{rad} or \cmd{\maxovalrad} depends on \cmd{\unitlength}\\[1ex]
% \OVALTESTii{20}\tabularnewline[1ex]\tabularnewline
% \textbf{New Commands},
%  \oarg{rad} or \cmd{\maxovalrad} a fixed length\\[1ex]
% \OVALTESTii{10.44pt}
% \end{tabular}
% \caption[Oval: Radius argument for \cmd{\oval}: length vs.\ number]%
%   {Oval: Radius argument for \cmd{\oval}: length vs.\ number.
%   The number at the centre of each oval gives the relative value of
%   \texttt{\char`\\unitlength}.}
% \label{fig:oval:rad:2}
% \end{figure}
%
% \subsubsection{Bezier Curves}
% \label{sec:usage:bezier-curves}
%
% \DescribeMacro\bezier
% \DescribeMacro\qbezier
% \DescribeMacro\cbezier
% \DescribeMacro\qbeziermax
%  |\bezier|\marg{N}\parg{AX,AY}\parg{BX,BY}\parg{CX,CY}\\
%  |\qbezier|\oarg{N}\parg{AX,AY}\parg{BX,BY}\parg{CX,CY}\\
%  |\cbezier|\oarg{N}\parg{AX,AY}\parg{BX,BY}\parg{CX,CY}\parg{DX,DY}\\
% In \SL, the \emph{N} argument specifies the number of points to
% ^^A ??? off by 1 !!!
% plot, with the maximum defined by \cmd{\qbeziermax}.
% ^^A Cite Lamport !!!
% With \LaTeX\ versions prior to 2003/12/01, the quadratic Bezier
% curves plotted by this package will not match those of the \SL\
% implementation exactly, due to a bug in positioning the dots used to
% produce a curve (cf.~latex/3566).
%
% \cmd{\bezier} is the obsolescent variant from the old
% \textsf{bezier} package of vintage \LaTeX2.09.
%
% The |\cbezier| command draws a cubic Bezier curve;
% see~\cite{EBEZIER}.
% (This is not mentioned in \cite{LAMPORT} and has been added to the
% package deliberately.)
%
% From \cite[p.~221--223]{LAMPORT}:
% \begin{ltxquote}
%   With the \texttt{pict2e} package, there is no limit to the number
%   of points plotted.
% \end{ltxquote}
%
% \noindent
% More accurately, the argument specifying the maximum number of
% points to plot is simply ignored in this new implementation of
% \textsf{pict2e}, as is \cmd{\qbeziermax},
% since the \textsf{pict2e} package uses primitive operators of the
% output (back-end) format, using only the given ``control points''.
% (For details, see the implementation part.)
%
% \begin{figure}
% \noindent
% \begin{tabular}
%   {@{}>{\centering}p{.5\textwidth}@{}
%       >{\centering}p{.5\textwidth}@{}}
%   \textbf{Original Commands}  &  \textbf{New Commands} \tabularnewline[1ex]
%   \QBEZIERTEST[0]           &  \QBEZIERTEST
% \end{tabular}
% \caption{Quadratic Bezier curves}
% \label{fig:qbezier2}
% \end{figure}
%
% \begin{figure}
% \noindent
% \begin{tabular}
%   {@{}>{\centering}p{.5\textwidth}@{}
%       >{\centering}p{.5\textwidth}@{}}
%   \textbf{Original Commands}  &  \textbf{New Commands} \tabularnewline[1ex]
%   \IfFileExists{ebezier.sty}{\CBEZIERTEST[0]}{%
%   \begin{slshape}^^A
%     Note:
%     Since the \textsf{ebezier} package is not installed on your system,
%     the `original' \cmd{\cbezier} command can't be used here.\par
%   \end{slshape}} & \CBEZIERTEST
% \end{tabular}
% \caption{Cubic Bezier curves}
% \label{fig:cbezier}
% \end{figure}
%
% \begin{figure}
% \noindent
% \begin{tabular}
%   {@{}>{\centering}p{.5\textwidth}@{}
%       >{\centering}p{.5\textwidth}@{}}
%   \textbf{Original Commands}  &  \textbf{New Commands} \tabularnewline[1ex]
%   \IfFileExists{ebezier.sty}{\QCBEZIERTEST[0]}{%
%   \begin{slshape}^^A
%     Note:
%     Since the \textsf{ebezier} package is not installed on your system,
%     the `original' \cmd{\cbezier} command can't be used here.\par
%   \end{slshape}} & \QCBEZIERTEST
% \end{tabular}
% \caption{Quadratic (green) and Cubic Bezier curves}
% \label{fig:qcbezier}
% \end{figure}
%
% \StopEventually{^^A
% \Acknowledgements
% ^^A \typeout{!!!
% ^^A   \ifx\Finale\relax \string\OnlyDescription
% ^^A   \else             \string\AlsoImplementation \fi}^^A
% ^^A Dirty Hack:
% \ifx\Finale\relax ^^A \OnlyDescription
% \begin{thebibliography}{9}
% \raggedright
%
% \bibitem{LAMPORT} Leslie Lamport: \textit{\LaTeX\ -- A Document
%             Preparation System}, 2nd ed., 1994
%
% \bibitem{PSTRICKS} Timothy Van Zandt: \textit{The pstricks bundle.}
%    \texttt{CTAN:~graphics/pstricks/}, 1993, 1994, 2000
%
% \bibitem{PSPICTURE} David Carlisle: \textit{The pspicture package.}
%    \texttt{CTAN:~macros/latex/contrib/carlisle/}, 1992
%
% \bibitem{EBEZIER} Gerhard A. Bachmaier: \textit{The ebezier package.}
%    \texttt{CTAN:~macros/latex/contrib/ebezier/}, 2002
%
% \end{thebibliography}^^A
%\else ^^A \AlsoImplementation
% \begin{thebibliography}{9}
% \raggedright
%
% \bibitem{LAMPORT} Leslie Lamport: \textit{\LaTeX\ -- A Document
%             Preparation System}, 2nd ed., 1994
%
% \bibitem{COMPANION} Michel Goossens, Frank Mittelbach, Alexander
%   Samarin: \textit{The \LaTeX\ Companion}, 1993
%
% \bibitem{EBEZIER} Gerhard A. Bachmaier: \textit{The ebezier package.}
%    \texttt{CTAN:~macros/latex/contrib/ebezier/}, 2002
%
% \bibitem{PICTEX} Michael Wichura: \textit{The PiC\TeX\ package.}
%    \texttt{CTAN:~graphics/pictex}, 1987
%
% \bibitem{PSPICTURE} David Carlisle: \textit{The pspicture package.}
%    \texttt{CTAN:~macros/latex/contrib/carlisle/}, 1992
%
% \bibitem{TRIG} David Carlisle: \textit{The trig package.}
%    \texttt{CTAN:~macros/latex/required/graphics/}, 1999
%
% \bibitem{PSPIC} Kresten Krab Thorup: \textit{The pspic package.}
%    \texttt{CTAN:~macros/latex209/contrib/misc/}, 1991
%
% \bibitem{PSTRICKS} Timothy Van Zandt: \textit{The pstricks bundle.}
%    \texttt{CTAN:~graphics/pstricks/}, 1993, 1994, 2000
%
%    ^^A Wichura@Galton.Uchicago.EDU
%
% \end{thebibliography}
%
% \PrintChanges
% \PrintIndex
%
%\fi
% } ^^A \StopEventually
%
% ^^A
% \clearpage
%
% \section{Implementation}
%
% ^^A cite some of these packages !!! ???
% Unlike other packages that have reimplemented or extended some of
% the commands from \SL's \texttt{picture} environment,
%  we do not use special fonts,
%  nor draw arbitrary shapes by the means of myriads of small (point)
%  characters,
%  nor do we use sophisticated programming in some back-end
%  programming language.
%
% In its present state, this implementation supports just \PS\ and
% \PDF\ as back-end formats.
% It just calculates the necessary control points and uses primitive
% path drawing operators.
%
%    \begin{macrocode}
%<*package>
%    \end{macrocode}
%
% \subsection{Initialisation}
%
% \begin{macro}{\Gin@codes}
% First we save the catcodes of some characters, and set them to
% fixed values whilst this file is being read.
% \changes{v0.2o}{2004/06/25}
%     {Save and restore catcodes (HjG)}
% (This is done in almost the same manner as in the \textsf{graphics}
% and \textsf{color} packages. Alas, we don't need nor want to have
% |*| as part of control sequence names, so we omit it here.)
%    \begin{macrocode}
\edef\Gin@codes{%
 \catcode`\noexpand\^^A\the\catcode`\^^A\relax
 \catcode`\noexpand\"\the\catcode`\"\relax
% \catcode`\noexpand\*\the\catcode`\*\relax
 \catcode`\noexpand\!\the\catcode`\!\relax
 \catcode`\noexpand\:\the\catcode`\:\relax}
%    \end{macrocode}
%
%    \begin{macrocode}
\catcode`\^^A=\catcode`\%
\@makeother\"%
% \catcode`\*=11
\@makeother\!%
\@makeother\:%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Preliminaries}
%
% \begin{macro}{\pIIe@mode}
% \begin{macro}{\pIIe@code}
% \begin{macro}{\Gin@driver}
% The first two of these commands determine how the \textsf{pict2e}
% package works internally;
% they should be defined properly by the
% |p2e-|\meta{driver}\linebreak[0]|.def|
% files.
% (See file \texttt{p2e-drivers.dtx} for details and sample
% implementations.)
%
% The latter command is well known from the \textsf{graphics} and
% \textsf{color} packages from the \SL\ graphics bundle;
% it should be set by a package option---most likely in a (system
% dependent) configuration file \texttt{pict2e.cfg}.
% (File \texttt{p2e-drivers.dtx} contains an example configuration
% file suitable for the \teTeX\ and \TeXlive\ distributions;
% it will be extracted as \texttt{pict2e-example.cfg}.)
%    \begin{macrocode}
\newcommand*\pIIe@mode{-1}
\newcommand*\pIIe@code[1]{}
\providecommand*\Gin@driver{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\pIIe@tempa}
% \begin{macro}{\pIIe@tempb}
% \begin{macro}{\pIIe@tempc}
% At times, we need some temporary storage bins.
% However, we only use some macros and do not allocate any new
% registers; the ``superfluous'' ones from the picture module of the
% kernel (|ltpictur.dtx|) and the general scratch registers should
% suffice.
% ^^A (This leads to somewhat vulnerable code below!)
%    \begin{macrocode}
\newcommand*\pIIe@tempa{}
\newcommand*\pIIe@tempb{}
\newcommand*\pIIe@tempc{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Option processing}
%
% The driver options are not much of a surprise:
% they are similar to those of the \textsf{graphics} and
% \textsf{color} packages.
%    \begin{macrocode}
\DeclareOption{dvips}{\def\Gin@driver{dvips.def}}
\DeclareOption{xdvi}{\ExecuteOptions{dvips}}
\DeclareOption{dvipdf}{\def\Gin@driver{dvipdf.def}}
\DeclareOption{dvipdfm}{\def\Gin@driver{dvipdfm.def}}
\DeclareOption{pdftex}{\def\Gin@driver{pdftex.def}}
\DeclareOption{dvipsone}{\def\Gin@driver{dvipsone.def}}
\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
\DeclareOption{oztex}{\ExecuteOptions{dvips}}
\DeclareOption{textures}{\def\Gin@driver{textures.def}}
\DeclareOption{pctexps}{\def\Gin@driver{pctexps.def}}
\DeclareOption{pctex32}{\def\Gin@driver{pctex32.def}}
\DeclareOption{vtex}{\def\Gin@driver{vtex.def}}
%    \end{macrocode}
% Request ``original'' \LaTeX\ mode.
% ^^A Emulation. To be implemented yet.
%    \begin{macrocode}
\DeclareOption{original}{\def\pIIe@mode{0}}
%    \end{macrocode}
% Arrow shape options.
% The values for \LaTeX-style arrows are ``hand optimized'';
% they should be regarded as experimental,
% i.e., they may change in future versions of this package.
% The values for \PSTricks-style arrows are the default ones used by
% that bundle.
% If the \textsf{pstricks} package is actually loaded, then
% \textsf{pict2e} will obey the current values of the corresponding
% internal \PSTricks\ parameters;
% this feature should be regarded as experimental,
% i.e., it may change in future versions of this package.
%    \begin{macrocode}
\DeclareOption{ltxarrows}{\AtEndOfPackage{%
  \let\pIIe@vector=\pIIe@vector@ltx
  \def\pIIe@FAL{1.52}%
  \def\pIIe@FAW{3.2}%
  \def\pIIe@CAW{1.5pt}%
  \def\pIIe@FAI{0.25}%
  }}
\DeclareOption{pstarrows}{\AtEndOfPackage{%
  \let\pIIe@vector=\pIIe@vector@pst
  \def\pIIe@FAL{1.4}%
  \def\pIIe@FAW{2}%
  \def\pIIe@CAW{1.5pt}%
  \def\pIIe@FAI{0.4}%
  }}
%    \end{macrocode}
%
% \begin{macro}{\pIIe@debug@comment}
% This makes debugging easier.
%    \begin{macrocode}
\newcommand*\pIIe@debug@comment{}
\DeclareOption{debug}{%
  \def\pIIe@debug@comment{^^J^^J\@percentchar\space >>> pict2e <<<^^J}%
  \begingroup
    \@ifundefined{pdfcompresslevel}{}{\global\pdfcompresslevel\z@}%
  \endgroup}
%    \end{macrocode}
% \end{macro}
% A special variant of debugging. (Obsolescent? Once used for
% performance measurements: arctan vs.\ pyth-add versions of
% \cmd{\vector}.)
%    \begin{macrocode}
\DeclareOption{hide}{\AtEndOfPackage{%
%  \def\pIIe@code#1{}%
  \let\pIIe@code\@gobble
}}
%    \end{macrocode}
% Unknown options default to mode ``original.''
%    \begin{macrocode}
\DeclareOption*{\ExecuteOptions{original}}
%    \end{macrocode}
% By default, arrows are in the \LaTeX\ style.
%    \begin{macrocode}
\ExecuteOptions{ltxarrows}
%    \end{macrocode}
% Like the \textsf{graphics} and \textsf{color} packages, we support a
% configuration file. (See file \texttt{p2e-drivers.dtx} for details
% and an example.)
%    \begin{macrocode}
\InputIfFileExists{pict2e.cfg}{}{}
%    \end{macrocode}
% This now should make clear which ``mode'' and ``code'' we should use.
%    \begin{macrocode}
\ProcessOptions\relax
%    \end{macrocode}
%
% \subsection{Output driver check}
%
%    \begin{macrocode}
\ifnum\pIIe@mode=\z@
  \PackageInfo{pict2e}{Package option `original' requested}
\else
%    \end{macrocode}
% This code fragment is more or less cloned from the
% \textsf{graphics} and \textsf{color} packages.
%    \begin{macrocode}
  \if!\Gin@driver!
    \PackageError{pict2e}
      {No driver specified at all}
      {You should make a default driver option in a file\MessageBreak
       pict2e.cfg\MessageBreak eg: \protect\ExecuteOptions{dvips}}%
  \else
    \PackageInfo{pict2e}{Driver file: \Gin@driver}
    \@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{}
    \PackageInfo{pict2e}{Driver file for pict2e: p2e-\Gin@driver}
    \InputIfFileExists{p2e-\Gin@driver}{}{%
      \PackageError{pict2e}%
        {Driver file ``p2e-\Gin@driver'' not found}%
        {Q: Is the file properly installed? A: No!}}
  \fi
\fi
%    \end{macrocode}
%
% \subsection{Mode check}
%
% For \PS\ and \PDF\ modes.
%    \begin{macrocode}
\ifnum\pIIe@mode>\z@
  \ifnum\pIIe@mode<\thr@@
    \RequirePackage{trig}
%    \end{macrocode}
%
% \begin{macro}{\pIIe@oldline}
% \begin{macro}{\pIIe@old@sline}
% \begin{macro}{\pIIe@oldvector}
% \begin{macro}{\pIIe@old@circle}
% \begin{macro}{\pIIe@old@dot}
% \begin{macro}{\pIIe@old@bezier}
% \begin{macro}{\pIIe@old@cbezier}
% \begin{macro}{\pIIe@oldoval}
% \begin{macro}{\pIIe@old@oval}
% Saved versions of some macros. (Or dummy definitions.)
%    \begin{macrocode}
    \let\pIIe@oldline\line
    \let\pIIe@old@sline\@sline
    \let\pIIe@oldvector\vector
    \let\pIIe@old@circle\@circle
    \let\pIIe@old@dot\@dot
    \let\pIIe@old@bezier\@bezier
    \AtBeginDocument{%
      \@ifundefined{@cbezier}{%
        \def\pIIe@old@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){}%
        }{\let\pIIe@old@cbezier\@cbezier}}
    \let\pIIe@oldoval\oval
    \let\pIIe@old@oval\@oval
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\OriginalPictureCmds}
% Switches back to the original definitions;
% for testing and demonstration purposes only.
%    \begin{macrocode}
    \newcommand*\OriginalPictureCmds{%
      \let\@sline\pIIe@old@sline
      \let\line\pIIe@oldline
      \let\vector\pIIe@oldvector
      \let\@circle\pIIe@old@circle
      \let\@dot\pIIe@old@dot
      \let\@bezier\pIIe@old@bezier
      \let\@cbezier\pIIe@old@cbezier
      \renewcommand*\oval[1][]{\pIIe@oldoval}%
      \let\@oval\pIIe@old@oval
    }
%    \end{macrocode}
% \end{macro}
% Overambitious drivers.
%    \begin{macrocode}
  \else
    \PackageError{pict2e}
      {Unsupported mode (\pIIe@mode) specified}
      {The driver you specified requested a mode\MessageBreak
       not supported by this version of this package}
  \fi
%    \end{macrocode}
% Incapable drivers.
%    \begin{macrocode}
\else
  \ifnum\pIIe@mode<\z@
    \PackageError{pict2e}
      {No suitable driver specified}
      {You should make a default driver option in a file\MessageBreak
       pict2e.cfg\MessageBreak eg: \protect\ExecuteOptions{dvips}}
  \fi
\fi
%    \end{macrocode}
% Big switch,\label{big-switch-begin}
% completed near the end of the package
% (see page~\pageref{big-switch-end}).
%    \begin{macrocode}
\ifnum\pIIe@mode>\z@
%    \end{macrocode}
%
% \subsection{Graphics operators}
%
% The following definitions allow the \PS\ and \PDF\ operations below
% to share some of the code.
%    \begin{macrocode}
\ifcase\pIIe@mode\relax
%    \end{macrocode}
%
% \begin{macro}{\pIIe@moveto@op}
% \begin{macro}{\pIIe@lineto@op}
% \begin{macro}{\pIIe@setlinewidth@op}
% \begin{macro}{\pIIe@stroke@op}
% \begin{macro}{\pIIe@fill@op}
% \begin{macro}{\pIIe@curveto@op}
% \begin{macro}{\pIIe@concat@op}
% \PS
%    \begin{macrocode}
\or
  \newcommand*\pIIe@moveto@op{moveto}
  \newcommand*\pIIe@lineto@op{lineto}
  \newcommand*\pIIe@setlinewidth@op{setlinewidth}
  \newcommand*\pIIe@stroke@op{stroke}
  \newcommand*\pIIe@fill@op{fill}
  \newcommand*\pIIe@curveto@op{curveto}
  \newcommand*\pIIe@concat@op{concat}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\pIIe@moveto@op}
% \begin{macro}{\pIIe@lineto@op}
% \begin{macro}{\pIIe@setlinewidth@op}
% \begin{macro}{\pIIe@stroke@op}
% \begin{macro}{\pIIe@fill@op}
% \begin{macro}{\pIIe@curveto@op}
% \begin{macro}{\pIIe@concat@op}
% \PDF
%    \begin{macrocode}
\or
  \newcommand*\pIIe@moveto@op{m}
  \newcommand*\pIIe@lineto@op{l}
  \newcommand*\pIIe@setlinewidth@op{w}
  \newcommand*\pIIe@stroke@op{S}
  \newcommand*\pIIe@fill@op{f}
  \newcommand*\pIIe@curveto@op{c}
  \newcommand*\pIIe@concat@op{cm}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \noindent
% (Currently, there are no other modes.)
%    \begin{macrocode}
\fi
%    \end{macrocode}
%
% \subsection{Low-level operations}
%
% \subsubsection{Collecting the graphics instructions and handling the output}
%
% \begin{macro}{\pIIe@GRAPH}
% \begin{macro}{\pIIe@addtoGraph}
% \changes{v0.1h}{2003/08/27}{Added newline code (to be improved eventually).
%    (RN,HjG)}
% We collect all \PS\slash\PDF\ output code for a single picture
% object in a token register.
%    \begin{macrocode}
  \@ifdefinable\pIIe@GRAPH{\newtoks\pIIe@GRAPH}
  \newcommand*\pIIe@addtoGraph[1]{%
    \begingroup
      \edef\x{\the\pIIe@GRAPH\space#1}%
      \global\pIIe@GRAPH\expandafter{\x}%
    \endgroup}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\pIIe@fillGraph}
% The path will either be filled \dots
%    \begin{macrocode}
  \newcommand*\pIIe@fillGraph{\begingroup \@tempswatrue\pIIe@drawGraph}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@strokeGraph}
% \dots\ or stroked.
%    \begin{macrocode}
  \newcommand*\pIIe@strokeGraph{\begingroup \@tempswafalse\pIIe@drawGraph}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@drawGraph}
% Common code.
% When we are done with collecting the path of the picture object, we
% output the contents of the token register.
%
% \changes{v0.1d}{2003/07/22}{``gsave/grestore'' added. (RN)}
% \changes{v0.1g}{2003/08/23}{``gsave/grestore'' removed. (RN)}
% \changes{v0.1i}{2003/08/28}{``gsave/grestore'' restored for PDF
%   (see `p2e-drivers.dtx'). (RN)}
%    \begin{macrocode}
  \newcommand*\pIIe@drawGraph{%
      \edef\x{\pIIe@debug@comment\space
%    \end{macrocode}
% Instead of scaling individual coordinates, we scale the graph as a whole
% (pt$\rightarrow$bp);
% see Section~\ref{sec:implementation:transformations}.
%    \begin{macrocode}
              \pIIe@scale@PTtoBP}%
      \if@tempswa
        \edef\y{\pIIe@fill@op}%
      \else
        \edef\x{\x\space\strip@pt\@wholewidth
          \space\pIIe@setlinewidth@op}%
        \edef\y{\pIIe@stroke@op}%
      \fi
      \expandafter\pIIe@code\expandafter{%
        \expandafter\x\the\pIIe@GRAPH\space\y}%
%    \end{macrocode}
% \changes{v0.1u}{2003/11/19}{Clear current point after output (HjG)}
% Clear the graph and the current point after output.
%    \begin{macrocode}
      \global\pIIe@GRAPH{}\xdef\pIIe@CPx{}\xdef\pIIe@CPy{}%
    \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Auxilliary macros}
%
% The following macros save us a plethora of tokens in subsequent code.
%
% Note that since we are using \cmd{\@tempdima} and \cmd{\@tempdimb}
% both here and in medium-level macros below, we must be careful not
% to spoil their values.
%
% \begin{macro}{\pIIe@CPx}
% \begin{macro}{\pIIe@CPy}
% \begin{macro}{\pIIe@add@CP}
% \changes{v0.1u}{2003/11/21}{%
%        Rename \cmd{\pIIe@add@XY} to \cmd{\pIIe@add@CP} (HjG)}
% The lengths (coordinates) given as arguments will be stored as
% ``real'' numbers using the common trick; i.e., they are put in
% `dimen' registers, scaled by $2^{16}$.
% At the same time, we remember the ``current point.''
% (Not strictly necessary for \PS, but for some operations in \PDF,
% e.g., \textsl{rcurveto} emulation.)
%    \begin{macrocode}
  \newcommand*\pIIe@CPx{} \newcommand*\pIIe@CPy{}
  \newcommand*\pIIe@add@CP[2]{%
    \begingroup
      \@tempdima#1\xdef\pIIe@CPx{\the\@tempdima}%
      \@tempdimb#2\xdef\pIIe@CPy{\the\@tempdimb}%
      \pIIe@addtoGraph{\strip@pt\@tempdima\space\strip@pt\@tempdimb}%
    \endgroup}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\pIIe@add@nums}
% Similar, but does not set the ``current point.''
% Values need not be coordinates (e.g., may be scaling factors, etc.).
%    \begin{macrocode}
  \newcommand*\pIIe@add@nums[2]{%
    \begingroup
      \@tempdima#1\relax
      \@tempdimb#2\relax
      \pIIe@addtoGraph{\strip@pt\@tempdima\space\strip@pt\@tempdimb}%
    \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@add@num}
% Likewise, for a single argument.
%    \begin{macrocode}
  \newcommand*\pIIe@add@num[1]{%
    \begingroup
      \@tempdima#1\relax
      \pIIe@addtoGraph{\strip@pt\@tempdima}%
    \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Medium-level operations}
%
% \subsubsection{Transformations}
% \label{sec:implementation:transformations}
%
% Transformation operators; not all are currently used.
% (Hence, some are untested.)
%
% \begin{macro}{\pIIe@PTtoBP}
% Scaling factor, used below.
% ``pt$\rightarrow$bp'' ($72 / 72.27 \approx 0.99626401$).
% Note the trailing space!
% (Don't delete it, it saves us some tokens.)
%    \begin{macrocode}
  \newcommand*\pIIe@PTtoBP{0.99626401 }
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\ifcase\pIIe@mode\relax
%    \end{macrocode}
%
% \begin{macro}{\pIIe@concat}
% \begin{macro}{\pIIe@translate}
% \begin{macro}{\pIIe@rotate}
% \begin{macro}{\pIIe@scale}
% \begin{macro}{\pIIe@scale@PTtoBP}
% \PS: Use some operators directly.
%    \begin{macrocode}
\or
  \newcommand*\pIIe@concat[6]{%
    \begingroup
      \pIIe@addtoGraph{[}%
      \@tempdima#1\relax \@tempdimb#2\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#3\relax \@tempdimb#4\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#5\relax \@tempdimb#6\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \pIIe@addtoGraph{] \pIIe@concat@op}%
    \endgroup}
  \newcommand*\pIIe@translate[2]{\pIIe@add@nums{#1}{#2}\pIIe@addtoGraph{translate}}
  \newcommand*\pIIe@rotate[1]{\pIIe@add@num{#1}\pIIe@addtoGraph{rotate}}
  \newcommand*\pIIe@scale[2]{\pIIe@add@nums{#1}{#2}\pIIe@addtoGraph{scale}}
  \newcommand*\pIIe@scale@PTtoBP{\pIIe@PTtoBP \pIIe@PTtoBP scale}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\pIIe@concat}
% \begin{macro}{\pIIe@translate}
% \begin{macro}{\pIIe@rotate}
% \begin{macro}{\pIIe@scale}
% \begin{macro}{\pIIe@scale@PTtoBP}
% \PDF: Emulate. \mbox{\texttt{:-(}}
%    \begin{macrocode}
\or
  \newcommand*\pIIe@concat[6]{%
    \begingroup
      \@tempdima#1\relax \@tempdimb#2\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#3\relax \@tempdimb#4\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#5\relax \@tempdimb#6\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \pIIe@addtoGraph\pIIe@concat@op
    \endgroup}
  \newcommand*\pIIe@translate[2]{\pIIe@concat\p@\z@\z@\p@{#1}{#2}}
  \newcommand*\pIIe@rotate[1]{%
    \begingroup
      \@tempdima#1\relax
      \edef\pIIe@tempa{\strip@pt\@tempdima}%
      \CalculateSin\pIIe@tempa
      \CalculateCos\pIIe@tempa
      \edef\pIIe@tempb{\UseSin\pIIe@tempa}%
      \edef\pIIe@tempc{\UseCos\pIIe@tempa}%
      \pIIe@concat{\pIIe@tempc\p@}{\pIIe@tempb\p@}%
        {-\pIIe@tempb\p@}{\pIIe@tempc\p@}\z@\z@
    \endgroup}
  \newcommand*\pIIe@scale[2]{\pIIe@concat{#1}\z@\z@{#2}\z@\z@}
  \newcommand*\pIIe@scale@PTtoBP{\pIIe@PTtoBP 0 0 \pIIe@PTtoBP 0 0 \pIIe@concat@op}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \noindent
% (Currently, there are no other modes.)
%    \begin{macrocode}
\fi
%    \end{macrocode}
%
% \subsubsection{Path definitions}
% \label{sec:implementation:path-definitions}
%
% \begin{macro}{\pIIe@moveto}
% Simple things \dots
%    \begin{macrocode}
  \newcommand*\pIIe@moveto[2]{%
      \pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@moveto@op}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@lineto}
% \dots\ have to be defined, too.
%    \begin{macrocode}
  \newcommand*\pIIe@lineto[2]{%
      \pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@lineto@op}
%    \end{macrocode}
% \end{macro}
%
% \noindent
% We'll use \cmd{\pIIe@rcurveto} to draw quarter circles.
% (\cmd{\circle} and \cmd{\oval}).
%    \begin{macrocode}
\ifcase\pIIe@mode\relax
%    \end{macrocode}
%
% \begin{macro}{\pIIe@rcurveto}
% \PS:
% Use the ``rcurveto'' operator directly.
%    \begin{macrocode}
\or
  \newcommand*\pIIe@rcurveto[6]{%
    \begingroup
      \@tempdima#1\relax \@tempdimb#2\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#3\relax \@tempdimb#4\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#5\relax \@tempdimb#6\relax
      \pIIe@add@CP\@tempdima\@tempdimb
      \pIIe@addtoGraph{rcurveto}%
    \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@rcurveto}
% \PDF:
% It's necessary to emulate the \PS\ operator ``rcurveto''.
% For this, the ``current point'' must be known, i.e., all macros which
% change the ``current point'' must set \cmd{\pIIe@CPx} and
% \cmd{\pIIe@CPy}.
%    \begin{macrocode}
\or
  \newcommand*\pIIe@rcurveto[6]{%
    \begingroup
      \@tempdima#1\advance\@tempdima\pIIe@CPx\relax
      \@tempdimb#2\advance\@tempdimb\pIIe@CPy\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#3\advance\@tempdima\pIIe@CPx\relax
      \@tempdimb#4\advance\@tempdimb\pIIe@CPy\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#5\advance\@tempdima\pIIe@CPx\relax
      \@tempdimb#6\advance\@tempdimb\pIIe@CPy\relax
      \pIIe@add@CP\@tempdima\@tempdimb
      \pIIe@addtoGraph\pIIe@curveto@op
    \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \noindent
% (Currently, there are no other modes.)
%    \begin{macrocode}
\fi
%    \end{macrocode}
%
% \begin{macro}{\pIIe@curveto}
% This is currently only used for Bezier curves and for drawing the
% heads of \LaTeX-like arrows.
% Note: It's the same for \PS\ and \PDF.
%    \begin{macrocode}
  \newcommand*\pIIe@curveto[6]{%
    \begingroup
      \@tempdima#1\relax \@tempdimb#2\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#3\relax \@tempdimb#4\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#5\relax \@tempdimb#6\relax
      \pIIe@add@CP\@tempdima\@tempdimb
      \pIIe@addtoGraph\pIIe@curveto@op
    \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \subsection{``Pythagorean Addition'' and Division}
%
% \begin{macro}{\pIIe@pyth}
% This algorithm is copied from the \PiCTeX\ package
% \cite{PICTEX} by Michael Wichura, with his permission
% ^^A (cite Email!?).
%
% Here is his description:
% \begin{quote}
% Suppose $x>0$, $y>0$.
% Put $s = x+y$. Let $z = (x^2+y^2)^{1/2}$.
% Then $z = s\times f$, where
% \[
%   f = (t^2 + (1-t)^2)^{1/2} = ((1+\tau^2)/2)^{1/2}
% \]
% and $t = x/s$  and  $\tau = 2(t-1/2)$.
% \end{quote}
%    \begin{macrocode}
\newcommand*\pIIe@pyth[3]{%
  \begingroup
    \@tempdima=#1\relax
%    \end{macrocode}
% $\cmd{\@tempdima}=\mathrm{abs}(x)$
%    \begin{macrocode}
    \ifnum\@tempdima<\z@\@tempdima=-\@tempdima\fi
    \@tempdimb=#2\relax
%    \end{macrocode}
% $\cmd{\@tempdimb}=\mathrm{abs}(y)$
%    \begin{macrocode}
    \ifnum\@tempdimb<\z@\@tempdimb=-\@tempdimb\fi
%    \end{macrocode}
% $\cmd{\@tempdimb} = s = \mathrm{abs}(x)+\mathrm{abs}(y)$
%    \begin{macrocode}
    \advance\@tempdimb\@tempdima
    \ifnum\@tempdimb=\z@
%    \end{macrocode}
% $\cmd{\@tempdimc} = z = \sqrt{(x^2+y^2)}$
%    \begin{macrocode}
      \global\@tempdimc=\z@
    \else
%    \end{macrocode}
% $\cmd{\@tempdima} = 8 \times\mathrm{abs}(x)$
%    \begin{macrocode}
      \multiply\@tempdima 8\relax
%    \end{macrocode}
% $\cmd{\@tempdimc} = 8\,t = 8 \times\mathrm{abs}(x) / s$
%    \begin{macrocode}
      \pIIe@@divide\@tempdima\@tempdimb
%    \end{macrocode}
% $\cmd{\@tempdimc} = 4\tau = (8\,t-4)$
%    \begin{macrocode}
      \advance\@tempdimc -4pt
      \multiply\@tempdimc 2
      \edef\pIIe@tempa{\strip@pt\@tempdimc}%
%    \end{macrocode}
% $\cmd{\@tempdima} = (8\,\tau)^2$
%    \begin{macrocode}
      \@tempdima=\pIIe@tempa\@tempdimc
%    \end{macrocode}
% $\cmd{\@tempdima} = [64+(8\,\tau)^2]/2 =(8\,f)^2$
%    \begin{macrocode}
      \advance\@tempdima 64pt
      \divide\@tempdima 2\relax
%    \end{macrocode}
% initial guess at $\sqrt{(u)}$
%    \begin{macrocode}
      \@dashdim=7pt
%    \end{macrocode}
% $\cmd{\@dashdim} = \sqrt{(u)}$
%    \begin{macrocode}
      \pIIe@@pyth\pIIe@@pyth\pIIe@@pyth
      \edef\pIIe@tempa{\strip@pt\@dashdim}%
      \@tempdimc=\pIIe@tempa\@tempdimb
%    \end{macrocode}
% $\cmd{\@tempdimc} = z = (8\,f)\times s / 8$
%    \begin{macrocode}
      \global\divide\@tempdimc 8
    \fi
  \endgroup
  #3=\@tempdimc}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@@pyth}
% $\cmd{\@dashdim} = g \leftarrow (g + u/g)/2$
%    \begin{macrocode}
\newcommand*\pIIe@@pyth{%
  \pIIe@@divide\@tempdima\@dashdim
  \advance\@dashdim\@tempdimc
  \divide\@dashdim\tw@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@@divide}
% This division algorithm is similar to the one used for the tangent
% in the \textsf{trig} package~\cite{TRIG}.
% It does not allow large arguments. ^^A ???
% A~very small denominator argument leads to division by zero.
%    \begin{macrocode}
\newcommand*\pIIe@@divide[2]{%
%    \end{macrocode}
% $2^{16}$ (sp)
%    \begin{macrocode}
  \@tempcnta\p@
%    \end{macrocode}
% $2^{30} > \cmd{\maxdimen}$ !
%    \begin{macrocode}
  \multiply\@tempcnta\two@fourteen
  \@clnwd#2\relax
  \divide\@clnwd\@iv
  \divide\@tempcnta\@clnwd
  \@clnht\@tempcnta sp\relax
  \@clnwd#1\relax
  \@tempdimc\strip@pt\@clnwd\@clnht}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@divide}
% Improve this documentation!
% \[
%   \mbox{\#3} =
%   \frac{2^{30}\cdot \mbox{\#1}}{2^{-2}\cdot \mbox{\#2} \cdot 2^{16}}
% \]
% (The factor \(2^{16}\) is implied by \TeX's division.)
%    \begin{macrocode}
\newcommand*\pIIe@divide[3]{%
  \pIIe@@divide{#1}{#2}%
  #3=\@tempdimc}
%    \end{macrocode}
% \end{macro}
%
% \subsection{High-level operations}
%
% \begin{macro}{\pIIe@checkslopeargs}
%  \changes{v0.2o}{2004/06/25}{Macro added (HjG)}
% Common code for \cmd{\line} and \cmd{\vector}.
%    \begin{macrocode}
\newcommand*\pIIe@checkslopeargs{%
%    \end{macrocode}
% Missing macro: \cmd{\@abs}\marg{val} -- should be in the kernel!
%\begin{verbatim}
%\def\@abs#1{\ifnum#1<\z@-\fi#1}
%\end{verbatim}
% It would save a plethora of tokens here and in other packages
% and even in the kernel itself
% (e.g., cf.\ \cmd{\vector} in \texttt{ltpictur.dtx}).
% Should we define it in this package?
%    \begin{macrocode}
    \ifnum\ifnum\@xarg<\z@-\fi\@xarg>\@m \@badlinearg \fi
    \ifnum\ifnum\@yarg<\z@-\fi\@yarg>\@m \@badlinearg \fi
%    \end{macrocode}
% A bit incompatible with \SL:
% slope \((0,0)\) raises an error.
%    \begin{macrocode}
    \ifnum\@xarg=\z@ \ifnum\@yarg=\z@ \@badlinearg \fi\fi}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Line}
% \label{sec:implementation:line}
%
% \begin{macro}{\line}
% \changes{v0.2l}{2004/04/08}{Macro added (RNH/HjG)}
% \cmd{\line}\parg{x,y}\marg{$l_x$}:
% \changes{v0.2o}{2004/06/25}{Use \cmd{\pIIe@checkslopeargs} (HjG)}
%    \begin{macrocode}
  \def\line(#1,#2)#3{%
    \@xarg #1\relax \@yarg #2\relax
    \@linelen #3\unitlength
    \pIIe@checkslopeargs
    \ifdim\@linelen<\z@\@badlinearg\else
      \ifnum\@xarg =\z@ \@vline
      \else
        \ifnum\@yarg =\z@ \@hline \else \@sline\fi
      \fi
    \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@sline}
% (The implementation here is different from \cmd{\vector}!)
%    \begin{macrocode}
  \def\@sline{%
    \begingroup
      \ifnum\@xarg<\z@\@linelen-\@linelen\fi
      \pIIe@divide{\@yarg\p@}{\@xarg\p@}\dimen@
      \@ydim=\strip@pt\dimen@\@linelen
      \pIIe@moveto\z@\z@
      \pIIe@lineto\@linelen\@ydim
      \pIIe@strokeGraph
    \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Vector}
% \label{sec:implementation:vector}
%
% \begin{macro}{\vector}
% Unlike \cmd{\line}, \cmd{\vector} must be redefined, because
% the kernel version checks for illegal slope arguments.
%
% \cmd{\vector}\parg{x,y}\marg{$l_x$}:
% Instead of calculating \(\theta = \arctan \frac{y}{x}\), we use
% ``pythagorean addition''~\cite{PICTEX}
% to determine \(s=\sqrt{x^2+y^2}\) and to obtain the length
% of the vector \(l = l_x \cdot \frac{s}{x}\)
% and the values of \(\sin \theta = \frac{y}{s}\) and
% \(\cos \theta = \frac{x}{s}\) for the rotation of the coordinate system.
% ^^A (This is faster; is it more accurate?)
% \changes{v0.2o}{2004/06/25}{Use \cmd{\pIIe@checkslopeargs} (HjG)}
%    \begin{macrocode}
  \def\vector(#1,#2)#3{%
    \begingroup
      \@xarg#1\relax \@yarg#2\relax
      \@linelen#3\unitlength
      \pIIe@checkslopeargs
      \ifdim\@linelen<\z@ \@badlinearg \else
        \pIIe@pyth{\@xarg\p@}{\@yarg\p@}\dimen@
        \ifnum\@xarg=\z@
        \else\ifnum\@yarg=\z@
          \else
%    \end{macrocode}
% This calculation is only necessary, if the vector is actually
% sloped.
%    \begin{macrocode}
            \pIIe@divide\dimen@{\@xarg\p@}\@xdim
            \@linelen\strip@pt\@xdim\@linelen
            \ifdim\@linelen<\z@\@linelen-\@linelen\fi
          \fi
        \fi
%    \end{macrocode}
% \BigIndent $\sin\theta$ and $\cos\theta$
%    \begin{macrocode}
        \pIIe@divide{\@yarg\p@}\dimen@\@ydim
        \pIIe@divide{\@xarg\p@}\dimen@\@xdim
%    \end{macrocode}
% Rotate the following vector\slash arrow outlines by angle $\theta$.
%    \begin{macrocode}
        \pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim\z@\z@
%    \end{macrocode}
% Internal command to draw the outline of the vector\slash arrow.
%    \begin{macrocode}
        \pIIe@vector
        \pIIe@fillGraph
      \fi
    \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@vector}
% \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
% This command should be \cmd{\def}'ed or \cmd{\let} to a macro
% that generates the vector's outline path.
% Now initialized by package options, via |\AtEndOfPackage|.
%    \begin{macrocode}
  \newcommand*\pIIe@vector{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@FAL}
% \begin{macro}{\pIIe@FAW}
% \begin{macro}{\pIIe@CAW}
% \begin{macro}{\pIIe@FAI}
% \changes{v0.1x}{2003/11/27}{Introduce ``inset''. (RN,HjG)}
% \begin{macro}{\pIIe@@firstnum}
% \changes{v0.1x}{2003/11/27}{New ancillary macro (RN,HjG)}
% \begin{macro}{\pIIe@@secondnum}
% \changes{v0.1x}{2003/11/27}{New ancillary macro (RN,HjG)}
% Some macros to parametrize the shape of the vector outline.
% ^^A Should be user-level macros or changeable via key-value interface.
% ^^A (Defered to future version.)
% See Figures~\ref{fig:vector:ltx} and~\ref{fig:vector:pst}.
%\iffalse
% Note that when the \textsf{pstricks} package has been loaded, its
% arrow-drawing parameters will be dynamically evaluated;
% of course,
% this is only useful with the \textsf{pstarrows} package
% option.
% probably\slash most likely not useful with the default
% \textsf{ltxarrows} package option.
%\fi
%    \begin{macrocode}
  \newcommand*\pIIe@FAL{}\newcommand*\pIIe@FAW{}\newcommand*\pIIe@CAW{}
  \newcommand*\pIIe@FAI{}
  \newcommand*\pIIe@@firstnum{}\newcommand*\pIIe@@secondnum{}
  \AtBeginDocument{%
    \@ifpackageloaded{pstricks}{%
      \def\pIIe@FAL{\psk@arrowlength}%
      \def\pIIe@FAW{\expandafter\pIIe@@secondnum\psk@arrowsize}%
      \def\pIIe@CAW{\expandafter\pIIe@@firstnum\psk@arrowsize}%
      \def\pIIe@FAI{\psk@arrowinset}%
      \def\pIIe@@firstnum#1 #2 {#1\p@}%
      \def\pIIe@@secondnum#1 #2 {#2}%
    }{}%
  }
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \paragraph{\LaTeX\ version}
%
% The arrows drawn by the variant generated by the \textsf{ltxarrows}
% package option are
% modeled after those in the fonts used by the \SL\ version of the
% picture commands (|ltpictur.dtx|).
% ^^A line10 linew10
% See Figure~\ref{fig:vector:ltx}.
%
% \begin{figure}
%   \setlength\unitlength{.0067\linewidth}\hfill
%   \makebox[0pt][r]{^^A
%     \begin{minipage}[c]{17em}^^A
%      \unboldmath\small
%      \setlength\arraycolsep{.5\arraycolsep}^^A
%      \begin{eqnarray*}
%        L  & = & \cmd{\@linelen} \\
%        W  & = & \cmd{\@wholewidth} = 2\times\cmd{\@halfwidth} \\
%        AW & = & \cmd{\pIIe@FAW}\times W  + \cmd{\pIIe@CAW} \\
%        AL & = & \cmd{\pIIe@FAL}\times AW \\
%        IN & = & \cmd{\pIIe@FAI}\times AW / 2
%      \end{eqnarray*}
%     \end{minipage}}^^A
%   \hspace{\marginparsep}
%   \begin{minipage}[c]{105\unitlength}^^A
%     \rule{\linewidth}{0pt}
%     \begin{picture}(105,55)(0,-25)
%       \boldmath\bfseries
%       \THICKLINES
%       \put(100,0){\FPOINT}  \put(101,-1){$P_1$}
% ^^A      \makeatletter
% ^^A      \pIIe@addtoGraph{^^J^^J\@percentchar\space >>> HUGO <<<^^J}^^A
% ^^A      \makeatother
%       \CBEZIER{100,0}{86.67,-1.67}{73.33,-8.33}{60,-20}^^A       P1--P2
%       \put(60,-20){\FPOINT} \put(61,-23){$P_2$}
%       \put(60,-20){\line(0,1){10}}^^A                 P2--P3
%       \put(60,-10){\FPOINT} \put(61,-9){$P_3$}
%       \put(60,-10){\line(-1,0){60}}^^A                P3--P4
%       \put(0,-10){\FPOINT}  \put(1,-8){$P_4$}
%       \put(0,-10){\line(0,1){20}}^^A                  P4--P5
%       \put(0,10){\FPOINT}   \put(1,6){$P_5$}
%       \put(0,10){\line(1,0){60}}^^A                   P5--P6
%       \put(60,10){\FPOINT}  \put(61,7){$P_6$}
%       \put(60,10){\line(0,1){10}}^^A                  P6--P7
%       \put(60,20){\FPOINT}  \put(61,21){$P_7$}
% ^^A      \makeatletter
% ^^A      \pIIe@addtoGraph{^^J^^J\@percentchar\space >>> HUGO <<<^^J}^^A
% ^^A      \makeatother
%       \CBEZIER{60,20}{73.33,8.33}{86.67,1.67}{100,0}^^A          P7--P1
%       \thinlines
%       \put(100,0){\line(-2,-1){40}}^^A                P1--P2
%       \put(60,20){\line(2,-1){40}}^^A                 P7--P1
%       ^^A
%       \put(93,-8){$P_a$}
%       \put(93,-6){\line(-3,2){6}}^^A
%       \put(80,-5){\OPOINT}
%       \put(73,-5){$P_m$}
%       \put(67,-8){$P_b$}
%       ^^A
%       \put(93,6){$P_d$}
%       \put(93,6){\line(-3,-2){6}}^^A
%       \put(80,5){\OPOINT}
%       \put(73,3){$P_n$}
%       \put(67,6){$P_c$}
%       ^^A
%       \put(-2,0){\line(1,0){4}}
%       \put(10,-7){\vector(-10,7){10}}\put(10,-8){$\,(0,0)$}
%       ^^A
%       \put(60,-20){\line(0,-1){5}}\put(100,0){\line(0,-1){25}}
%       \put(60,-25){\vector(1,0){40}}\put(100,-25){\vector(-1,0){40}}
%       \put(77,-24){$AL$}
%       ^^A
%       \put(0,10){\line(0,1){15}}\put(100,0){\line(0,1){25}}
%       \put(0,25){\vector(1,0){100}}\put(100,25){\vector(-1,0){100}}
%       \put(48,26){$L$}
%       ^^A
%       \put(60,-20){\line(-1,0){5}}  \put(60,20){\line(-1,0){5}}
%       \put(55,-20){\vector(0,1){40}} \put(55,20){\vector(0,-1){40}}
%       \put(47,-2){$AW$}
%       ^^A
%       \put(25,-10){\vector(0,1){20}}\put(25,10){\vector(0,-1){20}}
%       \put(20,-2){$W$}
%       \put(80,-10){\line(1,0){5}} \put(80,-5){\line(1,0){5}}
%       \put(85,-7.5){\vector(0,-1){2.5}} \put(85,-7.5){\vector(0,1){2.5}}
%       \put(86,-10){$IN$}
%     \end{picture}
%   \end{minipage}
%   \caption[\LaTeX-like implementation of \cmd{\vector}]^^A
%     {Sketch of the path drawn by the \LaTeX-like implementation
%     of \cmd{\vector}. (Note: We are using the redefined macros of
%     \textsf{pict2e}!)}
%   \label{fig:vector:ltx}
% \end{figure}
%
% \begin{macro}{\pIIe@vector@ltx}
% \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
% \changes{v0.1y}{2003/11/27}{First implementation. (RN,HjG)}
% The arrow outline.
% (Not yet quite the same as with \LaTeX's fonts.)
%
% Problem: Extrapolation.
% There are only two design sizes (thicknesses) for \LaTeX's line
% drawing fonts.
% Where can we go from there?
%
% Note that only the arrow head will be drawn, if the length argument
% of the \cmd{\vector} command is smaller than the calculated length
% of the arrow head.
% ^^A (Orig.\ \LaTeX: only, if length =~0!?)
%    \begin{macrocode}
  \newcommand*\pIIe@vector@ltx{%
    \@ydim\pIIe@FAW\@wholewidth \advance\@ydim\pIIe@CAW\relax
    \@ovxx\pIIe@FAL\@ydim
    \@xdim\@linelen \advance\@xdim-\@ovxx
    \divide\@ydim\tw@
    \divide\@ovxx\tw@ \advance\@ovxx\@xdim
    \@ovyy\@ydim
    \divide\@ovyy\tw@ \advance\@ovyy-\pIIe@FAI\@ydim
%    \end{macrocode}
% \noindent
% \BigIndent $P_d = P_1 + 1/3 (P_n - P_1)$
%    \begin{macrocode}
    \pIIe@bezier@QtoC\@linelen\@ovxx\@ovro
    \pIIe@bezier@QtoC\z@\@ovyy\@ovri
%    \end{macrocode}
% \BigIndent $P_c = P_7 + 1/3 (P_n - P_7)$
%    \begin{macrocode}
    \pIIe@bezier@QtoC\@xdim\@ovxx\@clnwd
    \pIIe@bezier@QtoC\@ydim\@ovyy\@clnht
%    \end{macrocode}
% \BigIndent $P_1$
%    \begin{macrocode}
    \pIIe@moveto\@linelen\z@
%    \end{macrocode}
% \BigIndent $P_a \quad P_b \quad P_2$
%    \begin{macrocode}
    \pIIe@curveto\@ovro{-\@ovri}\@clnwd{-\@clnht}\@xdim{-\@ydim}%
    \ifdim\@xdim>\z@
%    \end{macrocode}
% \BigIndent $P_3$
%    \begin{macrocode}
      \pIIe@lineto\@xdim{-\@halfwidth}%
%    \end{macrocode}
% \BigIndent $P_4$
%    \begin{macrocode}
      \pIIe@lineto\z@{-\@halfwidth}%
%    \end{macrocode}
% \BigIndent $P_5$
%    \begin{macrocode}
      \pIIe@lineto\z@{\@halfwidth}%
%    \end{macrocode}
% \BigIndent $P_6$
%    \begin{macrocode}
      \pIIe@lineto\@xdim{\@halfwidth}%
    \fi
%    \end{macrocode}
% \BigIndent $P_7$
%    \begin{macrocode}
    \pIIe@lineto\@xdim\@ydim
%    \end{macrocode}
% \BigIndent $P_c \quad P_d \quad P_1$
%    \begin{macrocode}
    \pIIe@curveto\@clnwd\@clnht\@ovro\@ovri\@linelen\z@}
%    \end{macrocode}
% \end{macro}
%
% \paragraph{\PSTricks\ version}
%
% The arrows drawn by the variant generated by the \textsf{pstarrows}
% package option are
% modeled after those in the \textsf{pstricks} package~\cite{PSTRICKS}.
% See Figure~\ref{fig:vector:pst}.
%
% \begin{figure}
%   \setlength\unitlength{.0067\linewidth}\hfill
%   \makebox[0pt][r]{^^A
%     \begin{minipage}[c]{17em}^^A
%      \unboldmath\small
%      \setlength\arraycolsep{.5\arraycolsep}^^A
%      \begin{eqnarray*}
%        L  & = & \cmd{\@linelen} \\
%        W  & = & \cmd{\@wholewidth} = 2\times\cmd{\@halfwidth} \\
%        AW & = & \cmd{\pIIe@FAW}\times W  + \cmd{\pIIe@CAW} \\
%        AL & = & \cmd{\pIIe@FAL}\times AW \\
%        IN & = & \cmd{\pIIe@FAI}\times AL
%      \end{eqnarray*}
%     \end{minipage}}^^A
%   \hspace{\marginparsep}
%   \begin{minipage}[c]{105\unitlength}^^A
%     \rule{\linewidth}{0pt}
%     \begin{picture}(105,55)(0,-25)
%       \boldmath\bfseries
%       \THICKLINES
%       \put(100,0){\FPOINT}  \put(101,-1){$P_1$}
%       \put(100,0){\line(-2,-1){40}}^^A                P1--P2
%       \put(60,-20){\FPOINT} \put(61,-23){$P_2$}
%       \put(60,-20){\line(4,5){8}}^^A                  P2--P3
%       \put(68,-10){\FPOINT} \put(70,-11){$P_3$}
%       \put(68,-10){\line(-1,0){68}}^^A                P3--P4
%       \put(0,-10){\FPOINT}  \put(1,-8){$P_4$}
%       \put(0,-10){\line(0,1){20}}^^A                  P4--P5
%       \put(0,10){\FPOINT}   \put(1,6){$P_5$}
%       \put(0,10){\line(1,0){68}}^^A                   P5--P6
%       \put(68,10){\FPOINT}  \put(70,9){$P_6$}
%       \put(68,10){\line(-4,5){8}}^^A                  P6--P7
%       \put(60,20){\FPOINT}  \put(61,21){$P_7$}
%       \put(60,20){\line(2,-1){40}}^^A                 P7--P1
%       \thinlines
%       \put(76,0){\FPOINT}   \put(78,-1){$P_i$}
%       \put(68,-10){\line(4,5){8}}^^A                  P3--Pi
%       \put(68,10){\line(4,-5){8}}^^A                  P6--Pi
%       ^^A
%       \put(-2,0){\line(1,0){4}}
%       \put(10,-7){\vector(-10,7){10}}\put(10,-8){$\,(0,0)$}
%       ^^A
%       \put(60,-20){\line(0,-1){5}}\put(100,0){\line(0,-1){25}}
%       \put(60,-25){\vector(1,0){40}}\put(100,-25){\vector(-1,0){40}}
%       \put(77,-24){$AL$}
%       ^^A
%       \put(0,10){\line(0,1){15}}\put(100,0){\line(0,1){25}}
%       \put(0,25){\vector(1,0){100}}\put(100,25){\vector(-1,0){100}}
%       \put(48,26){$L$}
%       ^^A
%       \put(60,-20){\line(-1,0){5}}  \put(60,20){\line(-1,0){5}}
%       \put(55,-20){\vector(0,1){40}} \put(55,20){\vector(0,-1){40}}
%       \put(47,-2){$AW$}
%       ^^A
%       \put(60,-20){\line(0,1){40}}
%       \put(60,0){\vector(1,0){15}}
%       \put(76,0){\vector(-1,0){16}}
%       \put(65,1){$IN$}
%       ^^A
%       \put(25,-10){\vector(0,1){20}}\put(25,10){\vector(0,-1){20}}
%       \put(20,-2){$W$}
%     \end{picture}
%   \end{minipage}
%   \caption[\PSTricks-like implementation of \cmd{\vector}]^^A
%     {Sketch of the path drawn by the \PSTricks-like implementation
%     of \cmd{\vector}. (Note: We are using the redefined macros of
%     \textsf{pict2e}!)}
%   \label{fig:vector:pst}
% \end{figure}
%
% \begin{macro}{\pIIe@vector@pst}
% \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
% The arrow outline.
% Note that only the arrowhead will be drawn, if the length argument
% of the \cmd{\vector} command is smaller than the calculated length
% of the arrow head.
% ^^A (Orig.\ \LaTeX: only, if length =~0!?)
%    \begin{macrocode}
  \newcommand*\pIIe@vector@pst{%
    \@ydim\pIIe@FAW\@wholewidth \advance\@ydim\pIIe@CAW\relax
    \@ovxx\pIIe@FAL\@ydim
    \@xdim\@linelen \advance\@xdim-\@ovxx
    \divide\@ydim\tw@
    \@ovyy\@ydim \advance\@ovyy-\@halfwidth
    \@ovdx\pIIe@FAI\@ovxx
    \pIIe@@divide\@ovdx\@ydim
    \@ovxx\strip@pt\@ovyy\@tempdimc
    \advance\@ovxx\@xdim
    \advance\@ovdx\@xdim
%    \end{macrocode}
% \BigIndent $P_1$
%    \begin{macrocode}
    \pIIe@moveto\@linelen\z@
%    \end{macrocode}
% \BigIndent $P_2$
%    \begin{macrocode}
    \pIIe@lineto\@xdim{-\@ydim}%
    \ifdim\@xdim>\z@
%    \end{macrocode}
% \BigIndent $P_3$
%    \begin{macrocode}
      \pIIe@lineto\@ovxx{-\@halfwidth}%
%    \end{macrocode}
% \BigIndent $P_4$
%    \begin{macrocode}
      \pIIe@lineto\z@{-\@halfwidth}%
%    \end{macrocode}
% \BigIndent $P_5$
%    \begin{macrocode}
      \pIIe@lineto\z@{\@halfwidth}%
%    \end{macrocode}
% \BigIndent $P_6$
%    \begin{macrocode}
      \pIIe@lineto\@ovxx{\@halfwidth}%
    \else
%    \end{macrocode}
% \BigIndent $P_i$
%    \begin{macrocode}
      \pIIe@lineto\@ovdx\z@
    \fi
%    \end{macrocode}
% \BigIndent $P_7$
%    \begin{macrocode}
    \pIIe@lineto\@xdim\@ydim
%    \end{macrocode}
% \BigIndent $P_1$
%    \begin{macrocode}
    \pIIe@lineto\@linelen\z@}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Circle and Dot}
% \label{sec:implementation:circle+dot}
%
% \begin{macro}{\@circle}
% The circle will either be stroked \dots
%    \begin{macrocode}
  \def\@circle#1{\begingroup \@tempswafalse\pIIe@circ{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@dot}
% \dots\ or filled.
%    \begin{macrocode}
  \def\@dot#1{\begingroup \@tempswatrue\pIIe@circ{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@circ}
% Common code.
% ^^A (Could\slash should be named \cmd{\@circ}!?)
%    \begin{macrocode}
  \newcommand*\pIIe@circ[1]{%
%    \end{macrocode}
% We need the radius instead of the diameter.
% Unlike \SL, we check for negative or zero diameter argument.
% ^^A Useful: error check when calculating coordinates.
% \changes{v0.2h}{2004/01/07}{Check for negative or zero diameter
%     argument (RN,HjG)}
% \changes{v0.2n}{2004/04/22}{Allow zero diameter (RN/HjG)}
%    \begin{macrocode}
      \@tempdima#1\unitlength
      \ifdim\@tempdima<\z@ \pIIe@badcircarg \fi
      \divide\@tempdima\tw@
      \pIIe@circle\@tempdima
%    \end{macrocode}
% With the current state of affairs, we could use
% \cmd{\pIIe@drawGraph} directly; but that would possibly be a case of
% premature optimisation.
% (Note to ourselves:
% Use of the |@tempswa| switch both here and inside quarter-circle!
% Hence a group is necessary there.)
%    \begin{macrocode}
      \if@tempswa \pIIe@fillGraph \else \pIIe@strokeGraph \fi
    \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@circle}
% Approximate a full circle by four quarter circles.
% \changes{v0.1g}{2003/08/23}{Changed code (using
%    \cmd{\pIIe@add@qcircle}). (HjG,RN)}
%    \begin{macrocode}
  \newcommand*\pIIe@circle[1]{%
    \pIIe@qcircle[1]\z@{#1}\pIIe@qcircle  \@ne{#1}%
    \pIIe@qcircle  \tw@{#1}\pIIe@qcircle\thr@@{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@qcircle}
% \changes{v0.1u}{2003/11/21}{%
%        Change coding of quadrant number to match bit number in
%        \cmd{\pIIe@get@quadrants} (HjG)}
% \changes{v0.1v}{2003/11/22}{Exchange \cmd{\@xdim} and \cmd{\@ydim} to
%        \cmd{\@ovri} and \cmd{\@ovro} (HjG)}
% Approximate a quarter circle, using cubic Bezier splines.
%
% \begin{figure}
%   \setlength\unitlength{.0033\linewidth}\hfill
%   \begin{minipage}{125\unitlength}
%     \begin{picture}(125,122)(-13,-3)
%       \boldmath\bfseries
%       \thinlines
%       ^^A\put(-13,-3){\framebox(125,122){}}
%       \put(0,0){\OPOINT}\put(2,4){$(0,0)$}
%       \put(2,0){\vector(1,0){96}}\put(98,0){\vector(-1,0){96}}
%       \put(40,2){$radius$}
%       \put(0,2){\vector(0,1){96}}\put(0,98){\vector(0,-1){96}}
%       \put(-7,40){\rotatebox{90}{$radius$}}
%       \put(100,0){\FPOINT}\put(89,4){$P_0$}
%       \put(100,55){\OPOINT}\put(95,59){$P_1$}
%       \put(100,0){\line(1,0){10}}\put(102,55){\line(1,0){8}}
%       \put(110,0){\vector(0,1){55}}\put(110,55){\vector(0,-1){55}}
%       \put(104,2){{\footnotesize\rotatebox{90}{$0.5523\times radius$}}}
%       ^^A
%       \put(0,100){\line(0,1){10}}\put(55,102){\line(0,1){8}}
%       \put(0,110){\vector(1,0){55}}\put(55,110){\vector(-1,0){55}}
%       \put(2,112){{\footnotesize $0.5523\times radius$}}
%       ^^A
%       \put(55, 100){\OPOINT}\put(57,98){$P_2$}
%       \put(0,100){\FPOINT}\put(-12,98){$P_3$}
%       \THICKLINES
%       \cbezier(100,0)(100,55)(55,100)(0,100)
%     \end{picture}
%   \end{minipage}\hspace*{\fill}
%   \caption[Auxillary macro \cmd{\pIIe@qcircle}---draw a quarter circle]^^A
%     {Sketch of the quarter circle path drawn by \cmd{\pIIe@qcircle} (NE~quarter)}
%   \label{fig:qcircle}
% \end{figure}
%
% \#1=Switch (0=no `moveto', 1=`moveto'),
% \#2=Quadrant No., \#3=Radius.
%
%   \begin{tabular}{l@{\qquad}l}
%     0 = 1st Quadrant (NE) & 1 = 2nd Quadrant (NW) \\
%     2 = 3rd Quadrant (SW) & 3 = 4th Quadrant (SE)
%   \end{tabular}
%
% \noindent
% (\PS: We could use the \texttt{arc} operator!)
%
% $ 0.55228474983 = $``magic\ number'' (see~\cite{EBEZIER}).
%
% Sacrifice a save level (otherwise a private ``switch'' macro were
% necessary!)
%    \begin{macrocode}
  \newcommand*\pIIe@qcircle[3][0]{%
    \begingroup
      \@ovro#3\relax \@ovri0.55228474983\@ovro
      \@tempdimc\@ovri \advance\@tempdimc-\@ovro
      \ifnum#1>\z@ \@tempswatrue \else \@tempswafalse \fi
      \ifcase#2\relax
%    \end{macrocode}
% \BigIndent NE
%    \begin{macrocode}
        \pIIe@@qcircle\@ovro\z@\z@\@ovri\@tempdimc\@ovro{-\@ovro}\@ovro
      \or
%    \end{macrocode}
% \BigIndent NW
%    \begin{macrocode}
        \pIIe@@qcircle\z@\@ovro{-\@ovri}\z@{-\@ovro}\@tempdimc{-\@ovro}{-\@ovro}%
      \or
%    \end{macrocode}
% \BigIndent SW
%    \begin{macrocode}
        \pIIe@@qcircle{-\@ovro}\z@\z@{-\@ovri}{-\@tempdimc}{-\@ovro}\@ovro{-\@ovro}%
      \or
%    \end{macrocode}
% \BigIndent SE
%    \begin{macrocode}
        \pIIe@@qcircle\z@{-\@ovro}\@ovri\z@\@ovro{-\@tempdimc}\@ovro\@ovro
      \fi
    \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@@qcircle}
% \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
% Ancillary macro; saves us some tokens above.
%
% Note:
% Use of |rcurveto| instead of |curveto| makes it possible (or at
% least much easier) to re-use this macro for the rounded corners of
% ovals.
%    \begin{macrocode}
  \newcommand*\pIIe@@qcircle[8]{%
    \if@tempswa\pIIe@moveto{#1}{#2}\fi \pIIe@rcurveto{#3}{#4}{#5}{#6}{#7}{#8}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@badcircarg}
% \changes{v0.2h}{2004/01/07}{New error message. (RN,HjG)}
% Obvious cousin to |\@badlinearg| from the \LaTeX\ kernel.
%    \begin{macrocode}
  \newcommand*\pIIe@badcircarg{%
    \PackageError{pict2e}%
      {Illegal argument in \protect\circle(*) or \protect\oval}%
      {The radius of a circle, dot or oval corner must be greater than zero.}}%
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Oval}
% \label{sec:implementation:oval}
%
% \begin{macro}{\maxovalrad}
% User level command, may be redefined by \cmd{\renewcommand*}.
% It may be given as an explicit (rigid) length (i.e., with unit)
% or as a number.
% In the latter case it is used as a factor to be multiplied by
% \cmd{\unitlength}.
% \ (|dimen| and |count| registers should work, too.) \ ^^A
% The default value is 20\,pt as specified for the \oarg{rad}
% argument of \cmd{\oval} by the \LaTeX\ manual
% \cite[p.~223]{LAMPORT}.
%    \begin{macrocode}
\newcommand*\maxovalrad{20pt}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@defaultUL}
% \begin{macro}{\pIIe@def@UL}
% The aforementioned behaviour seems necessary, since
% \cite[p.~223]{LAMPORT} does not specify explicitly whether the
% \oarg{rad} argument should be given in terms of \cmd{\unitlength} or
% as an absolute length.
% To implement this feature, we borrow from the \textsf{graphics}
% package:
% See \cmd{\Gin@defaultbp} and \cmd{\Gin@def@bp} from
% \texttt{graphics.dtx}.
%    \begin{macrocode}
\newcommand*\pIIe@defaultUL[2]{%
  \afterassignment\pIIe@def@UL\dimen@#2\unitlength\relax{#1}{#2}}
%    \end{macrocode}
% However, things are simpler in our case, since we always need the
% value stored in \cmd{\dimen@}.
% Hence, we could\slash should omit the unnecessary argument!?)
% \changes{v0.2h}{2004/01/07}{Check for negative or zero radius
%     argument (RN,HjG)}
% \changes{v0.2n}{2004/04/22}{Moved radius test to \cmd{\oval},
%     where it belongs (RN/HjG)}
%    \begin{macrocode}
\newcommand*\pIIe@def@UL{}
\def\pIIe@def@UL#1\relax#2#3{%
%   \if!#1!%
%     \def#2{#3}% \edef ?
%    \else
%      \edef#2{\strip@pt\dimen@}%
%    \fi
  \edef#2{\the\dimen@}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\oval}
% \begin{macro}{\pIIe@maxovalrad}
% The variant of \cmd{\oval} defined here takes an additional optional
% argument, which specifies the maximum radius of the rounded corners
% (default = 20\,pt, as given above).
% ^^A [Test: length or counter register as optional argument?]
% Unlike \SL, we check for negative or zero radius argument.
% \cmd{\pIIe@maxovalrad} is the internal variant of \cmd{\maxovalrad}.
% \changes{v0.2n}{2004/04/22}{Moved radius test from \cmd{\pIIe@def@UL}
%     (RN/HjG)}
% \changes{v0.2n}{2004/04/22}{Allow zero diameter (RN/HjG)}
%    \begin{macrocode}
\newcommand*\pIIe@maxovalrad{}
\renewcommand*\oval[1][\maxovalrad]{%
  \begingroup \pIIe@defaultUL\pIIe@maxovalrad{#1}%
    \ifdim\pIIe@maxovalrad<\z@ \pIIe@badcircarg \fi
%    \end{macrocode}
% Can't close the group here, since arguments must be parsed.
% (This is done by calling the saved original.)
%    \begin{macrocode}
    \pIIe@oldoval}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@oval}
% (This is called in turn by the saved original.)
%    \begin{macrocode}
\def\@oval(#1,#2)[#3]{%
%    \end{macrocode}
% In analogy to circles, we need only half of the size value.
%    \begin{macrocode}
  \@ovxx#1\unitlength \divide\@ovxx\tw@
  \@ovyy#2\unitlength \divide\@ovyy\tw@
  \@tempdimc \ifdim\@ovyy>\@ovxx \@ovxx \else \@ovyy \fi
  \ifdim\pIIe@maxovalrad<\@tempdimc \@tempdimc\pIIe@maxovalrad\relax \fi
%    \end{macrocode}
% Subtract the radius of the corners to get coordinates for the
% straight line segments.
%    \begin{macrocode}
  \@xdim\@ovxx \advance\@xdim-\@tempdimc
  \@ydim\@ovyy \advance\@ydim-\@tempdimc
%    \end{macrocode}
% Determine which parts of the oval we have to draw.
%    \begin{macrocode}
  \pIIe@get@quadrants{#3}%
%    \end{macrocode}
% ``\verb+@tempswa+ = false'' means, that we have to suppress the `moveto'
% in the following quadrant.
%    \begin{macrocode}
  \@tempswatrue
%    \end{macrocode}
% The following isn't strictly necessary, but yields a single (unfragmented)
% path even for \verb+[r]+ (right half of oval only).
% Useful for future extensions.
%
% \noindent
% Bits 3 and 0 set? (SE/NE)
%    \begin{macrocode}
  \ifnum9=\@tempcnta
    \pIIe@qoval\z@{-\@ovyy}{\@xdim}{-\@ovyy}\thr@@\@tempdimc\@ovxx\z@
%    \end{macrocode}
% Bit 0 set! (NE)
%    \begin{macrocode}
    \@tempcnta\@ne
  \fi
%    \end{macrocode}
% Bit 0 set? (NE)
%    \begin{macrocode}
  \pIIe@qoval\@ovxx\z@\@ovxx\@ydim\z@\@tempdimc\z@\@ovyy
%    \end{macrocode}
% Bit 1 set? (NW)
%    \begin{macrocode}
  \pIIe@qoval\z@\@ovyy{-\@xdim}\@ovyy\@ne\@tempdimc{-\@ovxx}\z@
%    \end{macrocode}
% Bit 2 set? (SW)
%    \begin{macrocode}
  \pIIe@qoval{-\@ovxx}\z@{-\@ovxx}{-\@ydim}\tw@\@tempdimc\z@{-\@ovyy}%
%    \end{macrocode}
% Bit 3 set? (SE)
%    \begin{macrocode}
  \pIIe@qoval\z@{-\@ovyy}{\@xdim}{-\@ovyy}\thr@@\@tempdimc\@ovxx\z@
%    \end{macrocode}
% Now we've finished, draw the oval and finally close the group opened
% by \cmd{\oval} above.
%    \begin{macrocode}
  \pIIe@strokeGraph
  \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@qoval}
% \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
% \changes{v0.1w}{2003/11/25}{Rename \cmd{\pIIe@oval}
%    to \cmd{\pIIe@qoval} (HjG)}
% Ancillary macro; saves us some tokens above.
%
% \noindent
% (\PS: We could use the \texttt{arc} or \texttt{arcto} operator!)
%    \begin{macrocode}
  \newcommand*\pIIe@qoval[8]{%
%    \end{macrocode}
% Bit set?
%    \begin{macrocode}
    \ifodd\@tempcnta
      \if@tempswa\pIIe@moveto{#1}{#2}\fi
      \pIIe@lineto{#3}{#4}\pIIe@qcircle{#5}{#6}\pIIe@lineto{#7}{#8}%
      \@tempswafalse
    \else
      \@tempswatrue
    \fi
%    \end{macrocode}
% Shift by one bit.
%    \begin{macrocode}
    \divide\@tempcnta\tw@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@get@quadrants}
% \changes{v0.1t}{2003/11/13}{Rename \cmd{\pIIe@get@ovalquadrants} to
%   \cmd{\pIIe@get@quadrants} (RN)}
% According to the parameter (\texttt{tlbr}) bits are set in
% \cmd{\@tempcnta}:\par
%   \begin{tabular}{l@{\qquad}l}
%     0 = 1st Quadrant (NE) & 1 = 2nd Quadrant (NW) \\
%     2 = 3rd Quadrant (SW) & 3 = 4th Quadrant (SE)
%   \end{tabular}\par\noindent
% (Cf.\ \cmd{\@oval} and \cmd{\@ovvert} in the \LaTeX\ kernel.)
% We abuse \cmd{\@setfpsbit} from the float processing modules of the
% kernel.
% ^^A (Should this go to section low-level?)
%    \begin{macrocode}
  \newcommand*\pIIe@get@quadrants[1]{%
    \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@tempcnta\z@
    \@tfor\reserved@a:=#1\do{\csname @ov\reserved@a false\endcsname}%
    \if@ovr \if@ovb\@setfpsbit2\fi \if@ovt\@setfpsbit4\fi \fi
    \if@ovl \if@ovb\@setfpsbit1\fi \if@ovt\@setfpsbit8\fi \fi}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Quadratic Bezier Curve}
% \label{sec:implementation:bezier-curves}
%
% \begin{macro}{\@bezier}
% \changes{v0.1u}{2003/11/21}{Change calculation of cubic bezier parameters
%    to use less tokens (HjG)}
% \changes{v0.2o}{2004/06/25}
%     {Supply \cmd{\ignorespaces} to match kernel version (HjG)}
% \changes{v0.2p}{2004/07/27}{\cmd{\@killglue} added. (RN)}
% \#1, the maximum number of points to use, is simply ignored,
% as well as \cmd{\qbeziermax}.
%
% The kernel version of \cmd{\@bezier} uses \cmd{\put} internally,
% which features \cmd{\@killglue} and \cmd{\ignorespaces} commands
% in turn (at the beginning and end, respectively).
% Since we don't use \cmd{\put}, we have to add the latter commands
% by hand.
%    \begin{macrocode}
  \def\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
%    \end{macrocode}
% \BigIndent $P_0=(\#2,\#3)$\quad$P_m=(\#4,\#5)$\quad$P_3=(\#6,\#7)$
%    \begin{macrocode}
    \@killglue
    \begingroup
      \@ovxx#2\unitlength \@ovyy#3\unitlength
      \@ovdx#4\unitlength \@ovdy#5\unitlength
      \@xdim#6\unitlength \@ydim#7\unitlength
%    \end{macrocode}
% \noindent
% \BigIndent $P_1 = P_m + 1/3 (P_0 - P_m)$
%    \begin{macrocode}
      \pIIe@bezier@QtoC\@ovxx\@ovdx\@ovro
      \pIIe@bezier@QtoC\@ovyy\@ovdy\@ovri
%    \end{macrocode}
% \BigIndent $P_2 = P_m + 1/3 (P_3 - P_m)$
%    \begin{macrocode}
      \pIIe@bezier@QtoC\@xdim\@ovdx\@clnwd
      \pIIe@bezier@QtoC\@ydim\@ovdy\@clnht
%    \end{macrocode}
% \BigIndent $(P_{0x},P_{0y})$
%    \begin{macrocode}
      \pIIe@moveto\@ovxx\@ovyy
%    \end{macrocode}
% \BigIndent $(P_{1x},P_{1y})$\quad$(P_{2x},P_{2y})$\quad$(P_{3x},P_{3y})$
%    \begin{macrocode}
      \pIIe@curveto\@ovro\@ovri\@clnwd\@clnht\@xdim\@ydim
      \pIIe@strokeGraph
    \endgroup
    \ignorespaces}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pIIe@bezier@QtoC}
% \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
% Ancillary macro; saves us some tokens above.
%
% \noindent
% Transformation:
% quadratic bezier parameters $\rightarrow$ cubic bezier parameters.
%
% \noindent
% (Missing: Reference for mathematical formula. Or is this trivial?)
%    \begin{macrocode}
  \newcommand*\pIIe@bezier@QtoC[3]{%
    \@tempdimc#1\relax      \advance\@tempdimc-#2\relax
    \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
    #3\@tempdimc}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Commands from other packages}
%
% \subsubsection{Package \textsf{ebezier}}
% \label{sec:implementation:ebezier}
%
% One feature from~\cite{EBEZIER}.
%
% \begin{macro}{\cbezier}
% \begin{macro}{\@cbezier}
% \changes{v0.2o}{2004/06/25}
%     {Supply \cmd{\ignorespaces} to match kernel version (HjG)}
% \changes{v0.2p}{2004/07/27}{\cmd{\@killglue} added. (RN)}
% \begin{macro}{\pIIe@@cbezier}
% \#1, the maximum number of points to use, is simply ignored,
% as well as \cmd{\qbeziermax}.
%
% Like the kernel version of \cmd{\@bezier},
% the original version of \cmd{\@cbezier} uses \cmd{\put} internally,
% which features \cmd{\@killglue} and \cmd{\ignorespaces} commands
% in turn (at the beginning and end, respectively).
% Since we don't use \cmd{\put}, we have to add the latter commands
% by hand.
%
% ^^A (What about |\lbezier|?)
%
% \noindent
% Original head of the macro:\par
% \verb|\def\cbezier{\@ifnextchar [{\@cbezier}{\@cbezier[0]}}|\par
% \noindent Changed analogous to the \LaTeX\ kernel's \cmd{\qbezier} and
% \cmd{\bezier}:
%    \begin{macrocode}
  \AtBeginDocument{\@ifundefined{cbezier}{\newcommand}{\renewcommand}*%
      \cbezier[2][0]{\pIIe@@cbezier[#1]#2}%
    \@ifdefinable\pIIe@@cbezier{}%
    \def\pIIe@@cbezier#1)#2(#3)#4(#5)#6({\@cbezier#1)(#3)(#5)(}%
    \def\@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){%
      \@killglue
      \pIIe@moveto{#2\unitlength}{#3\unitlength}%
      \pIIe@curveto{#4\unitlength}{#5\unitlength}%
        {#6\unitlength}{#7\unitlength}{#8\unitlength}{#9\unitlength}%
      \pIIe@strokeGraph
      \ignorespaces}%
  }
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Other packages}
% \label{sec:implementation:others}
%
% Other macros from various packages may be included in future
% versions of this package.
% ^^A (Or in a sibling package \textsf{pict2x} or \textsf{pict2ext}.)
%
% \subsection{Mode `original'}
%
% ^^A Necessary? Useful?
% ^^A \bigskip
%
% \noindent
% Other branch of the big switch,\label{big-switch-end}
% started near the beginning of the code
% (see page~\pageref{big-switch-begin}).
%    \begin{macrocode}
\else
%    \end{macrocode}
%
% \begin{macro}{\oval}
% \begin{macro}{\maxovalrad}
% \begin{macro}{\OriginalPictureCmds}
% Gobble the new optional argument and continue with saved version.
% \cmd{\maxovalrad} is there to avoid error messages in case the
% user's document redefines it with \cmd{\renewcommand*}.
% Likewise, \cmd{\OriginalPictureCmds} is only needed for test
% documents.
%    \begin{macrocode}
  \renewcommand*\oval[1][]{\pIIe@oldoval}
  \newcommand*\maxovalrad{20pt}
  \newcommand*\OriginalPictureCmds{}
\fi
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Final clean-up}
%
% Restore Catcodes.
%    \begin{macrocode}
\Gin@codes
\let\Gin@codes\relax
%    \end{macrocode}
%
%    \begin{macrocode}
%</package>
%    \end{macrocode}
%
%
%\ifdeveloping
%
% \section{Bugs}
%
% Das muss hier besser werden! Wie? longtable!?
%
% \bigskip
% \noindent
% \begin{tabular}{@{}rlccclp{30mm}@{}}
%                                                             \hline
% No. & Submitted by & Reported & V.no. & Fixed & Fixed by
%     & Remark                                                \\
%                                                             \hline
%                                                             \hline
%   1 & Volker Kiefel & 2004/05/29 & v0.2o & 2004/06/25 & HjG
%     & Trouble with language support; e.g., \texttt{german.sty}.
%       ($\mapsto$ Save and restore catcodes.)                \\
%                                                             \hline
%   2 & Dwight Aplevich & 2004/06/04 & v0.2o & 2004/06/25 & HjG
%     & Cannot connect two |\cbezier| curves (second one displaced).
%       ($\mapsto$ Supply |\ignorespaces| in definition of bezier
%       commands.)                                            \\
%                                                             \hline
%   3 & Alan G. Isaac & 2004/06/23 & v0.2o & 2004/06/25 & HjG
%     & Like \#2.                                             \\
%                                                             \hline
% \end{tabular}
%
%\iffalse
% \newenvironment{erratalist}
%   {\begin{longtable}{r>{\raggedright}p{2cm}l>{\raggedright}p{10cm}l}}
%   {\endgobble\end{longtable}}
%\fi
%
% \bigskip
% \noindent
% \begin{longtable}{@{}r^^A          No.
%   >{\raggedright}p{2cm}^^A     Submitted
%   >{\raggedright}p{2cm}^^A     Fixed
%   >{\raggedright}p{8.5cm}^^A       Remark
%   @{}}
% \hline
% No. & Submitted & Fixed & Remark (Synopsis and Fix)
% \tabularnewline \hline \hline
%   1 & v0.2n? 2004/05/29 Volker Kiefel
%     & v0.2o 2004/06/25 HjG
%     & Trouble with language support; e.g., \texttt{german.sty}.
%    \\ ($\mapsto$ Save and restore catcodes.)
% \tabularnewline \hline
%   2 & v0.2n? 2004/06/04 Dwight Aplevich
%     & v0.2o 2004/06/25 HjG
%     & Cannot connect two |\cbezier| curves (second one displaced).
%    \\ ($\mapsto$ Supply |\ignorespaces| in definition of bezier
%       commands.)
% \tabularnewline \hline
%   3 & v0.2n? 2004/06/23 Alan G. Isaac
%     & v0.2o 2004/06/25 HjG
%     & Like \#2.
% \tabularnewline \hline
% \end{longtable}
%
% \bigskip
% \noindent
% \begin{tabular}{@{}r>{\raggedright}p{.6\textwidth}@{}}^^A tabularx? RN
% \hline
%   \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
%     No.           &        1        \\
%     Submitted by  &   Volker Kiefel \\
%     Reported      &   2004/05/29    \\
%     Version       &   v0.2o         \\
%     Fixed         &   2004/06/25    \\
%     Fixed by      &   HjG
%   \end{tabular} &
%   Trouble with language support; e.g., \texttt{german.sty}.
%   ($\mapsto$\,Save and restore catcodes.)
% \tabularnewline \hline
%   \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
%     No.           &        2        \\
%     Submitted by  &   Dwight Aplevich \\
%     Reported      &   2004/06/04    \\
%     Version       &   v0.2o         \\
%     Fixed         &   2004/06/25    \\
%     Fixed by      &   HjG
%   \end{tabular} &
%   Cannot connect two |\cbezier| curves (second one displaced).
%   ($\mapsto$ Supply |\ignorespaces| in definition of bezier
%   commands.)
% \tabularnewline \hline
%   \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
%     No.           &        3        \\
%     Submitted by  &   Alan G. Isaac \\
%     Reported      &   2004/06/23    \\
%     Version       &   v0.2o         \\
%     Fixed         &   2004/06/25    \\
%     Fixed by      &   HjG
%   \end{tabular} &
%   Like \#2.
% \tabularnewline \hline
% \end{tabular}
%
% \bigskip
% \noindent
% \begin{longtable}{@{}rp{.6\textwidth}@{}}
% \hline
%   \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
%     No.           &        1        \\
%     Submitted by  &   Volker Kiefel \\
%     Reported      &   2004/05/29    \\
%     Version       &   v0.2o         \\
%     Fixed         &   2004/06/25    \\
%     Fixed by      &   HjG
%   \end{tabular} &
%   Trouble with language support; e.g., \texttt{german.sty}.
%   ($\mapsto$\,Save and restore catcodes.)
% \tabularnewline \hline
%   \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
%     No.           &        2        \\
%     Submitted by  &   Dwight Aplevich \\
%     Reported      &   2004/06/04    \\
%     Version       &   v0.2o         \\
%     Fixed         &   2004/06/25    \\
%     Fixed by      &   HjG
%   \end{tabular} &
%   Cannot connect two |\cbezier| curves (second one displaced).
%   ($\mapsto$ Supply |\ignorespaces| in definition of bezier
%   commands.)
% \tabularnewline \hline
%   \begin{tabular}[t]{@{}>{\bfseries}rl@{}}
%     No.           &        3        \\
%     Submitted by  &   Alan G. Isaac \\
%     Reported      &   2004/06/23    \\
%     Version       &   v0.2o         \\
%     Fixed         &   2004/06/25    \\
%     Fixed by      &   HjG
%   \end{tabular} &
%   Like \#2.
% \tabularnewline \hline
% \end{longtable}
%
%\fi
%
%
% \Finale
\endinput
