diff options
author | Karl Berry <karl@freefriends.org> | 2008-07-23 21:59:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-07-23 21:59:53 +0000 |
commit | 54b2fa381aadcf2c66ad116fa712576daad37e9e (patch) | |
tree | 4050752e80372a026e8fc7e2e71e547fb63a40bf /Master/texmf-dist/tex/latex/pict2e | |
parent | 25e2d07e6e4346cd52777d58bd2bf885c418e534 (diff) |
pict2e update (22jul08)
git-svn-id: svn://tug.org/texlive/trunk@9730 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pict2e')
-rw-r--r-- | Master/texmf-dist/tex/latex/pict2e/pict2e.sty | 822 |
1 files changed, 417 insertions, 405 deletions
diff --git a/Master/texmf-dist/tex/latex/pict2e/pict2e.sty b/Master/texmf-dist/tex/latex/pict2e/pict2e.sty index d7e26a494a2..a738618fdb6 100644 --- a/Master/texmf-dist/tex/latex/pict2e/pict2e.sty +++ b/Master/texmf-dist/tex/latex/pict2e/pict2e.sty @@ -25,7 +25,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{pict2e} - [2008/06/29 v0.2u Improved picture commands (HjG,RN,JT)] + [2008/07/22 v0.2w Improved picture commands (HjG,RN,JT)] \edef\Gin@codes{% \catcode`\noexpand\^^A\the\catcode`\^^A\relax \catcode`\noexpand\"\the\catcode`\"\relax @@ -147,26 +147,26 @@ \fi \fi \ifnum\pIIe@mode>\z@ -\ifcase\pIIe@mode\relax -\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} - \newcommand*\pIIe@closepath@op{closepath} -\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} - \newcommand*\pIIe@closepath@op{h} -\fi + \ifcase\pIIe@mode\relax + \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} + \newcommand*\pIIe@closepath@op{closepath} + \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} + \newcommand*\pIIe@closepath@op{h} + \fi \@ifdefinable\pIIe@GRAPH{\newtoks\pIIe@GRAPH} \newcommand*\pIIe@addtoGraph[1]{% \begingroup @@ -208,80 +208,80 @@ \pIIe@addtoGraph{\strip@pt\@tempdima}% \endgroup} \newcommand*\pIIe@PTtoBP{0.99626401 } -\ifcase\pIIe@mode\relax -\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} -\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} -\fi + \ifcase\pIIe@mode\relax + \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} + \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} + \fi \newcommand*\pIIe@moveto[2]{% - \pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@moveto@op} + \pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@moveto@op} \newcommand*\pIIe@lineto[2]{% - \pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@lineto@op} -\ifcase\pIIe@mode\relax -\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} -\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} -\fi + \pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@lineto@op} + \ifcase\pIIe@mode\relax + \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} + \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} + \fi \newcommand*\pIIe@curveto[6]{% \begingroup \@tempdima#1\relax \@tempdimb#2\relax @@ -293,256 +293,264 @@ \pIIe@addtoGraph\pIIe@curveto@op \endgroup} \newcommand*\pIIe@closepath{\pIIe@addtoGraph\pIIe@closepath@op} -\newcommand*\pIIe@pyth[3]{% - \begingroup - \@tempdima=#1\relax - \ifnum\@tempdima<\z@\@tempdima=-\@tempdima\fi - \@tempdimb=#2\relax - \ifnum\@tempdimb<\z@\@tempdimb=-\@tempdimb\fi - \advance\@tempdimb\@tempdima - \ifnum\@tempdimb=\z@ - \@tempdimc=\z@ - \else - \multiply\@tempdima 8\relax - \pIIe@divide\@tempdima\@tempdimb\@tempdimc - \advance\@tempdimc -4pt - \multiply\@tempdimc 2 - \edef\pIIe@tempa{\strip@pt\@tempdimc}% - \@tempdima=\pIIe@tempa\@tempdimc - \advance\@tempdima 64pt - \divide\@tempdima 2\relax - \@dashdim=7pt - \pIIe@@pyth\pIIe@@pyth\pIIe@@pyth - \edef\pIIe@tempa{\strip@pt\@dashdim}% - \@tempdimc=\pIIe@tempa\@tempdimb - \global\divide\@tempdimc 8 - \fi - \edef\x{\endgroup#3=\the\@tempdimc}% - \x} -\newcommand*\pIIe@@pyth{% - \pIIe@divide\@tempdima\@dashdim\@tempdimc - \advance\@dashdim\@tempdimc - \divide\@dashdim\tw@} -\ifx\undefined\@maxdimhalfplus \newdimen\@maxdimhalfplus \fi -\ifx\undefined\@maxdim@two@xvi \newdimen\@maxdim@two@xvi \fi -\@maxdimhalfplus=\maxdimen \divide\@maxdimhalfplus\tw@ -\advance\@maxdimhalfplus 1sp -\@maxdim@two@xvi=\maxdimen \divide\@maxdim@two@xvi 65536 -\newcommand*\pIIe@divide[3]{% - \begingroup - \dimendef\@Numer=254\relax \dimendef\@Denom=252\relax - \@Numer=#1\relax \@Denom=#2\relax - \ifdim\@Denom<\z@ \@Denom -\@Denom \@Numer -\@Numer \fi - \def\sign{}\ifdim\@Numer<\z@ \def\sign{-}\@Numer -\@Numer \fi - \ifdim \@Numer>\@maxdim@two@xvi - \@tempcnta=\z@ - \@whiledim \@Numer<\@maxdimhalfplus - \do {\multiply\@Numer\tw@ \advance\@tempcnta 1}% - \@whilenum \@tempcnta<16 - \do {\divide\@Denom\tw@ \advance\@tempcnta 1}% - \else - \@Numer 65536\@Numer - \fi - \ifdim \@Denom=\z@ - \ifdim \@Numer=\z@ \@Numer\p@ \else \@Numer\maxdimen \fi - \else - \divide\@Numer\@Denom - \fi - \global#3\sign\@Numer - \endgroup} -\newcommand*\pIIe@checkslopeargsline[2]{% - \pIIe@checkslopeargs{#1}{#2}{16383}} -\newcommand*\pIIe@checkslopeargsvector[2]{% - \pIIe@checkslopeargs{#1}{#2}{1000}} -\newcommand*\pIIe@checkslopeargs[3]{% - \def\@tempa{#1}\expandafter\pIIe@checkslopearg\@tempa.:{#3}% - \def\@tempa{#2}\expandafter\pIIe@checkslopearg\@tempa.:{#3}% - \ifdim #1\p@=\z@ \ifdim #2\p@=\z@ \@badlinearg \fi\fi} -\def\pIIe@checkslopearg #1.#2:#3{% - \def\@tempa{#1}% - \ifx\@tempa\empty\def\@tempa{0}\fi - \ifx\@tempa\space\def\@tempa{0}\fi - \ifnum\ifnum\@tempa<\z@-\fi\@tempa>#3\@badlinearg \fi} -\def\@badlinearg{\PackageError - {pict2e}{Bad \protect\line\space or \protect\vector\space argument}{}} -\def\line(#1,#2)#3{% - \pIIe@checkslopeargsline{#1}{#2}% - \@tempdima=#1pt\relax \@tempdimb=#2pt\relax - \@linelen #3\unitlength - \ifdim\@linelen<\z@ \@badlinearg \else \@sline \fi} -\def\@sline{% - \begingroup - \ifdim\@tempdima=\z@ - \ifdim\@tempdimb<\z@\@linelen-\@linelen\fi - \@ydim=\@linelen - \@xdim=\z@ - \else - \ifdim\@tempdimb=\z@ - \ifdim\@tempdima<\z@\@linelen-\@linelen\fi - \@xdim=\@linelen - \@ydim=\z@ + \newcommand*\pIIe@pyth[3]{% + \begingroup + \@tempdima=#1\relax + \ifnum\@tempdima<\z@\@tempdima=-\@tempdima\fi + \@tempdimb=#2\relax + \ifnum\@tempdimb<\z@\@tempdimb=-\@tempdimb\fi + \advance\@tempdimb\@tempdima + \ifnum\@tempdimb=\z@ + \@tempdimc=\z@ + \else + \multiply\@tempdima 8\relax + \pIIe@divide\@tempdima\@tempdimb\@tempdimc + \advance\@tempdimc -4pt + \multiply\@tempdimc 2 + \edef\pIIe@tempa{\strip@pt\@tempdimc}% + \@tempdima=\pIIe@tempa\@tempdimc + \advance\@tempdima 64pt + \divide\@tempdima 2\relax + \@dashdim=7pt + \pIIe@@pyth\pIIe@@pyth\pIIe@@pyth + \edef\pIIe@tempa{\strip@pt\@dashdim}% + \@tempdimc=\pIIe@tempa\@tempdimb + \global\divide\@tempdimc 8 + \fi + \edef\x{\endgroup#3=\the\@tempdimc}% + \x} + \newcommand*\pIIe@@pyth{% + \pIIe@divide\@tempdima\@dashdim\@tempdimc + \advance\@dashdim\@tempdimc + \divide\@dashdim\tw@} + \newcommand*\pIIe@divide[3]{% + \begingroup + \dimendef\Numer=254\relax \dimendef\Denom=252\relax + \countdef\Num=254\relax \countdef\Den=252\relax + \countdef\I=250\relax \countdef\Numb=248\relax + \Numer #1\relax \Denom #2\relax + \ifdim\Denom<\z@ \Denom -\Denom \Numer=-\Numer \fi + \ifdim\Numer<\z@ \def\sign{-}\Numer=-\Numer \else \def\sign{}\fi + \ifdim\Denom=\z@ + \edef\Q{\strip@pt\maxdimen}% + \PackageWarning{pict2e}% + {Division by 0, \sign\strip@pt\maxdimen\space used}{}% \else - \ifnum\@tempdima<\z@\@linelen-\@linelen\fi - \pIIe@divide\@tempdimb\@tempdima\dimen@ - \@ydim=\strip@pt\dimen@\@linelen - \@xdim=\@linelen + \Num=\Numer \Den=\Denom + \Numb=\Num \divide\Numb\Den + \ifnum\Numb>16383 + \edef\Q{\strip@pt\maxdimen}% + \PackageWarning{pict2e}% + {Division overflow, \sign\strip@pt\maxdimen\space used}{}% + \else + \edef\Q{\number\Numb.}% + \multiply \Numb\Den \advance\Num -\Numb + \I=6\relax + \@whilenum \I>\z@ \do{\pIIe@@divide\advance\I\m@ne}% + \fi \fi - \fi - \pIIe@moveto\z@\z@ - \pIIe@lineto\@xdim\@ydim - \pIIe@strokeGraph - \endgroup} -\def\vector(#1,#2)#3{% - \begingroup - \pIIe@checkslopeargsvector{#1}{#2}% - \@tempdima=#1pt\relax \@tempdimb=#2pt\relax - \@linelen#3\unitlength - \ifdim\@linelen<\z@ \@badlinearg \else - \pIIe@pyth{\@tempdima}{\@tempdimb}\dimen@ + \edef\tempend{\noexpand\endgroup\noexpand#3=\sign\Q\p@}% + \tempend} + \def\pIIe@@divide{% + \@whilenum \Num>214748364 \do{\divide\Num\tw@ \divide\Den\tw@}% + \multiply \Num 10 + \Numb=\Num \divide\Numb\Den + \edef\Q{\Q\number\Numb}% + \multiply \Numb\Den \advance \Num -\Numb + \ifnum\Num>\z@\else\I=0\fi} + \newcommand*\pIIe@checkslopeargsline[2]{% + \pIIe@checkslopeargs{#1}{#2}{16383}} + \newcommand*\pIIe@checkslopeargsvector[2]{% + \pIIe@checkslopeargs{#1}{#2}{1000}} + \newcommand*\pIIe@checkslopeargs[3]{% + \def\@tempa{#1}\expandafter\pIIe@checkslopearg\@tempa.:{#3}% + \def\@tempa{#2}\expandafter\pIIe@checkslopearg\@tempa.:{#3}% + \ifdim #1\p@=\z@ \ifdim #2\p@=\z@ \@badlinearg \fi\fi} + \def\pIIe@checkslopearg #1.#2:#3{% + \def\@tempa{#1}% + \ifx\@tempa\empty\def\@tempa{0}\fi + \ifx\@tempa\space\def\@tempa{0}\fi + \ifnum\ifnum\@tempa<\z@-\fi\@tempa>#3\@badlinearg \fi} + \def\@badlinearg{\PackageError + {pict2e}{Bad \protect\line\space or \protect\vector\space argument}{}} + \def\line(#1,#2)#3{% + \pIIe@checkslopeargsline{#1}{#2}% + \@tempdima=#1pt\relax \@tempdimb=#2pt\relax + \@linelen #3\unitlength + \ifdim\@linelen<\z@ \@badlinearg \else \@sline \fi} + \def\@sline{% + \begingroup \ifdim\@tempdima=\z@ - \else\ifdim\@tempdimb=\z@ + \ifdim\@tempdimb<\z@\@linelen-\@linelen\fi + \@ydim=\@linelen + \@xdim=\z@ + \else + \ifdim\@tempdimb=\z@ + \ifdim\@tempdima<\z@\@linelen-\@linelen\fi + \@xdim=\@linelen + \@ydim=\z@ \else - \pIIe@divide\dimen@{\@tempdima}\@xdim - \@linelen\strip@pt\@xdim\@linelen - \ifdim\@linelen<\z@\@linelen-\@linelen\fi + \ifnum\@tempdima<\z@\@linelen-\@linelen\fi + \pIIe@divide\@tempdimb\@tempdima\dimen@ + \@ydim=\strip@pt\dimen@\@linelen + \@xdim=\@linelen \fi \fi - \pIIe@divide{\@tempdimb}\dimen@\@ydim - \pIIe@divide{\@tempdima}\dimen@\@xdim - \pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim\z@\z@ - \pIIe@vector - \pIIe@fillGraph - \fi - \endgroup} -\newcommand*\pIIe@vector{} -\newcommand*\pIIe@FAL{}\newcommand*\pIIe@FAW{}\newcommand*\pIIe@CAW{} -\newcommand*\pIIe@FAI{} -\newcommand*\pIIe@@firstnum{}\newcommand*\pIIe@@secondnum{} -\iffalse% the pstricks values gives too small arrows. (RN) -\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}% - }{}% -} -\fi -\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 - \pIIe@bezier@QtoC\@linelen\@ovxx\@ovro - \pIIe@bezier@QtoC\z@\@ovyy\@ovri - \pIIe@bezier@QtoC\@xdim\@ovxx\@clnwd - \pIIe@bezier@QtoC\@ydim\@ovyy\@clnht - \pIIe@moveto\@linelen\z@ - \pIIe@curveto\@ovro{-\@ovri}\@clnwd{-\@clnht}\@xdim{-\@ydim}% - \ifdim\@xdim>\z@ - \pIIe@lineto\@xdim{-\@halfwidth}% - \pIIe@lineto\z@{-\@halfwidth}% - \pIIe@lineto\z@{\@halfwidth}% - \pIIe@lineto\@xdim{\@halfwidth}% - \fi - \pIIe@lineto\@xdim\@ydim - \pIIe@curveto\@clnwd\@clnht\@ovro\@ovri\@linelen\z@} -\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\@tempdimc - \@ovxx\strip@pt\@ovyy\@tempdimc - \advance\@ovxx\@xdim - \advance\@ovdx\@xdim - \pIIe@moveto\@linelen\z@ - \pIIe@lineto\@xdim{-\@ydim}% - \ifdim\@xdim>\z@ - \pIIe@lineto\@ovxx{-\@halfwidth}% - \pIIe@lineto\z@{-\@halfwidth}% - \pIIe@lineto\z@{\@halfwidth}% - \pIIe@lineto\@ovxx{\@halfwidth}% - \else - \pIIe@lineto\@ovdx\z@ + \pIIe@moveto\z@\z@ + \pIIe@lineto\@xdim\@ydim + \pIIe@strokeGraph + \endgroup} + \def\vector(#1,#2)#3{% + \begingroup + \pIIe@checkslopeargsvector{#1}{#2}% + \@tempdima=#1pt\relax \@tempdimb=#2pt\relax + \@linelen#3\unitlength + \ifdim\@linelen<\z@ \@badlinearg \else + \pIIe@pyth{\@tempdima}{\@tempdimb}\dimen@ + \ifdim\@tempdima=\z@ + \else\ifdim\@tempdimb=\z@ + \else + \pIIe@divide\dimen@{\@tempdima}\@xdim + \@linelen\strip@pt\@xdim\@linelen + \ifdim\@linelen<\z@\@linelen-\@linelen\fi + \fi + \fi + \pIIe@divide{\@tempdimb}\dimen@\@ydim + \pIIe@divide{\@tempdima}\dimen@\@xdim + \pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim\z@\z@ + \pIIe@vector + \pIIe@fillGraph + \fi + \endgroup} + \newcommand*\pIIe@vector{} + \newcommand*\pIIe@FAL{}\newcommand*\pIIe@FAW{}\newcommand*\pIIe@CAW{} + \newcommand*\pIIe@FAI{} + \newcommand*\pIIe@@firstnum{}\newcommand*\pIIe@@secondnum{} + \iffalse% the pstricks values gives too small arrows. (RN) + \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}% + }{}% + } \fi - \pIIe@lineto\@xdim\@ydim - \pIIe@lineto\@linelen\z@} - \def\@circle#1{\begingroup \@tempswafalse\pIIe@circ{#1}} - \def\@dot#1{\begingroup \@tempswatrue\pIIe@circ{#1}} -\newcommand*\pIIe@circ[1]{% - \@tempdima#1\unitlength - \ifdim\@tempdima<\z@ \pIIe@badcircarg \fi - \divide\@tempdima\tw@ - \pIIe@circle\@tempdima - \if@tempswa \pIIe@fillGraph \else \pIIe@strokeGraph \fi - \endgroup} -\newcommand*\pIIe@circle[1]{% - \begingroup - \buttcap - \pIIe@qcircle[1]\z@{#1}\pIIe@qcircle \@ne{#1}% - \pIIe@qcircle \tw@{#1}\pIIe@qcircle\thr@@{#1}% - \endgroup} -\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 - \pIIe@@qcircle\@ovro\z@\z@\@ovri\@tempdimc\@ovro{-\@ovro}\@ovro - \or - \pIIe@@qcircle\z@\@ovro{-\@ovri}\z@{-\@ovro}\@tempdimc{-\@ovro}{-\@ovro}% - \or - \pIIe@@qcircle{-\@ovro}\z@\z@{-\@ovri}{-\@tempdimc}{-\@ovro}\@ovro{-\@ovro}% - \or - \pIIe@@qcircle\z@{-\@ovro}\@ovri\z@\@ovro{-\@tempdimc}\@ovro\@ovro + \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 + \pIIe@bezier@QtoC\@linelen\@ovxx\@ovro + \pIIe@bezier@QtoC\z@\@ovyy\@ovri + \pIIe@bezier@QtoC\@xdim\@ovxx\@clnwd + \pIIe@bezier@QtoC\@ydim\@ovyy\@clnht + \pIIe@moveto\@linelen\z@ + \pIIe@curveto\@ovro{-\@ovri}\@clnwd{-\@clnht}\@xdim{-\@ydim}% + \ifdim\@xdim>\z@ + \pIIe@lineto\@xdim{-\@halfwidth}% + \pIIe@lineto\z@{-\@halfwidth}% + \pIIe@lineto\z@{\@halfwidth}% + \pIIe@lineto\@xdim{\@halfwidth}% \fi - \endgroup} -\newcommand*\pIIe@@qcircle[8]{% - \if@tempswa\pIIe@moveto{#1}{#2}\fi \pIIe@rcurveto{#3}{#4}{#5}{#6}{#7}{#8}} -\newcommand*\pIIe@badcircarg{% - \PackageError{pict2e}% - {Illegal argument in \protect\circle(*), \protect\oval, \protect\arc(*) or - \protect\circlearc.}% - {The radius of a circle, dot, arc or oval corner must be greater than zero.}}% -\newcommand*\maxovalrad{20pt} -\newcommand*\pIIe@defaultUL[2]{% - \afterassignment\pIIe@def@UL\dimen@#2\unitlength\relax{#1}{#2}} -\newcommand*\pIIe@def@UL{} -\def\pIIe@def@UL#1\relax#2#3{% - \edef#2{\the\dimen@}} -\newcommand*\pIIe@maxovalrad{} -\renewcommand*\oval[1][\maxovalrad]{% - \begingroup \pIIe@defaultUL\pIIe@maxovalrad{#1}% - \ifdim\pIIe@maxovalrad<\z@ \pIIe@badcircarg \fi - \pIIe@oldoval} -\def\@oval(#1,#2)[#3]{% - \@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 - \@xdim\@ovxx \advance\@xdim-\@tempdimc - \@ydim\@ovyy \advance\@ydim-\@tempdimc - \pIIe@get@quadrants{#3}% - \ifnum15=\@tempcnta \buttcap \fi - \@tempswatrue - \ifnum9=\@tempcnta + \pIIe@lineto\@xdim\@ydim + \pIIe@curveto\@clnwd\@clnht\@ovro\@ovri\@linelen\z@} + \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\@tempdimc + \@ovxx\strip@pt\@ovyy\@tempdimc + \advance\@ovxx\@xdim + \advance\@ovdx\@xdim + \pIIe@moveto\@linelen\z@ + \pIIe@lineto\@xdim{-\@ydim}% + \ifdim\@xdim>\z@ + \pIIe@lineto\@ovxx{-\@halfwidth}% + \pIIe@lineto\z@{-\@halfwidth}% + \pIIe@lineto\z@{\@halfwidth}% + \pIIe@lineto\@ovxx{\@halfwidth}% + \else + \pIIe@lineto\@ovdx\z@ + \fi + \pIIe@lineto\@xdim\@ydim + \pIIe@lineto\@linelen\z@} + \def\@circle#1{\begingroup \@tempswafalse\pIIe@circ{#1}} + \def\@dot#1{\begingroup \@tempswatrue\pIIe@circ{#1}} + \newcommand*\pIIe@circ[1]{% + \@tempdima#1\unitlength + \ifdim\@tempdima<\z@ \pIIe@badcircarg \fi + \divide\@tempdima\tw@ + \pIIe@circle\@tempdima + \if@tempswa \pIIe@fillGraph \else \pIIe@strokeGraph \fi + \endgroup} + \newcommand*\pIIe@circle[1]{% + \begingroup + \buttcap + \pIIe@qcircle[1]\z@{#1}\pIIe@qcircle \@ne{#1}% + \pIIe@qcircle \tw@{#1}\pIIe@qcircle\thr@@{#1}% + \endgroup} + \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 + \pIIe@@qcircle\@ovro\z@\z@\@ovri\@tempdimc\@ovro{-\@ovro}\@ovro + \or + \pIIe@@qcircle\z@\@ovro{-\@ovri}\z@{-\@ovro}\@tempdimc{-\@ovro}{-\@ovro}% + \or + \pIIe@@qcircle{-\@ovro}\z@\z@{-\@ovri}{-\@tempdimc}{-\@ovro}\@ovro{-\@ovro}% + \or + \pIIe@@qcircle\z@{-\@ovro}\@ovri\z@\@ovro{-\@tempdimc}\@ovro\@ovro + \fi + \endgroup} + \newcommand*\pIIe@@qcircle[8]{% + \if@tempswa\pIIe@moveto{#1}{#2}\fi \pIIe@rcurveto{#3}{#4}{#5}{#6}{#7}{#8}} + \newcommand*\pIIe@badcircarg{% + \PackageError{pict2e}% + {Illegal argument in \protect\circle(*), \protect\oval, \protect\arc(*) or + \protect\circlearc.}% + {The radius of a circle, dot, arc or oval corner must be greater than zero.}}% + \newcommand*\maxovalrad{20pt} + \newcommand*\pIIe@defaultUL[2]{% + \afterassignment\pIIe@def@UL\dimen@#2\unitlength\relax{#1}{#2}} + \newcommand*\pIIe@def@UL{} + \def\pIIe@def@UL#1\relax#2#3{% + \edef#2{\the\dimen@}} + \newcommand*\pIIe@maxovalrad{} + \renewcommand*\oval[1][\maxovalrad]{% + \begingroup \pIIe@defaultUL\pIIe@maxovalrad{#1}% + \ifdim\pIIe@maxovalrad<\z@ \pIIe@badcircarg \fi + \pIIe@oldoval} + \def\@oval(#1,#2)[#3]{% + \@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 + \@xdim\@ovxx \advance\@xdim-\@tempdimc + \@ydim\@ovyy \advance\@ydim-\@tempdimc + \pIIe@get@quadrants{#3}% + \ifnum15=\@tempcnta \buttcap \fi + \@tempswatrue + \ifnum9=\@tempcnta + \pIIe@qoval\z@{-\@ovyy}{\@xdim}{-\@ovyy}\thr@@\@tempdimc\@ovxx\z@ + \@tempcnta\@ne + \fi + \pIIe@qoval\@ovxx\z@\@ovxx\@ydim\z@\@tempdimc\z@\@ovyy + \pIIe@qoval\z@\@ovyy{-\@xdim}\@ovyy\@ne\@tempdimc{-\@ovxx}\z@ + \pIIe@qoval{-\@ovxx}\z@{-\@ovxx}{-\@ydim}\tw@\@tempdimc\z@{-\@ovyy}% \pIIe@qoval\z@{-\@ovyy}{\@xdim}{-\@ovyy}\thr@@\@tempdimc\@ovxx\z@ - \@tempcnta\@ne - \fi - \pIIe@qoval\@ovxx\z@\@ovxx\@ydim\z@\@tempdimc\z@\@ovyy - \pIIe@qoval\z@\@ovyy{-\@xdim}\@ovyy\@ne\@tempdimc{-\@ovxx}\z@ - \pIIe@qoval{-\@ovxx}\z@{-\@ovxx}{-\@ydim}\tw@\@tempdimc\z@{-\@ovyy}% - \pIIe@qoval\z@{-\@ovyy}{\@xdim}{-\@ovyy}\thr@@\@tempdimc\@ovxx\z@ - \pIIe@strokeGraph - \endgroup} + \pIIe@strokeGraph + \endgroup} \newcommand*\pIIe@qoval[8]{% \ifodd\@tempcnta \if@tempswa\pIIe@moveto{#1}{#2}\fi @@ -558,8 +566,9 @@ \if@ovr \if@ovb\@setfpsbit2\fi \if@ovt\@setfpsbit4\fi \fi \if@ovl \if@ovb\@setfpsbit1\fi \if@ovt\@setfpsbit8\fi \fi} \def\@bezier#1(#2,#3)(#4,#5)(#6,#7){% - \@killglue - \begingroup + \ifnum #1=\z@ + \@killglue + \begingroup \@ovxx#2\unitlength \@ovyy#3\unitlength \@ovdx#4\unitlength \@ovdy#5\unitlength \@xdim#6\unitlength \@ydim#7\unitlength @@ -570,78 +579,81 @@ \pIIe@moveto\@ovxx\@ovyy \pIIe@curveto\@ovro\@ovri\@clnwd\@clnht\@xdim\@ydim \pIIe@strokeGraph - \endgroup - \ignorespaces} - \newcommand*\pIIe@bezier@QtoC[3]{% - \@tempdimc#1\relax \advance\@tempdimc-#2\relax - \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax - #3\@tempdimc} -\ifx\undefined\@arclen \newdimen\@arclen \fi -\ifx\undefined\@arcrad \newdimen\@arcrad \fi -\ifx\undefined\@tempdimd \newdimen\@tempdimd \fi -\newcommand*\pIIe@arc[6][0]{% - \@arcrad #4\relax - \ifdim \@arcrad<\z@ \pIIe@badcircarg \else - \@arclen #6\p@ \advance\@arclen -#5\p@ - \ifdim \@arclen<\z@ \def\sign{-}\else\def\sign{}\fi - \ifdim \sign\@arclen>720\p@ - \PackageWarning {pict2e}{The arc angle is reduced to -720..720}% - \@whiledim \sign\@arclen>720\p@ \do {\advance\@arclen-\sign360\p@}% + \endgroup + \ignorespaces + \else + \pIIe@old@bezier{#1}(#2,#3)(#4,#5)(#6,#7) + \fi} + \newcommand*\pIIe@bezier@QtoC[3]{% + \@tempdimc#1\relax \advance\@tempdimc-#2\relax + \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax + #3\@tempdimc} + \ifx\undefined\@arclen \newdimen\@arclen \fi + \ifx\undefined\@arcrad \newdimen\@arcrad \fi + \ifx\undefined\@tempdimd \newdimen\@tempdimd \fi + \newcommand*\pIIe@arc[6][0]{% + \@arcrad #4\relax + \ifdim \@arcrad<\z@ \pIIe@badcircarg \else + \@arclen #6\p@ \advance\@arclen -#5\p@ + \ifdim \@arclen<\z@ \def\sign{-}\else\def\sign{}\fi + \ifdim \sign\@arclen>720\p@ + \PackageWarning {pict2e}{The arc angle is reduced to -720..720}% + \@whiledim \sign\@arclen>720\p@ \do {\advance\@arclen-\sign360\p@}% + \@tempdima #5\p@ \advance\@tempdima \@arclen + \edef\@angleend{\strip@pt\@tempdima}% + \pIIe@@arc{#1}{#2}{#3}{#4}{#5}{\@angleend}% + \else + \pIIe@@arc{#1}{#2}{#3}{#4}{#5}{#6}% + \fi + \fi} + \newcommand*\pIIe@@arc[6]{% + \begingroup + \ifdim \sign\@arclen>90\p@ + \divide\@arclen 2 \@tempdima #5\p@ \advance\@tempdima \@arclen - \edef\@angleend{\strip@pt\@tempdima}% - \pIIe@@arc{#1}{#2}{#3}{#4}{#5}{\@angleend}% + \edef\@anglemid{\strip@pt\@tempdima}% + \def\@temp{\pIIe@@arc{#1}{#2}{#3}{#4}{#5}}% + \expandafter\@temp\expandafter{\@anglemid}% + \def\@temp{\pIIe@@arc{2}{#2}{#3}{#4}}% + \expandafter\@temp\expandafter{\@anglemid}{#6}% \else - \pIIe@@arc{#1}{#2}{#3}{#4}{#5}{#6}% - \fi - \fi} -\newcommand*\pIIe@@arc[6]{% - \begingroup - \ifdim \sign\@arclen>90\p@ - \divide\@arclen 2 - \@tempdima #5\p@ \advance\@tempdima \@arclen - \edef\@anglemid{\strip@pt\@tempdima}% - \def\@temp{\pIIe@@arc{#1}{#2}{#3}{#4}{#5}}% - \expandafter\@temp\expandafter{\@anglemid}% - \def\@temp{\pIIe@@arc{2}{#2}{#3}{#4}}% - \expandafter\@temp\expandafter{\@anglemid}{#6}% - \else - \CalculateSin{#5}\CalculateCos{#5}% - \@tempdima\UseCos{#5}\@arcrad \advance\@tempdima #2\relax - \@tempdimb\UseSin{#5}\@arcrad \advance\@tempdimb #3\relax - \ifcase #1\relax - \pIIe@lineto\@tempdima\@tempdimb - \or \pIIe@moveto\@tempdima\@tempdimb - \or - \else \PackageWarning {pict2e}% - {Illegal obligatory argument in \protect\circlearc.}% + \CalculateSin{#5}\CalculateCos{#5}% + \@tempdima\UseCos{#5}\@arcrad \advance\@tempdima #2\relax + \@tempdimb\UseSin{#5}\@arcrad \advance\@tempdimb #3\relax + \ifcase #1\relax + \pIIe@lineto\@tempdima\@tempdimb + \or \pIIe@moveto\@tempdima\@tempdimb + \or + \else \PackageWarning {pict2e}% + {Illegal obligatory argument in \protect\circlearc.}% + \fi + \@tempdimc\@arclen \divide\@tempdimc\@iv + \edef\@angle{\strip@pt\@tempdimc}\CalculateTan{\@angle}% + \@linelen\UseTan{\@angle}\@arcrad \@linelen4\@linelen \divide\@linelen\thr@@ + \advance\@tempdima-\UseSin{#5}\@linelen + \advance\@tempdimb \UseCos{#5}\@linelen + \pIIe@add@nums\@tempdima\@tempdimb + \CalculateSin{#6}\CalculateCos{#6}% + \@tempdima \UseCos{#6}\@arcrad \advance\@tempdima #2\relax + \@tempdimb \UseSin{#6}\@arcrad \advance\@tempdimb #3\relax + \@tempdimc \UseSin{#6}\@linelen \advance\@tempdimc \@tempdima + \@tempdimd-\UseCos{#6}\@linelen \advance\@tempdimd \@tempdimb + \pIIe@add@nums\@tempdimc\@tempdimd + \pIIe@add@CP\@tempdima\@tempdimb + \pIIe@addtoGraph\pIIe@curveto@op \fi - \@tempdimc\@arclen \divide\@tempdimc\@iv - \edef\@angle{\strip@pt\@tempdimc}\CalculateTan{\@angle}% - \@linelen\UseTan{\@angle}\@arcrad \@linelen4\@linelen \divide\@linelen\thr@@ - \advance\@tempdima-\UseSin{#5}\@linelen - \advance\@tempdimb \UseCos{#5}\@linelen - \pIIe@add@nums\@tempdima\@tempdimb - \CalculateSin{#6}\CalculateCos{#6}% - \@tempdima \UseCos{#6}\@arcrad \advance\@tempdima #2\relax - \@tempdimb \UseSin{#6}\@arcrad \advance\@tempdimb #3\relax - \@tempdimc \UseSin{#6}\@linelen \advance\@tempdimc \@tempdima - \@tempdimd-\UseCos{#6}\@linelen \advance\@tempdimd \@tempdimb - \pIIe@add@nums\@tempdimc\@tempdimd - \pIIe@add@CP\@tempdima\@tempdimb - \pIIe@addtoGraph\pIIe@curveto@op - \fi - \endgroup} -\newcommand*\arc{\@ifstar{\@tempswatrue\@arc}{\@tempswafalse\@arc}} -\newcommand*\@arc[2][0,360]{\@@arc(#1){#2}} -\def\@@arc(#1,#2)#3{% - \if@tempswa - \pIIe@moveto\z@\z@ - \pIIe@arc{\z@}{\z@}{#3\unitlength}{#1}{#2}% - \pIIe@closepath\pIIe@fillGraph - \else - \pIIe@arc[1]{\z@}{\z@}{#3\unitlength}{#1}{#2}% - \pIIe@strokeGraph - \fi} + \endgroup} + \newcommand*\arc{\@ifstar{\@tempswatrue\@arc}{\@tempswafalse\@arc}} + \newcommand*\@arc[2][0,360]{\@@arc(#1){#2}} + \def\@@arc(#1,#2)#3{% + \if@tempswa + \pIIe@moveto\z@\z@ + \pIIe@arc{\z@}{\z@}{#3\unitlength}{#1}{#2}% + \pIIe@closepath\pIIe@fillGraph + \else + \pIIe@arc[1]{\z@}{\z@}{#3\unitlength}{#1}{#2}% + \pIIe@strokeGraph + \fi} \let\lp@r( \let\rp@r) \def\Line(#1,#2)(#3,#4){\polyline(#1,#2)(#3,#4)} \def\polyline(#1,#2){% |