summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/curve2e
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-10-19 03:01:18 +0000
committerNorbert Preining <norbert@preining.info>2019-10-19 03:01:18 +0000
commit13a044b932f3f8d72791ca88eda528bdcbadcacc (patch)
treed87487092f80c71150850493e583bfdfe3f80e84 /macros/latex/contrib/curve2e
parent05b01edf56c54f79f4d3bd69677b1946f31ef5b8 (diff)
CTAN sync 201910190301
Diffstat (limited to 'macros/latex/contrib/curve2e')
-rw-r--r--macros/latex/contrib/curve2e/README.txt20
-rw-r--r--macros/latex/contrib/curve2e/curve2e-v161.sty906
-rw-r--r--macros/latex/contrib/curve2e/curve2e.dtx319
-rw-r--r--macros/latex/contrib/curve2e/curve2e.pdfbin513014 -> 670168 bytes
-rw-r--r--macros/latex/contrib/curve2e/curve2e.sty729
5 files changed, 1865 insertions, 109 deletions
diff --git a/macros/latex/contrib/curve2e/README.txt b/macros/latex/contrib/curve2e/README.txt
index 63631d80e6..3e797117be 100644
--- a/macros/latex/contrib/curve2e/README.txt
+++ b/macros/latex/contrib/curve2e/README.txt
@@ -10,7 +10,7 @@
%% License information appended
%%
File README.txt for package curve2e
- [2019-03-29 v.2.0.1 Extension package for pict2e]
+ [2019-10-17 v.2.0.3 Extension package for pict2e]
@@ -22,8 +22,8 @@ README.txt
curve2e-v161.sty
ltxdoc.cfg
-curve2e.dtx is the documented TeX source file of file curve2e.sty; you get
-both curve2e.sty and curve2e.pdf by running pdflatex on curve2e.dtx.
+curve2e.dtx is the documented TeX source file of file curve2e.sty; you
+get both curve2e.sty and curve2e.pdf by running pdflatex on curve2e.dtx.
The ltxdoc.cfg file customises the way the documentation file is typeset.
This .cfg file is not subject to the LPPL licence.
@@ -37,18 +37,22 @@ standard picture LaTeX environment according to what Leslie Lamport
specified in the second edition of his LaTeX manual.
This further extension allows to draw lines and vectors with any non
-integer slope parameters, to draw dashed lined of any slope, to draw arcs
+integer slope parameters, to draw dashed lines of any slope, to draw arcs
and curved vectors, to draw curves where just the interpolating nodes are
-specified together with the slopes at the nodes; closed paths of any shape
-can be filled with color; all coordinates are treated as ordered pairs,
-i.e. 'complex numbers'; coordinates may be expressed also in polar form.
+specified together with the slopes at the nodes; closed paths of any
+shape can be filled with color; all coordinates are treated as ordered
+pairs, i.e. 'complex numbers'; coordinates may be expressed also in
+polar form.
Some of these features have been incorporated in the 2011 version of
pict2e; therefore this package avoids any modification to the original
pict2e commands.
Curve2e now accepts polar coordinates in addition to the usual cartesian
ones; several macros have been upgraded and a new macro for tracing cubic
-Bezier splines with their control nodes specified in polar form is available. The same applies to quadratic Bezier splines.
+Bezier splines with their control nodes specified in polar form is
+available. The same applies to quadratic Bezier splines. The multiput
+command has been completely modified in a backwards compatible way, as
+to manipulate the increment components.
This version solves a conflict with package eso-pic.
diff --git a/macros/latex/contrib/curve2e/curve2e-v161.sty b/macros/latex/contrib/curve2e/curve2e-v161.sty
new file mode 100644
index 0000000000..af7081e23d
--- /dev/null
+++ b/macros/latex/contrib/curve2e/curve2e-v161.sty
@@ -0,0 +1,906 @@
+%%
+%% This is file `curve2e-v161.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% curve2e.dtx (with options: `v161')
+%%
+%% Copyright (C) 2005--2019 Claudio Beccari all rights reserved.
+%% License information appended
+%%
+
+
+
+\NeedsTeXFormat{LaTeX2e}[2016/01/01]
+\ProvidesPackage{curve2e-v161}%
+ [2019/02/07 v.1.61 Extension package for pict2e]
+
+\RequirePackage{color}
+\RequirePackageWithOptions{pict2e}[2014/01/01]
+\RequirePackage{xparse}
+\def\TRON{\tracingcommands\tw@ \tracingmacros\tw@}%
+\def\TROF{\tracingcommands\z@ \tracingmacros\z@}%
+\ifx\undefined\@tdA \newdimen\@tdA \fi
+\ifx\undefined\@tdB \newdimen\@tdB \fi
+\ifx\undefined\@tdC \newdimen\@tdC \fi
+\ifx\undefined\@tdD \newdimen\@tdD \fi
+\ifx\undefined\@tdE \newdimen\@tdE \fi
+\ifx\undefined\@tdF \newdimen\@tdF \fi
+\ifx\undefined\defaultlinewidth \newdimen\defaultlinewidth \fi
+\gdef\linethickness#1{\@wholewidth#1\@halfwidth.5\@wholewidth\ignorespaces}%
+\newcommand\defaultlinethickness[1]{\defaultlinewidth=#1\relax
+\def\thicklines{\linethickness{\defaultlinewidth}}%
+\def\thinlines{\linethickness{.5\defaultlinewidth}}%
+\thinlines\ignorespaces}
+\def\LIne(#1){{\GetCoord(#1)\@tX\@tY
+ \moveto(0,0)
+ \pIIe@lineto{\@tX\unitlength}{\@tY\unitlength}\strokepath}\ignorespaces}%
+\def\segment(#1)(#2){\@killglue\polyline(#1)(#2)}%
+\def\line(#1)#2{\begingroup
+ \@linelen #2\unitlength
+ \ifdim\@linelen<\z@\@badlinearg\else
+ \expandafter\DirOfVect#1to\Dir@line
+ \GetCoord(\Dir@line)\d@mX\d@mY
+ \ifdim\d@mX\p@=\z@\else
+ \DividE\ifdim\d@mX\p@<\z@-\fi\p@ by\d@mX\p@ to\sc@lelen
+ \@linelen=\sc@lelen\@linelen
+ \fi
+ \moveto(0,0)
+ \pIIe@lineto{\d@mX\@linelen}{\d@mY\@linelen}%
+ \strokepath
+ \fi
+\endgroup\ignorespaces}%
+\ifx\Dashline\undefined
+\def\Dashline{\@ifstar{\Dashline@@}{\Dashline@}}
+\def\Dashline@(#1)(#2)#3{%
+\bgroup
+ \countdef\NumA3254\countdef\NumB3252\relax
+ \GetCoord(#1)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttA
+ \GetCoord(#2)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttB
+ \SubVect\V@ttA from\V@ttB to\V@ttC
+ \ModOfVect\V@ttC to\DlineMod
+ \DivideFN\DlineMod by#3 to\NumD
+ \NumA\expandafter\Integer\NumD.??
+ \ifodd\NumA\else\advance\NumA\@ne\fi
+ \NumB=\NumA \divide\NumB\tw@
+ \DividE\DlineMod\p@ by\NumA\p@ to\D@shMod
+ \DividE\p@ by\NumA\p@ to \@tempa
+ \MultVect\V@ttC by\@tempa,0 to\V@ttB
+ \MultVect\V@ttB by 2,0 to\V@ttC
+ \advance\NumB\@ne
+ \edef\@mpt{\noexpand\egroup
+ \noexpand\multiput(\V@ttA)(\V@ttC){\number\NumB}%
+ {\noexpand\LIne(\V@ttB)}}%
+ \@mpt\ignorespaces}%
+\let\Dline\Dashline
+
+\def\Dashline@@(#1)(#2)#3{\put(#1){\Dashline@(0,0)(#2){#3}}}
+\fi
+\ifx\Dotline\undefined
+\def\Dotline{\@ifstar{\Dotline@@}{\Dotline@}}
+\def\Dotline@(#1)(#2)#3{%
+\bgroup
+ \countdef\NumA 3254\relax \countdef\NumB 3255\relax
+ \GetCoord(#1)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttA
+ \GetCoord(#2)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttB
+ \SubVect\V@ttA from\V@ttB to\V@ttC
+ \ModOfVect\V@ttC to\DotlineMod
+ \DivideFN\DotlineMod by#3 to\NumD
+ \NumA=\expandafter\Integer\NumD.??
+ \DivVect\V@ttC by\NumA,0 to\V@ttB
+ \advance\NumA\@ne
+ \edef\@mpt{\noexpand\egroup
+ \noexpand\multiput(\V@ttA)(\V@ttB){\number\NumA}%
+ {\noexpand\makebox(0,0){\noexpand\circle*{0.5}}}}%
+ \@mpt\ignorespaces}%
+
+\def\Dotline@@(#1)(#2)#3{\put(#1){\Dotline@(0,0)(#2){#3}}}
+\fi
+\AtBeginDocument{\@ifpackageloaded{eso-pic}{%
+\renewcommand\LenToUnit[1]{\strip@pt\dimexpr#1*\p@/\unitlength}}{}}
+
+\def\GetCoord(#1)#2#3{%
+\expandafter\SplitNod@\expandafter(#1)#2#3\ignorespaces}
+\def\isnot@polar#1:#2!!{\def\@tempOne{#2}\ifx\@tempOne\empty
+\expandafter\@firstoftwo\else
+\expandafter\@secondoftwo\fi
+{\SplitNod@@}{\SplitPolar@@}}
+
+\def\SplitNod@(#1)#2#3{\isnot@polar#1:!!(#1)#2#3}%
+\def\SplitNod@@(#1,#2)#3#4{\edef#3{#1}\edef#4{#2}}%
+\def\SplitPolar@@(#1:#2)#3#4{\DirFromAngle#1to\@DirA
+\ScaleVect\@DirA by#2to\@DirA
+\expandafter\SplitNod@@\expandafter(\@DirA)#3#4}
+
+\let\originalput\put
+\def\put(#1){\bgroup\GetCoord(#1)\@tX\@tY
+\edef\x{\noexpand\egroup\noexpand\originalput(\@tX,\@tY)}\x}
+
+\let\originalmultiput\multiput
+\let\original@multiput\@multiput
+
+\long\def\@multiput(#1)#2#3{\bgroup\GetCoord(#1)\@mptX\@mptY
+\edef\x{\noexpand\egroup\noexpand\original@multiput(\@mptX,\@mptY)}%
+\x{#2}{#3}\ignorespaces}
+
+\gdef\multiput(#1)#2{\bgroup\GetCoord(#1)\@mptX\@mptY
+\edef\x{\noexpand\egroup\noexpand\originalmultiput(\@mptX,\@mptY)}\x(}%)
+ \def\vector(#1)#2{%
+ \begingroup
+ \GetCoord(#1)\d@mX\d@mY
+ \@linelen#2\unitlength
+ \ifdim\d@mX\p@=\z@\ifdim\d@mY\p@=\z@\@badlinearg\fi\fi
+ \ifdim\@linelen<\z@ \@linelen=-\@linelen\fi
+ \MakeVectorFrom\d@mX\d@mY to\@Vect
+ \DirOfVect\@Vect to\Dir@Vect
+ \YpartOfVect\Dir@Vect to\@ynum \@ydim=\@ynum\p@
+ \XpartOfVect\Dir@Vect to\@xnum \@xdim=\@xnum\p@
+ \ifdim\d@mX\p@=\z@
+ \else\ifdim\d@mY\p@=\z@
+ \else
+ \DividE\ifdim\@xnum\p@<\z@-\fi\p@ by\@xnum\p@ to\sc@lelen
+ \@linelen=\sc@lelen\@linelen
+ \fi
+ \fi
+ \@tdB=\@linelen
+\pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim{\@xnum\@linelen}{\@ynum\@linelen}%
+ \@linelen\z@
+ \pIIe@vector
+ \fillpath
+ \@linelen=\@tdB
+ \@tdA=\pIIe@FAW\@wholewidth
+ \@tdA=\pIIe@FAL\@tdA
+ \advance\@linelen-\@tdA
+ \ifdim\@linelen>\z@
+ \moveto(0,0)
+ \pIIe@lineto{\@xnum\@linelen}{\@ynum\@linelen}%
+ \strokepath\fi
+ \endgroup}
+\def\Vector(#1){{%
+\GetCoord(#1)\@tX\@tY
+\ifdim\@tX\p@=\z@\vector(\@tX,\@tY){\@tY}
+\else
+\vector(\@tX,\@tY){\@tX}\fi}}
+\def\VECTOR(#1)(#2){\begingroup
+\SubVect#1from#2to\@tempa
+\expandafter\put\expandafter(#1){\expandafter\Vector\expandafter(\@tempa)}%
+\endgroup\ignorespaces}
+\let\lp@r( \let\rp@r)
+\renewcommand*\polyline[1][\beveljoin]{\p@lylin@[#1]}
+
+\def\p@lylin@[#1](#2){\@killglue#1\GetCoord(#2)\d@mX\d@mY
+ \pIIe@moveto{\d@mX\unitlength}{\d@mY\unitlength}%
+ \@ifnextchar\lp@r{\p@lyline}{%
+ \PackageWarning{curve2e}%
+ {Polylines require at least two vertices!\MessageBreak
+ Control your polyline specification\MessageBreak}%
+ \ignorespaces}}
+
+\def\p@lyline(#1){\GetCoord(#1)\d@mX\d@mY
+ \pIIe@lineto{\d@mX\unitlength}{\d@mY\unitlength}%
+ \@ifnextchar\lp@r{\p@lyline}{\strokepath\ignorespaces}}
+\providecommand\polygon{}
+\RenewDocumentCommand\polygon{s O{\beveljoin} }{\@killglue\begingroup
+\IfBooleanTF{#1}{\@tempswatrue}{\@tempswafalse}%
+\@polygon[#2]}
+
+\def\@polygon[#1](#2){\@killglue#1\GetCoord(#2)\d@mX\d@mY
+ \pIIe@moveto{\d@mX\unitlength}{\d@mY\unitlength}%
+ \@ifnextchar\lp@r{\@@polygon}{%
+ \PackageWarning{curve2e}%
+ {Polygons require at least two vertices!\MessageBreak
+ Control your polygon specification\MessageBreak}%
+ \ignorespaces}}
+
+ \def\@@polygon(#1){\GetCoord(#1)\d@mX\d@mY
+ \pIIe@lineto{\d@mX\unitlength}{\d@mY\unitlength}%
+ \@ifnextchar\lp@r{\@@polygon}{\pIIe@closepath
+ \if@tempswa\pIIe@fillGraph\else\pIIe@strokeGraph\fi
+ \endgroup
+ \ignorespaces}}
+\def\GraphGrid(#1,#2){\bgroup\textcolor{red}{\linethickness{.1\p@}%
+\RoundUp#1modulo10to\@GridWd \RoundUp#2modulo10to\@GridHt
+\@tempcnta=\@GridWd \divide\@tempcnta10\relax \advance\@tempcnta\@ne
+\multiput(0,0)(10,0){\@tempcnta}{\line(0,1){\@GridHt}}%
+\@tempcnta=\@GridHt \divide\@tempcnta10\advance\@tempcnta\@ne
+\multiput(0,0)(0,10){\@tempcnta}{\line(1,0){\@GridWd}}\thinlines}%
+\egroup\ignorespaces}
+\def\RoundUp#1modulo#2to#3{\expandafter\@tempcnta\Integer#1.??%
+\count254\@tempcnta\divide\count254by#2\relax
+\multiply\count254by#2\relax
+\count252\@tempcnta\advance\count252-\count254
+\ifnum\count252>0\advance\count252-#2\relax
+\advance\@tempcnta-\count252\fi\edef#3{\number\@tempcnta}\ignorespaces}%
+\def\Integer#1.#2??{#1}%
+\ifdefined\dimexpr
+ \unless\ifdefined\DividE
+\def\DividE#1by#2to#3{\bgroup
+\dimendef\Num2254\relax \dimendef\Den2252\relax
+\dimendef\@DimA 2250
+\Num=\p@ \Den=#2\relax
+\ifdim\Den=\z@
+ \edef\x{\noexpand\endgroup\noexpand\def\noexpand#3{\strip@pt\maxdimen}}%
+\else
+ \@DimA=#1\relax
+ \edef\x{%
+ \noexpand\egroup\noexpand\def\noexpand#3{%
+ \strip@pt\dimexpr\@DimA*\Num/\Den\relax}}%
+\fi
+\x\ignorespaces}%
+\fi
+ \unless\ifdefined\DivideFN
+ \def\DivideFN#1by#2to#3{\DividE#1\p@ by#2\p@ to{#3}}%
+ \fi
+ \unless\ifdefined\MultiplY
+ \def\MultiplY#1by#2to#3{\bgroup
+ \dimendef\@DimA 2254 \dimendef\@DimB2255
+ \@DimA=#1\p@\relax \@DimB=#2\p@\relax
+ \edef\x{%
+ \noexpand\egroup\noexpand\def\noexpand#3{%
+ \strip@pt\dimexpr\@DimA*\@DimB/\p@\relax}}%
+ \x\ignorespaces}%
+ \let\MultiplyFN\MultiplY
+ \fi
+\fi
+
+\unless\ifdefined\Numero
+ \def\Numero#1#2{\bgroup\dimen3254=#2\relax
+ \edef\x{\noexpand\egroup\noexpand\edef\noexpand#1{%
+ \strip@pt\dimen3254}}\x\ignorespaces}%
+\fi
+\def\g@tTanCotanFrom#1to#2and#3{%
+\DividE 114.591559\p@ by#1to\X@ \@tdB=\X@\p@
+\countdef\I=2546\def\Tan{0}\I=11\relax
+\@whilenum\I>\z@\do{%
+ \@tdC=\Tan\p@ \@tdD=\I\@tdB
+ \advance\@tdD-\@tdC \DividE\p@ by\@tdD to\Tan
+ \advance\I-2\relax}%
+\def#2{\Tan}\DividE\p@ by\Tan\p@ to\Cot \def#3{\Cot}\ignorespaces}%
+\def\SinOf#1to#2{\bgroup%
+\@tdA=#1\p@%
+\ifdim\@tdA>\z@%
+ \@whiledim\@tdA>180\p@\do{\advance\@tdA -360\p@}%
+\else%
+ \@whiledim\@tdA<-180\p@\do{\advance\@tdA 360\p@}%
+\fi \ifdim\@tdA=\z@
+ \def\@tempA{0}%
+\else
+ \ifdim\@tdA>\z@
+ \def\Segno{+}%
+ \else
+ \def\Segno{-}%
+ \@tdA=-\@tdA
+ \fi
+ \ifdim\@tdA>90\p@
+ \@tdA=-\@tdA \advance\@tdA 180\p@
+ \fi
+ \ifdim\@tdA=90\p@
+ \def\@tempA{\Segno1}%
+ \else
+ \ifdim\@tdA=180\p@
+ \def\@tempA{0}%
+ \else
+ \ifdim\@tdA<\p@
+ \@tdA=\Segno0.0174533\@tdA
+ \DividE\@tdA by\p@ to \@tempA%
+ \else
+ \g@tTanCotanFrom\@tdA to\T and\Tp
+ \@tdA=\T\p@ \advance\@tdA \Tp\p@
+ \DividE \Segno2\p@ by\@tdA to \@tempA%
+ \fi
+ \fi
+ \fi
+\fi
+\edef\endSinOf{\noexpand\egroup
+ \noexpand\def\noexpand#2{\@tempA}\noexpand\ignorespaces}%
+\endSinOf}%
+\def\CosOf#1to#2{\bgroup%
+\@tdA=#1\p@%
+\ifdim\@tdA>\z@%
+ \@whiledim\@tdA>360\p@\do{\advance\@tdA -360\p@}%
+\else%
+ \@whiledim\@tdA<\z@\do{\advance\@tdA 360\p@}%
+\fi
+\ifdim\@tdA>180\p@
+ \@tdA=-\@tdA \advance\@tdA 360\p@
+\fi
+\ifdim\@tdA<90\p@
+ \def\Segno{+}%
+\else
+ \def\Segno{-}%
+ \@tdA=-\@tdA \advance\@tdA 180\p@
+\fi
+\ifdim\@tdA=\z@
+ \def\@tempA{\Segno1}%
+\else
+ \ifdim\@tdA<\p@
+ \@tdA=0.0174533\@tdA \Numero\@tempA\@tdA
+ \@tdA=\@tempA\@tdA \@tdA=-.5\@tdA
+ \advance\@tdA \p@
+ \DividE\@tdA by\p@ to\@tempA%
+ \else
+ \ifdim\@tdA=90\p@
+ \def\@tempA{0}%
+ \else
+ \g@tTanCotanFrom\@tdA to\T and\Tp
+ \@tdA=\Tp\p@ \advance\@tdA-\T\p@
+ \@tdB=\Tp\p@ \advance\@tdB\T\p@
+ \DividE\Segno\@tdA by\@tdB to\@tempA%
+ \fi
+ \fi
+\fi
+\edef\endCosOf{\noexpand\egroup
+ \noexpand\def\noexpand#2{\@tempA}\noexpand\ignorespaces}%
+\endCosOf}%
+\def\TanOf#1to#2{\bgroup%
+\@tdA=#1\p@%
+\ifdim\@tdA>90\p@%
+ \@whiledim\@tdA>90\p@\do{\advance\@tdA -180\p@}%
+\else%
+ \@whiledim\@tdA<-90\p@\do{\advance\@tdA 180\p@}%
+\fi%
+\ifdim\@tdA=\z@%
+ \def\@tempA{0}%
+\else
+ \ifdim\@tdA>\z@
+ \def\Segno{+}%
+ \else
+ \def\Segno{-}%
+ \@tdA=-\@tdA
+ \fi
+ \ifdim\@tdA=90\p@
+ \def\@tempA{\Segno16383.99999}%
+ \else
+ \ifdim\@tdA<\p@
+ \@tdA=\Segno0.0174533\@tdA
+ \DividE\@tdA by\p@ to\@tempA%
+ \else
+ \g@tTanCotanFrom\@tdA to\T and\Tp
+ \@tdA\Tp\p@ \advance\@tdA -\T\p@
+ \DividE\Segno2\p@ by\@tdA to\@tempA%
+ \fi
+ \fi
+\fi
+\edef\endTanOf{\noexpand\egroup
+ \noexpand\def\noexpand#2{\@tempA}\noexpand\ignorespaces}%
+\endTanOf}%
+\def\ArcTanOf#1to#2{\bgroup
+\countdef\Inverti 4444\Inverti=0
+\def\Segno{}
+\edef\@tF{#1}\@tdF=\@tF\p@ \@tdE=57.295778\p@
+\@tdD=\ifdim\@tdF<\z@ -\@tdF\def\Segno{-}\else\@tdF\fi
+\ifdim\@tdD>\p@
+\Inverti=\@ne
+\@tdD=\dimexpr\p@*\p@/\@tdD\relax
+\fi
+\unless\ifdim\@tdD>0.02\p@
+ \def\@tX{\strip@pt\dimexpr57.295778\@tdD\relax}%
+\else
+ \edef\@tX{45}\relax
+ \countdef\I 2523 \I=9\relax
+ \@whilenum\I>0\do{\TanOf\@tX to\@tG
+ \edef\@tG{\strip@pt\dimexpr\@tG\p@-\@tdD\relax}\relax
+ \MultiplY\@tG by57.295778to\@tG
+ \CosOf\@tX to\@tH
+ \MultiplY\@tH by\@tH to\@tH
+ \MultiplY\@tH by\@tG to \@tH
+ \edef\@tX{\strip@pt\dimexpr\@tX\p@ - \@tH\p@\relax}\relax
+ \advance\I\m@ne}%
+\fi
+\ifnum\Inverti=\@ne
+\edef\@tX{\strip@pt\dimexpr90\p@-\@tX\p@\relax}
+\fi
+\edef\x{\egroup\noexpand\edef\noexpand#2{\Segno\@tX}}\x\ignorespaces}%
+\def\MakeVectorFrom#1#2to#3{\edef#3{#1,#2}\ignorespaces}%
+\def\CopyVect#1to#2{\edef#2{#1}\ignorespaces}%
+\def\ModOfVect#1to#2{\GetCoord(#1)\t@X\t@Y
+\@tempdima=\t@X\p@ \ifdim\@tempdima<\z@ \@tempdima=-\@tempdima\fi
+\@tempdimb=\t@Y\p@ \ifdim\@tempdimb<\z@ \@tempdimb=-\@tempdimb\fi
+\ifdim\@tempdima=\z@
+ \ifdim\@tempdimb=\z@
+ \def\@T{0}\@tempdimc=\z@
+ \else
+ \def\@T{0}\@tempdimc=\@tempdimb
+ \fi
+\else
+ \ifdim\@tempdima>\@tempdimb
+ \DividE\@tempdimb by\@tempdima to\@T
+ \@tempdimc=\@tempdima
+ \else
+ \DividE\@tempdima by\@tempdimb to\@T
+ \@tempdimc=\@tempdimb
+ \fi
+\fi
+\unless\ifdim\@tempdimc=\z@
+ \unless\ifdim\@T\p@=\z@
+ \@tempdima=\@T\p@ \@tempdima=\@T\@tempdima
+ \advance\@tempdima\p@%
+ \@tempdimb=\p@%
+ \@tempcnta=5\relax
+ \@whilenum\@tempcnta>\z@\do{\DividE\@tempdima by\@tempdimb to\@T
+ \advance\@tempdimb \@T\p@ \@tempdimb=.5\@tempdimb
+ \advance\@tempcnta\m@ne}%
+ \@tempdimc=\@T\@tempdimc
+ \fi
+\fi
+\Numero#2\@tempdimc
+\ignorespaces}%
+\def\DirOfVect#1to#2{\GetCoord(#1)\t@X\t@Y
+\ModOfVect#1to\@tempa
+\unless\ifdim\@tempdimc=\z@
+ \DividE\t@X\p@ by\@tempdimc to\t@X
+ \DividE\t@Y\p@ by\@tempdimc to\t@Y
+\fi
+\MakeVectorFrom\t@X\t@Y to#2\ignorespaces}%
+\def\ModAndDirOfVect#1to#2and#3{%
+\GetCoord(#1)\t@X\t@Y
+\ModOfVect#1to#2%
+\ifdim\@tempdimc=\z@\else
+ \DividE\t@X\p@ by\@tempdimc to\t@X
+ \DividE\t@Y\p@ by\@tempdimc to\t@Y
+\fi
+\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}%
+\def\DistanceAndDirOfVect#1minus#2to#3and#4{%
+\SubVect#2from#1to\@tempa
+\ModAndDirOfVect\@tempa to#3and#4\ignorespaces}%
+\def\XpartOfVect#1to#2{%
+\GetCoord(#1)#2\@tempa\ignorespaces}%
+\def\YpartOfVect#1to#2{%
+\GetCoord(#1)\@tempa#2\ignorespaces}%
+\def\DirFromAngle#1to#2{%
+\CosOf#1to\t@X
+\SinOf#1to\t@Y
+\MakeVectorFrom\t@X\t@Y to#2\ignorespaces}%
+\def\ArgOfVect#1to#2{\bgroup\GetCoord(#1){\t@X}{\t@Y}%
+\def\s@gno{}\def\addflatt@ngle{0}
+\ifdim\t@X\p@=\z@
+ \ifdim\t@Y\p@=\z@
+ \def\ArcTan{0}%
+ \else
+ \def\ArcTan{90}%
+ \ifdim\t@Y\p@<\z@\def\s@gno{-}\fi
+ \fi
+\else
+ \ifdim\t@Y\p@=\z@
+ \ifdim\t@X\p@<\z@
+ \def\ArcTan{180}%
+ \else
+ \def\ArcTan{0}%
+ \fi
+ \else
+ \ifdim\t@X\p@<\z@%
+ \def\addflatt@ngle{180}%
+ \edef\t@X{\strip@pt\dimexpr-\t@X\p@}%
+ \edef\t@Y{\strip@pt\dimexpr-\t@Y\p@}%
+ \ifdim\t@Y\p@<\z@
+ \def\s@gno{-}%
+ \edef\t@Y{-\t@Y}%
+ \fi
+ \fi
+ \DivideFN\t@Y by\t@X to \t@A
+ \ArcTanOf\t@A to\ArcTan
+ \fi
+\fi
+\edef\ArcTan{\unless\ifx\s@gno\empty\s@gno\fi\ArcTan}%
+\unless\ifnum\addflatt@ngle=0\relax
+ \edef\ArcTan{%
+ \strip@pt\dimexpr\ArcTan\p@\ifx\s@gno\empty-\else+\fi
+ \addflatt@ngle\p@\relax}%
+\fi
+\edef\x{\noexpand\egroup\noexpand\edef\noexpand#2{\ArcTan}}%
+\x\ignorespaces}
+\def\ScaleVect#1by#2to#3{\GetCoord(#1)\t@X\t@Y
+\@tempdima=\t@X\p@ \@tempdima=#2\@tempdima\Numero\t@X\@tempdima
+\@tempdima=\t@Y\p@ \@tempdima=#2\@tempdima\Numero\t@Y\@tempdima
+\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}%
+\def\ConjVect#1to#2{\GetCoord(#1)\t@X\t@Y
+\@tempdima=-\t@Y\p@\Numero\t@Y\@tempdima
+\MakeVectorFrom\t@X\t@Y to#2\ignorespaces}%
+\def\AddVect#1and#2to#3{\GetCoord(#1)\tu@X\tu@Y
+\GetCoord(#2)\td@X\td@Y
+\@tempdima\tu@X\p@\advance\@tempdima\td@X\p@ \Numero\t@X\@tempdima
+\@tempdima\tu@Y\p@\advance\@tempdima\td@Y\p@ \Numero\t@Y\@tempdima
+\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}%
+\def\SubVect#1from#2to#3{\GetCoord(#1)\tu@X\tu@Y
+\GetCoord(#2)\td@X\td@Y
+\@tempdima\td@X\p@\advance\@tempdima-\tu@X\p@ \Numero\t@X\@tempdima
+\@tempdima\td@Y\p@\advance\@tempdima-\tu@Y\p@ \Numero\t@Y\@tempdima
+\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}%
+\def\MultVect#1by{\@ifstar{\@ConjMultVect#1by}{\@MultVect#1by}}%
+\def\@MultVect#1by#2to#3{\GetCoord(#1)\tu@X\tu@Y
+\GetCoord(#2)\td@X\td@Y
+\@tempdima\tu@X\p@ \@tempdimb\tu@Y\p@
+\@tempdimc=\td@X\@tempdima\advance\@tempdimc-\td@Y\@tempdimb
+\Numero\t@X\@tempdimc
+\@tempdimc=\td@Y\@tempdima\advance\@tempdimc\td@X\@tempdimb
+\Numero\t@Y\@tempdimc
+\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}%
+\def\@ConjMultVect#1by#2to#3{\GetCoord(#1)\tu@X\tu@Y
+\GetCoord(#2)\td@X\td@Y \@tempdima\tu@X\p@ \@tempdimb\tu@Y\p@
+\@tempdimc=\td@X\@tempdima\advance\@tempdimc+\td@Y\@tempdimb
+\Numero\t@X\@tempdimc
+\@tempdimc=\td@X\@tempdimb\advance\@tempdimc-\td@Y\@tempdima
+\Numero\t@Y\@tempdimc
+\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}
+\def\DivVect#1by#2to#3{\ModAndDirOfVect#2to\@Mod and\@Dir
+\DividE\p@ by\@Mod\p@ to\@Mod \ConjVect\@Dir to\@Dir
+\ScaleVect#1by\@Mod to\@tempa
+\MultVect\@tempa by\@Dir to#3\ignorespaces}%
+\def\Arc(#1)(#2)#3{\begingroup
+\@tdA=#3\p@
+\unless\ifdim\@tdA=\z@
+ \@Arc(#1)(#2)%
+\fi
+\endgroup\ignorespaces}%
+\def\@Arc(#1)(#2){%
+\ifdim\@tdA>\z@
+ \let\Segno+%
+\else
+ \@tdA=-\@tdA \let\Segno-%
+\fi
+\Numero\@gradi\@tdA
+\ifdim\@tdA>360\p@
+ \PackageWarning{curve2e}{The arc aperture is \@gradi\space degrees
+ and gets reduced\MessageBreak%
+ to the range 0--360 taking the sign into consideration}%
+ \@whiledim\@tdA>360\p@\do{\advance\@tdA-360\p@}%
+\fi
+\SubVect#2from#1to\@V \ModOfVect\@V to\@Raggio \CopyVect#2to\@pPun
+\CopyVect#1to\@Cent \GetCoord(\@pPun)\@pPunX\@pPunY
+\@@Arc
+\strokepath\ignorespaces}%
+\def\@@Arc{%
+\pIIe@moveto{\@pPunX\unitlength}{\@pPunY\unitlength}%
+\ifdim\@tdA>180\p@
+ \advance\@tdA-180\p@
+ \Numero\@gradi\@tdA
+ \SubVect\@pPun from\@Cent to\@V
+ \AddVect\@V and\@Cent to\@sPun
+ \MultVect\@V by0,-1.3333333to\@V \if\Segno-\ScaleVect\@V by-1to\@V\fi
+ \AddVect\@pPun and\@V to\@pcPun
+ \AddVect\@sPun and\@V to\@scPun
+ \GetCoord(\@pcPun)\@pcPunX\@pcPunY
+ \GetCoord(\@scPun)\@scPunX\@scPunY
+ \GetCoord(\@sPun)\@sPunX\@sPunY
+ \pIIe@curveto{\@pcPunX\unitlength}{\@pcPunY\unitlength}%
+ {\@scPunX\unitlength}{\@scPunY\unitlength}%
+ {\@sPunX\unitlength}{\@sPunY\unitlength}%
+ \CopyVect\@sPun to\@pPun
+\fi
+\ifdim\@tdA>\z@
+ \DirFromAngle\@gradi to\@Dir \if\Segno-\ConjVect\@Dir to\@Dir \fi
+ \SubVect\@Cent from\@pPun to\@V
+ \MultVect\@V by\@Dir to\@V
+ \AddVect\@Cent and\@V to\@sPun
+ \@tdA=.5\@tdA \Numero\@gradi\@tdA
+ \DirFromAngle\@gradi to\@Phimezzi
+ \GetCoord(\@Phimezzi)\@cosphimezzi\@sinphimezzi
+ \@tdB=1.3333333\p@ \@tdB=\@Raggio\@tdB
+ \@tdC=\p@ \advance\@tdC -\@cosphimezzi\p@ \Numero\@tempa\@tdC
+ \@tdB=\@tempa\@tdB
+ \DividE\@tdB by\@sinphimezzi\p@ to\@cZ
+ \ScaleVect\@Phimezzi by\@cZ to\@Phimezzi
+ \ConjVect\@Phimezzi to\@mPhimezzi
+ \if\Segno-%
+ \let\@tempa\@Phimezzi
+ \let\@Phimezzi\@mPhimezzi
+ \let\@mPhimezzi\@tempa
+ \fi
+ \SubVect\@sPun from\@pPun to\@V
+ \DirOfVect\@V to\@V
+ \MultVect\@Phimezzi by\@V to\@Phimezzi
+ \AddVect\@sPun and\@Phimezzi to\@scPun
+ \ScaleVect\@V by-1to\@V
+ \MultVect\@mPhimezzi by\@V to\@mPhimezzi
+ \AddVect\@pPun and\@mPhimezzi to\@pcPun
+ \GetCoord(\@pcPun)\@pcPunX\@pcPunY
+ \GetCoord(\@scPun)\@scPunX\@scPunY
+ \GetCoord(\@sPun)\@sPunX\@sPunY
+ \pIIe@curveto{\@pcPunX\unitlength}{\@pcPunY\unitlength}%
+ {\@scPunX\unitlength}{\@scPunY\unitlength}%
+ {\@sPunX\unitlength}{\@sPunY\unitlength}%
+\fi}
+\def\VectorArc(#1)(#2)#3{\begingroup
+\@tdA=#3\p@ \ifdim\@tdA=\z@\else
+ \@VArc(#1)(#2)%
+\fi
+\endgroup\ignorespaces}%
+\def\VectorARC(#1)(#2)#3{\begingroup
+\@tdA=#3\p@
+\ifdim\@tdA=\z@\else
+ \@VARC(#1)(#2)%
+\fi
+\endgroup\ignorespaces}%
+\def\@VArc(#1)(#2){%
+\ifdim\@tdA>\z@
+ \let\Segno+%
+\else
+ \@tdA=-\@tdA \let\Segno-%
+\fi \Numero\@gradi\@tdA
+\ifdim\@tdA>360\p@
+ \PackageWarning{curve2e}{The arc aperture is \@gradi\space degrees
+ and gets reduced\MessageBreak%
+ to the range 0--360 taking the sign into consideration}%
+ \@whiledim\@tdA>360\p@\do{\advance\@tdA-360\p@}%
+\fi
+\SubVect#1from#2to\@V \ModOfVect\@V to\@Raggio \CopyVect#2to\@pPun
+\@tdE=\pIIe@FAW\@wholewidth \@tdE=\pIIe@FAL\@tdE
+\DividE\@tdE by \@Raggio\unitlength to\DeltaGradi
+\@tdD=\DeltaGradi\p@
+\@tdD=57.29578\@tdD \Numero\DeltaGradi\@tdD
+\@tdD=\ifx\Segno--\fi\@gradi\p@ \Numero\@tempa\@tdD
+\DirFromAngle\@tempa to\@Dir
+\MultVect\@V by\@Dir to\@sPun
+\edef\@tempA{\ifx\Segno-\m@ne\else\@ne\fi}%
+\MultVect\@sPun by 0,\@tempA to\@vPun
+\DirOfVect\@vPun to\@Dir
+\AddVect\@sPun and #1 to \@sPun
+\GetCoord(\@sPun)\@tdX\@tdY
+\@tdD\ifx\Segno--\fi\DeltaGradi\p@
+\@tdD=.5\@tdD \Numero\DeltaGradi\@tdD
+\DirFromAngle\DeltaGradi to\@Dird
+\MultVect\@Dir by*\@Dird to\@Dir
+\GetCoord(\@Dir)\@xnum\@ynum
+\put(\@tdX,\@tdY){\vector(\@xnum,\@ynum){0}}%
+\@tdE =\ifx\Segno--\fi\DeltaGradi\p@
+\advance\@tdA -\@tdE \Numero\@gradi\@tdA
+\CopyVect#1to\@Cent \GetCoord(\@pPun)\@pPunX\@pPunY
+\@@Arc
+\strokepath\ignorespaces}%
+\def\@VARC(#1)(#2){%
+\ifdim\@tdA>\z@
+ \let\Segno+%
+\else
+ \@tdA=-\@tdA \let\Segno-%
+\fi \Numero\@gradi\@tdA
+\ifdim\@tdA>360\p@
+ \PackageWarning{curve2e}{The arc aperture is \@gradi\space degrees
+ and gets reduced\MessageBreak%
+ to the range 0--360 taking the sign into consideration}%
+ \@whiledim\@tdA>360\p@\do{\advance\@tdA-360\p@}%
+\fi
+\SubVect#1from#2to\@V \ModOfVect\@V to\@Raggio \CopyVect#2to\@pPun
+\@tdE=\pIIe@FAW\@wholewidth \@tdE=0.8\@tdE
+\DividE\@tdE by \@Raggio\unitlength to\DeltaGradi
+\@tdD=\DeltaGradi\p@ \@tdD=57.29578\@tdD \Numero\DeltaGradi\@tdD
+\@tdD=\if\Segno--\fi\@gradi\p@ \Numero\@tempa\@tdD
+\DirFromAngle\@tempa to\@Dir
+\MultVect\@V by\@Dir to\@sPun% corrects the end point
+\edef\@tempA{\if\Segno--\fi1}%
+\MultVect\@sPun by 0,\@tempA to\@vPun
+\DirOfVect\@vPun to\@Dir
+\AddVect\@sPun and #1 to \@sPun
+\GetCoord(\@sPun)\@tdX\@tdY
+\@tdD\if\Segno--\fi\DeltaGradi\p@
+\@tdD=.5\@tdD \Numero\@tempB\@tdD
+\DirFromAngle\@tempB to\@Dird
+\MultVect\@Dir by*\@Dird to\@Dir
+\GetCoord(\@Dir)\@xnum\@ynum
+\put(\@tdX,\@tdY){\vector(\@xnum,\@ynum){0}}% end point arrowt ip
+\@tdE =\DeltaGradi\p@
+\advance\@tdA -2\@tdE \Numero\@gradi\@tdA
+\CopyVect#1to\@Cent \GetCoord(\@pPun)\@pPunX\@pPunY
+\SubVect\@Cent from\@pPun to \@V
+\edef\@tempa{\if\Segno-\else-\fi\@ne}%
+\MultVect\@V by0,\@tempa to\@vPun
+\@tdE\if\Segno--\fi\DeltaGradi\p@
+\Numero\@tempB{0.5\@tdE}%
+\DirFromAngle\@tempB to\@Dird
+\MultVect\@vPun by\@Dird to\@vPun% corrects the starting point
+\DirOfVect\@vPun to\@Dir\GetCoord(\@Dir)\@xnum\@ynum
+\put(\@pPunX,\@pPunY){\vector(\@xnum,\@ynum){0}}% starting point arrow tip
+\edef\@tempa{\if\Segno--\fi\DeltaGradi}%
+\DirFromAngle\@tempa to \@Dir
+\SubVect\@Cent from\@pPun to\@V
+\MultVect\@V by\@Dir to\@V
+\AddVect\@Cent and\@V to\@pPun
+\GetCoord(\@pPun)\@pPunX\@pPunY
+\@@Arc
+\strokepath\ignorespaces}%
+\def\CurveBetween#1and#2WithDirs#3and#4{%
+\StartCurveAt#1WithDir{#3}\relax
+\CurveTo#2WithDir{#4}\CurveFinish\ignorespaces}%
+\def\StartCurveAt#1WithDir#2{%
+\begingroup
+\GetCoord(#1)\@tempa\@tempb
+\CopyVect\@tempa,\@tempb to\@Pzero
+\pIIe@moveto{\@tempa\unitlength}{\@tempb\unitlength}%
+\GetCoord(#2)\@tempa\@tempb
+\CopyVect\@tempa,\@tempb to\@Dzero
+\DirOfVect\@Dzero to\@Dzero
+\ignorespaces}
+\def\ChangeDir<#1>{%
+\GetCoord(#1)\@tempa\@tempb
+\CopyVect\@tempa,\@tempb to\@Dzero
+\DirOfVect\@Dzero to\@Dzero
+\ignorespaces}
+\def\CurveFinish{\strokepath\endgroup\ignorespaces}%
+\def\FillCurve{\fillpath\endgroup\ignorespaces}
+\def\CurveEnd{\fillstroke\endgroup\ignorespaces}
+\def\CbezierTo#1WithDir#2AndDists#3And#4{%
+\GetCoord(#1)\@tX\@tY \MakeVectorFrom\@tX\@tY to\@Puno
+\GetCoord(#2)\@tX\@tY \MakeVectorFrom\@tX\@tY to \@Duno
+\DirOfVect\@Duno to\@Duno
+\ScaleVect\@Dzero by#3to\@Czero \AddVect\@Pzero and\@Czero to\@Czero
+\ScaleVect\@Duno by-#4to \@Cuno \AddVect\@Puno and\@Cuno to \@Cuno
+\GetCoord(\@Czero)\@XCzero\@YCzero
+\GetCoord(\@Cuno)\@XCuno\@YCuno
+\GetCoord(\@Puno)\@XPuno\@YPuno
+\pIIe@curveto{\@XCzero\unitlength}{\@YCzero\unitlength}%
+ {\@XCuno\unitlength}{\@YCuno\unitlength}%
+ {\@XPuno\unitlength}{\@YPuno\unitlength}%
+\CopyVect\@Puno to\@Pzero
+\CopyVect\@Duno to\@Dzero
+\ignorespaces}%
+\def\CbezierBetween#1And#2WithDirs#3And#4UsingDists#5And#6{%
+\StartCurveAt#1WithDir{#3}\relax
+\CbezierTo#2WithDir#4AndDists#5And{#6}\CurveFinish}
+
+\def\@isTension#1;#2!!{\def\@tempA{#1}%
+\def\@tempB{#2}\unless\ifx\@tempB\empty\strip@semicolon#2\fi}
+\def\strip@semicolon#1;{\def\@tempB{#1}}
+\def\CurveTo#1WithDir#2{%
+\def\@Tuno{1}\def\@Tzero{1}\relax
+\edef\@Puno{#1}\@isTension#2;!!%
+\expandafter\DirOfVect\@tempA to\@Duno
+\bgroup\unless\ifx\@tempB\empty\GetCoord(\@tempB)\@Tzero\@Tuno\fi
+\DistanceAndDirOfVect\@Puno minus\@Pzero to\@Chord and\@DirChord
+\MultVect\@Dzero by*\@DirChord to \@Dpzero
+\MultVect\@Duno by*\@DirChord to \@Dpuno
+\GetCoord(\@Dpzero)\@DXpzero\@DYpzero
+\GetCoord(\@Dpuno)\@DXpuno\@DYpuno
+\DivideFN\@Chord by2 to\@semichord
+\ifdim\@DXpzero\p@=\z@
+ \@tdA=1.333333\p@
+ \Numero\@KCzero{\@semichord\@tdA}%
+\fi
+\ifdim\@DYpzero\p@=\z@
+ \@tdA=1.333333\p@
+ \Numero\@Kpzero{\@semichord\@tdA}%
+\fi
+\unless\ifdim\@DXpzero\p@=\z@
+ \unless\ifdim\@DYpzero\p@=\z@
+ \edef\@CosDzero{\ifdim\@DXpzero\p@<\z@ -\fi\@DXpzero}%
+ \edef\@SinDzero{\ifdim\@DYpzero\p@<\z@ -\fi\@DYpzero}%
+ \@tdA=\@semichord\p@ \@tdA=1.333333\@tdA
+ \DividE\@tdA by\@SinDzero\p@ to \@KCzero
+ \@tdA=\dimexpr(\p@-\@CosDzero\p@)\relax
+ \DividE\@KCzero\@tdA by\@SinDzero\p@ to \@KCzero
+ \fi
+\fi
+\MultiplyFN\@KCzero by \@Tzero to \@KCzero
+\ScaleVect\@Dzero by\@KCzero to\@CPzero
+\AddVect\@Pzero and\@CPzero to\@CPzero
+\ifdim\@DXpuno\p@=\z@
+ \@tdA=-1.333333\p@
+ \Numero\@KCuno{\@semichord\@tdA}%
+\fi
+\ifdim\@DYpuno\p@=\z@
+ \@tdA=-1.333333\p@
+ \Numero\@KCuno{\@semichord\@tdA}%
+\fi
+\unless\ifdim\@DXpuno\p@=\z@
+ \unless\ifdim\@DYpuno\p@=\z@
+ \edef\@CosDuno{\ifdim\@DXpuno\p@<\z@ -\fi\@DXpuno}%
+ \edef\@SinDuno{\ifdim\@DYpuno\p@<\z@ -\fi\@DYpuno}%
+ \@tdA=\@semichord\p@ \@tdA=-1.333333\@tdA
+ \DividE\@tdA by \@SinDuno\p@ to \@KCuno
+ \@tdA=\dimexpr(\p@-\@CosDuno\p@)\relax
+ \DividE\@KCuno\@tdA by\@SinDuno\p@ to \@KCuno
+ \fi
+\fi
+\MultiplyFN\@KCuno by \@Tuno to \@KCuno
+\ScaleVect\@Duno by\@KCuno to\@CPuno
+\AddVect\@Puno and\@CPuno to\@CPuno
+\GetCoord(\@Puno)\@XPuno\@YPuno
+\GetCoord(\@CPzero)\@XCPzero\@YCPzero
+\GetCoord(\@CPuno)\@XCPuno\@YCPuno
+\pIIe@curveto{\@XCPzero\unitlength}{\@YCPzero\unitlength}%
+ {\@XCPuno\unitlength}{\@YCPuno\unitlength}%
+ {\@XPuno\unitlength}{\@YPuno\unitlength}\egroup
+\CopyVect\@Puno to\@Pzero
+\CopyVect\@Duno to\@Dzero
+\ignorespaces}%
+\def\Curve{\@ifstar{\let\fillstroke\fillpath\Curve@}%
+{\let\fillstroke\strokepath\Curve@}}
+\def\Curve@(#1)<#2>{%
+ \StartCurveAt#1WithDir{#2}%
+ \@ifnextchar\lp@r\@Curve{%
+ \PackageWarning{curve2e}{%
+ Curve specifications must contain at least two nodes!\Messagebreak
+ Please, control your Curve specifications\MessageBreak}}}
+\def\@Curve(#1)<#2>{%
+ \CurveTo#1WithDir{#2}%
+ \@ifnextchar\lp@r\@Curve{%
+ \@ifnextchar[\@ChangeDir\CurveEnd}}
+\def\@ChangeDir[#1]{\ChangeDir<#1>\@Curve}
+\def\Qurve{\@ifstar{\let\fillstroke\fillpath\Qurve@}%
+{\let\fillstroke\strokepath\Qurve@}}
+
+\def\Qurve@(#1)<#2>{%
+ \StartCurveAt#1WithDir{#2}%
+ \@ifnextchar\lp@r\@Qurve{%
+ \PackageWarning{curve2e}{%
+ Quadratic curve specifications must contain at least
+ two nodes!\Messagebreak
+ Please, control your Qurve specifications\MessageBreak}}}%
+\def\@Qurve(#1)<#2>{\QurveTo#1WithDir{#2}%
+ \@ifnextchar\lp@r\@Qurve{%
+ \@ifnextchar[\@ChangeQDir\CurveEnd}}%
+\def\@ChangeQDir[#1]{\ChangeDir<#1>\@Qurve}%
+\def\QurveTo#1WithDir#2{%
+\edef\@Puno{#1}\DirOfVect#2to\@Duno\bgroup
+\DistanceAndDirOfVect\@Puno minus\@Pzero to\@Chord and\@DirChord
+\MultVect\@Dzero by*\@Duno to \@Scalar
+\YpartOfVect\@Scalar to \@YScalar
+\ifdim\@YScalar\p@=\z@
+\PackageWarning{curve2e}%
+ {Quadratic Bezier arcs cannot have their starting\MessageBreak
+ and ending directions parallel or antiparallel with\MessageBreak
+ each other. This arc is skipped and replaced with
+ a dotted line.\MessageBreak}%
+ \Dotline(\@Pzero)(\@Puno){2}\relax
+\else
+\MultVect\@Dzero by*\@DirChord to \@Dpzero
+\MultVect\@Duno by*\@DirChord to \@Dpuno
+\GetCoord(\@Dpzero)\@DXpzero\@DYpzero
+\GetCoord(\@Dpuno)\@DXpuno\@DYpuno
+\MultiplyFN\@DXpzero by\@DXpuno to\@XXD
+\MultiplyFN\@DYpzero by\@DYpuno to\@YYD
+\unless\ifdim\@YYD\p@<\z@\ifdim\@XXD\p@<\z@
+\PackageWarning{curve2e}%
+ {Quadratic Bezier arcs cannot have inflection points\MessageBreak
+ Therefore the tangents to the starting and ending arc\MessageBreak
+ points cannot be directed to the same half plane.\MessageBreak
+ This arc is skipped and replaced by a dotted line\MessageBreak}%
+ \Dotline(\@Pzero)(\@Puno){2}\fi
+\else
+\edef\@CDzero{\@DXpzero}\relax
+\edef\@SDzero{\@DYpzero}\relax
+\edef\@CDuno{\@DXpuno}\relax
+\edef\@SDuno{\@DYpuno}\relax
+\MultiplyFN\@SDzero by\@CDuno to\@tempA
+\MultiplyFN\@SDuno by\@CDzero to\@tempB
+\edef\@tempA{\strip@pt\dimexpr\@tempA\p@-\@tempB\p@}\relax
+\@tdA=\@SDuno\p@ \@tdB=\@Chord\p@ \@tdC=\@tempA\p@
+\edef\@tempC{\strip@pt\dimexpr \@tdA*\@tdB/\@tdC}\relax
+\MultiplyFN\@tempC by\@CDzero to \@XC
+\MultiplyFN\@tempC by\@SDzero to \@YC
+\ModOfVect\@XC,\@YC to\@KC
+\ScaleVect\@Dzero by\@KC to\@CP
+\AddVect\@Pzero and\@CP to\@CP
+\GetCoord(\@Pzero)\@XPzero\@YPzero
+\GetCoord(\@Puno)\@XPuno\@YPuno
+\GetCoord(\@CP)\@XCP\@YCP
+\@ovxx=\@XPzero\unitlength \@ovyy=\@YPzero\unitlength
+\@ovdx=\@XCP\unitlength \@ovdy=\@YCP\unitlength
+\@xdim=\@XPuno\unitlength \@ydim=\@YPuno\unitlength
+ \pIIe@bezier@QtoC\@ovxx\@ovdx\@ovro
+ \pIIe@bezier@QtoC\@ovyy\@ovdy\@ovri
+ \pIIe@bezier@QtoC\@xdim\@ovdx\@clnwd
+ \pIIe@bezier@QtoC\@ydim\@ovdy\@clnht
+ \pIIe@moveto\@ovxx\@ovyy
+ \pIIe@curveto\@ovro\@ovri\@clnwd\@clnht\@xdim\@ydim
+\fi\fi\egroup
+\CopyVect\@Puno to\@Pzero
+\CopyVect\@Duno to\@Dzero
+\ignorespaces}
+
+
+%%
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "author-maintained"
+%%
+%% This work consists of file curve2e.dtx, and the derived files
+%% curve2e.sty and curve2e.pdf, plus the auxiliary derived files
+%% README.txt and ltxdoc.cfg, although the latter can be freely
+%% modified before running pdfltex, in order to include or exclude
+%% typesetting of the bundle code.
+%%
+%%
+%% End of file `curve2e-v161.sty'.
diff --git a/macros/latex/contrib/curve2e/curve2e.dtx b/macros/latex/contrib/curve2e/curve2e.dtx
index 902cd4e1a6..015b659d79 100644
--- a/macros/latex/contrib/curve2e/curve2e.dtx
+++ b/macros/latex/contrib/curve2e/curve2e.dtx
@@ -47,7 +47,7 @@ README.txt and manifest.txt.
%<+package>\ProvidesPackage{curve2e}%
%<+readme>File README.txt for package curve2e
%<*package|readme>
- [2019-03-29 v.2.0.1 Extension package for pict2e]
+ [2019-10-17 v.2.0.3 Extension package for pict2e]
%</package|readme>
%<*driver>
\documentclass{ltxdoc}\errorcontextlines=9
@@ -56,7 +56,7 @@ README.txt and manifest.txt.
\usepackage{lmodern,textcomp}
\usepackage{mflogo}
\usepackage{multicol,amsmath,fancyvrb,trace}
-\usepackage{curve2e}
+\usepackage{xcolor,curve2e}
\GetFileInfo{curve2e.dtx}
\title{The extension package \textsf{curve2e}}
\author{Claudio Beccari\thanks{E-mail: \texttt{claudio dot beccari at gmai dot com}}}
@@ -93,7 +93,7 @@ README.txt and manifest.txt.
\linespread{#1}\fontsize{#2}{#2}\selectfont}
-\begin{document}%\OnlyDescription
+\begin{document}
\maketitle
\columnseprule=0.4pt
\begin{multicols}{2}
@@ -104,7 +104,7 @@ README.txt and manifest.txt.
%</driver>
% \fi
%
-% \CheckSum{5560}
+% \CheckSum{5571}
% \begin{abstract}
% This file documents the |curve2e| extension package to the |pict2e|
% bundle implementation that has been described by Lamport
@@ -321,9 +321,9 @@ README.txt and manifest.txt.
% |\curveto|, |\closepath|, |\fillpath|, and |\strokepath|; of course these
% macros can be used by the end user, and sometimes they perform better
% than the macros defined in this package, because the user has a better
-% control on the position of the Bézier control points, while here the
-% control points are sort of rigid. It would be very useful to resort to
-% the |hobby| package, but its macros are conforming with those of the
+% control on the position of the Bézier splines control points, while here
+% the control points are sort of rigid. It would be very useful to resort
+% to the |hobby| package, but its macros are conforming with those of the
% |tikz| and |pgf| packages, not with |curve2e|; an interface should be
% created in order to deal with the |hobby| package, but this has not been
% done yet.
@@ -367,13 +367,13 @@ README.txt and manifest.txt.
% This package \texttt{curve2e} extends the power of \texttt{pict2e} with
% the following modifications and the following new commands.
% \begin{enumerate}
-% \item This package |curve2e| calls directly the \LaTeX\ packages |color|
-% and |pict2e| to which it passes any possible option that the latter can
-% receive; actually the only options that make sense are those concerning
-% the arrow tips, either \LaTeX\ or PostScript styled, because it is
-% assumed that if you use this package you are not interested in using the
-% original \LaTeX\ commands. See the |pict2e| documentation in order to see
-% the correct options |pict2e| can receive.
+% \item This package |curve2e| calls directly the \LaTeX\ packages
+% |color| and |pict2e| to which it passes any possible option that the
+% latter can receive; actually the only options that make sense are
+% those concerning the arrow tips, either \LaTeX\ or PostScript styled,
+% because it is assumed that if you use this package you are not
+% interested in using the original \LaTeX\ commands. See the |pict2e|
+% documentation in order to see the correct options |pict2e| can receive.
%^^A
% \item The user is offered new commands in order to control the line
% terminators and the line joins; specifically:
@@ -1184,8 +1184,9 @@ README.txt and manifest.txt.
% is emphasised because it actually is an approximation with four
% quarter-circle cubic splines that, in spite of being drawn with third
% degree parametric polynomials, approximate very well a real circle; on
-% the opposite the quadratic spline circle is clearly a poor approximation
-% even if the maximum radial error amounts just to about 6\% of the radius.
+% the opposite the quadratic spline circle is clearly a poor
+% approximation even if the maximum radial error amounts just to about
+% 6\% of the radius.
%
%\begin{figure}[p]
%\begin{minipage}{\linewidth}
@@ -1238,7 +1239,9 @@ README.txt and manifest.txt.
%\end{picture}
%\end{minipage}
%
-%\caption{\rule{0pt}{4ex}Several graphs drawn with quadratic Bézier splines. On the right a quadratic spline circle is compared with a cubic line circle.}
+%\caption{\rule{0pt}{4ex}Several graphs drawn with quadratic Bézier
+% splines. On the right a quadratic spline circle is compared with a
+% cubic line circle.}
%\label{fig:quadratic-arcs}
%\end{figure}
%
@@ -1248,7 +1251,61 @@ README.txt and manifest.txt.
% therefore it is not actually identical to the previous version,
% although the latter one performed correctly for everything else except
% for color-filled quadratic paths.
-%
+% ^^A
+% \item The new version of |\mulpiput| is backwards compatibile with
+% the original version contained in the \LaTeX\ kernel. The new part
+% consists into the handling of the coordinate increments from one
+% position to the next for the \meta{object} to include in the drawing.
+% On page~\pageref{pag:multiput} we show the code for the figure shown
+% there. The red grid is nothing new, except that id demonstrate the the
+% traditional |\multiput| used in tis code, shown in a previous example,
+% produces exactly the same result. But the for “graphs” on the grid,
+% display an alignment of black dots along the diagonal of the grid
+% (again traditional |\multiput| rendered with the new version);
+% a number of blue dots along a parabola; another number of magenta
+% dots alined along a half sine wave; a number of little green squares
+% aligned along a $-15~\circ$ line starting from the center of the grid.
+%
+%\noindent
+%\begin{minipage}{0.45\linewidth}
+%\begin{Verbatim}[fontsize=\setfontsize{8.25}]
+%\unitlength=0.01\linewidth
+%\begin{picture}(100,100)
+%\put(0,0){\GraphGrid(100,100)}
+%\multiput(0,0)(10,10){11}{\circle*{2}}
+%\color{blue!70!white}
+%\multiput(0,0)(10,0){11}{%
+% \circle*{2}}%
+% [\edef\X{\fpeval{\X+10}}%
+% \edef\Y{\fpeval{((\X/10)**2)}}]
+%\color{magenta}
+%\multiput(0,0)(10,1){11}{%
+%\circle*{2}}%
+% [\edef\X{\fpeval{\X+10}}%
+% \edef\Y{\fpeval{sind(\X*1.8)*100}}]
+%\color{green!60!black}
+%\multiput(50,50)(-15:5){11}}{%
+%\polygon*(-1,-1)(1,-1)(1,1)(-1,1)}
+%\end{picture}
+%\end{Verbatim}
+%\end{minipage}
+%\hfill
+%\begin{minipage}{0.45\linewidth}
+%\unitlength=0.01\linewidth
+%\begin{picture}(100,100)
+%\put(0,0){\GraphGrid(100,100)}
+%\multiput(0,0)(10,10){11}{\circle*{2}}
+%\color{blue!70!white}
+%\multiput(0,0)(10,0){11}{\circle*{2}}%
+%[\edef\X{\fpeval{\X+10}}\edef\Y{\fpeval{((\X/10)**2)}}]
+%\color{magenta}
+%\multiput(0,0)(10,1){11}{\circle*{2}}%
+%[\edef\X{\fpeval{\X+10}}\edef\Y{\fpeval{sind(\X*1.8)*100}}]
+%\color{green!60!black}
+%\multiput(50,50)(-15:5){11}{\polygon*(-1,-1)(1,-1)(1,1)(-1,1)}
+%\end{picture}\label{pag:multiput}
+%\end{minipage}
+%
% \end{enumerate}
%
%
@@ -1260,8 +1317,8 @@ README.txt and manifest.txt.
% was first released in 1994; in the |latexnews| news-letter of December
% 2003; the first implementation was announced; the first version of this
% package was issued in 2006. It was time to have a better drawing
-% environment; this package is a simple attempt to follow the initial path
-% while extending the drawing facilities; but Till Tantau's |pgf|
+% environment; this package is a simple attempt to follow the initial
+% path while extending the drawing facilities; but Till Tantau's |pgf|
% package has gone much farther.
%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1434,7 +1491,8 @@ README.txt and manifest.txt.
\@wholewidth#1\@halfwidth.5\@wholewidth\ignorespaces}%
\newcommand\defaultlinethickness[1]{\defaultlinewidth=#1\relax
\def\thicklines{\linethickness{\defaultlinewidth}}%
-\def\thinlines{\linethickness{.5\defaultlinewidth}}\thinlines \ignorespaces}%
+\def\thinlines{\linethickness{.5\defaultlinewidth}}\thinlines
+ \ignorespaces}%
% \end{macrocode}
% The |\ignorespaces| at the end of these macros is for avoiding spurious
% spaces to get into the picture that is being drawn, because
@@ -1562,8 +1620,9 @@ README.txt and manifest.txt.
% always referred to the origin of the coordinate axes; the end point $P_2$
% coordinates with the first macro type are referred to the origin of the
% axes, while with the second macro type they are referred to $P_1$; both
-% macro types have their usefulness and figures~\ref{fig:dashedlines}
-% and~\ref{fig:dottedlines} show how to use these macros.
+% macro types have their usefulness and figures~\ref{fig:dashedlines} on
+% page~\pageref{fig:dashedlines} and~\ref{fig:dottedlines} on
+% page~\pageref{fig:dottedlines} show how to use these macros.
%
% We distinguish these macros with an asterisk; the unstarred version is
% the first macro type, while the starred one refers to the second macro
@@ -1580,31 +1639,31 @@ README.txt and manifest.txt.
% above distance by this number.
%
% Another vector $P_2-P_1$ is created by dividing it by this number;
-% then, when dashes are involved, it is multiplied by two in order to have
-% the increment from one dash to the next; finally the number of patterns
-% is obtained by integer division of this number by 2 and increasing it
-% by~1.
+% then, when dashes are involved, it is multiplied by two in order to
+% have the increment from one dash to the next; finally the number of
+% patterns is obtained by integer division of this number by 2 and
+% increasing it by~1.
% A simple |\multiput| completes the job, but in order to use the various
% vectors and numbers within a group and to throw the result outside the
% group while restoring all the intermediate counters and registers, a
% service macro is created with an expanded definition and then this
% service macro is executed.
-% Figure~\ref{fig:dashedlines} shows the effect of the slight changing
-% of the dash length in order to maintain approximately the same dash-space
-% pattern along the line, irrespective of the line length.
-% The syntac is the following:
+% Figure~\ref{fig:dashedlines} on page~\pageref{fig:dashedlines} shows
+% the effect of the slight changing of the dash length in order to
+% maintain approximately the same dash-space pattern along the line,
+% irrespective of the line length. The syntax is the following:
% \begin{flushleft}
% \cs{Dashline}\meta{\texttt{*}}\parg{first point}\parg{second point}\marg{dash length}
% \end{flushleft}
% where \meta{first point} contains the coordinates of the starting point
% and \meta{second point} those of the ending point; of course the
-% \meta{dash length}, which equals the dash gap, is mandatory. The asterisk
-% plays a specific role; in facts, if coordinates are specified in polar
-% form, without the optional asterisk the dashed line is misplaced, while
-% if the asterisk is specified, the whole object is pout in the proper
-% position. On the opposite, if the coordinates are in cartesian form the
-% \meta{first point} coordinates play the role they are supposed to do even
-% without the asterisk.
+% \meta{dash length}, which equals the dash gap, is mandatory. The
+% asterisk plays a specific role; in facts, if coordinates are specified
+% in polar form, without the optional asterisk the dashed line is
+% misplaced, while if the asterisk is specified, the whole object is put
+% in the proper position. On the opposite, if the coordinates are in
+% cartesian form the \meta{first point} coordinates play the role they
+% are supposed to do even without the asterisk.
% \begin{macrocode}
\ifx\Dashline\undefined
\def\Dashline{\@ifstar{\Dashline@@}{\Dashline@}}
@@ -1670,11 +1729,13 @@ README.txt and manifest.txt.
%
% Notice that vectors as complex numbers in their cartesian and polar forms
% always represent a point position referred to the origin of the axes;
-% this is why in figures~\ref{fig:dashedlines} and~\ref{fig:dottedlines}
-% the dashed and dotted line that depart from the lower right corner of
-% the graph grid, and that use polar coordinates, have to be put at the
-% proper position with the starred version of the commands that take care
-% of the relative specification made with the polar coordinates.
+% this is why in figures~\ref{fig:dashedlines} on
+% page~\pageref {fig:dashedlines} and~\ref{fig:dottedlines} on
+% page~\pageref{fig:dottedlines} the dashed and dotted line that depart
+% from the lower right corner of the graph grid, and that use polar
+% coordinates, have to be put at the proper position with the starred
+% version of the commands that take care of the relative specification
+% made with the polar coordinates.
%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Coordinate handling}
@@ -1699,11 +1760,11 @@ README.txt and manifest.txt.
\AtBeginDocument{\@ifpackageloaded{eso-pic}{%
\renewcommand\LenToUnit[1]{\strip@pt\dimexpr#1*\p@/\unitlength}}{}}%
% \end{macrocode}
-% The above redefinition is delayed at |\AtBeginDocument| in order to have
-% the possibility to check the the |eso-pic| package had actually been
-% loaded. Nevertheless the code is defined here just because the origina
-%l |eso-pic| macro was interfering with the algorithms of coordinate
-% handling.
+% The above redefinition is delayed at |\AtBeginDocument| in order to
+% have the possibility to check the the |eso-pic| package had actually
+% been loaded. Nevertheless the code is defined here just because the
+% original |eso-pic| macro was interfering with the algorithms of
+% coordinate handling.
%
% But let us come to the real subject of this section. We define a
% |\GettCoord| macro that passes control to the service macro with the
@@ -1718,9 +1779,9 @@ README.txt and manifest.txt.
% \end{macrocode}
% The macro that detects the form of the coordinates is |\isnot@polar|;
% it examines the parameter syntax in order to see if it contains a
-% colon; if it does, the coordinates are in polar form, otherwise they are
-% in cartesian form. this macro uses delimited arguments, therefore low
-% level definition syntax must be used.
+% colon; if it does, the coordinates are in polar form, otherwise they
+% are in cartesian form. this macro uses delimited arguments, therefore
+% low level definition syntax must be used.
% \begin{macrocode}
\def\isnot@polar#1:#2!!{\def\@tempOne{#2}\ifx\@tempOne\empty
\expandafter\@firstoftwo\else
@@ -1731,20 +1792,70 @@ README.txt and manifest.txt.
\def\SplitPolar@@(#1:#2)#3#4{\DirFromAngle#1to\@DirA
\ScaleVect\@DirA by#2to\@DirA
\expandafter\SplitNod@@\expandafter(\@DirA)#3#4}
-
+% \end{macrocoe}
+% In order to accept polar coordinates with |\put| and |\multiput|
+% we resort to using |\GetCoord|; therefore the redefinition of
+% |\put| is very simple because it suffices to save the original
+% meaning of that macro and redefine the new one in terms of the
+% old one.
+% \begin{macrocode}
\let\originalput\put
\def\put(#1){\bgroup\GetCoord(#1)\@tX\@tY
\edef\x{\noexpand\egroup\noexpand\originalput(\@tX,\@tY)}\x}
-
-\let\originalmultiput\multiput
-\let\original@multiput\@multiput
-
-\long\def\@multiput(#1)#2#3{\bgroup\GetCoord(#1)\@mptX\@mptY
-\edef\x{\noexpand\egroup\noexpand\original@multiput(\@mptX,\@mptY)}%
-\x{#2}{#3}\ignorespaces}
-
-\gdef\multiput(#1)#2{\bgroup\GetCoord(#1)\@mptX\@mptY
-\edef\x{\noexpand\egroup\noexpand\originalmultiput(\@mptX,\@mptY)}\x(}%)
+% \end{macrocode}
+% For |\multiput| it is mor complicated, because the increments from one
+% position to the next cannot be done efficiently because the increments
+% in the original definition are executed within boxes, therefore any
+% macro instruction inside these boxes is lost. It is a good occasion to
+% modify the |\multiput| definition by means of the advanced macro
+% definitions provided by package |xparse|; we can add also some error
+% messages for avoiding doing anything when son mandatory parameters are
+% missing ore are empty, or do not contain anything different from an
+% ordered pair or a polar form. We ad also an optional argument to
+% handle the increments outside the boxes.
+% The new macro has the following syntax:\\[2ex]
+% \mbox{\cs{multiput}\texttt{(\meta{initial})}\texttt{(\meta{increment})}\marg{number}\marg{objext}\oarg{handler}}\\[2ex]
+% where \meta{initial} contains the cartesian or polar coordinates
+% of the initial point; \meta{increment} contains the cartesian or
+% polar increment for the coordinates to be used from the second
+% argument to the last; \meta{number} il the total number of points
+% to be drawn; \meta{object} is the object to be put in position at
+% each cycle repetition; the optional \meta{handler} may be used to
+% control the current values of the horizontal and vertical increments.
+% The new definition contains two |\put| commands where the second is
+% nested within a while loop which in turn is within the argument of
+% the first |\put| command. Basically it is the same idea that the
+% original macros, but now the increment are computed within the While
+% loop, bit outside the argument of the inner |\put| command. If the
+% optional \meta{handler} is specified the increments are computed
+% from the macros specified by the user.
+%
+% The two increments components inside the optional argument may be set
+% by means of mathematical expressions operated upon by the |\fpeval|
+% function given by the |\xfp| package already loaded by |curve2e|. Of
+% course it the user responsibility to pay attention to the scales of
+% the two axes and to write meaningful expressions; the figure and code
+% shown in the first part of this documentation show some examples:
+% see page~\pageref{pag:multiput}.
+% \begin{macrocode}
+\RenewDocumentCommand{\multiput}{ d() d() m m o }{%
+\IfNoValueTF{#1}{\PackageError{curve2e}{%
+ \string\multiput\space initial point coordinates missing}%
+ {Nothing done}}%
+ {\IfNoValueTF{#2}{\PackageError{curve2e}{%
+ \string\multiput\space Increment components missing}%
+ {Nothing done}%
+ }%
+ {\GetCoord(#2)\dX\dY
+ \put(#1){\def\X{0}\def\Y{0}\@multicnt=#3\relax
+ \@whilenum \@multicnt > \z@\do{%
+ \put(\X,\Y){#4}\IfValueTF{#5}{#5}{%
+ \edef\X{\fpeval{\X+\dX}}\edef\Y{\fpeval{\Y+\dY}}}%
+ \advance\@multicnt\m@ne
+ }%
+ }}
+ }%
+}
% \end{macrocode}
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Vectors}
@@ -1895,7 +2006,7 @@ README.txt and manifest.txt.
% the macro draws only the arrow tip; this may work with macro |\vector|,
% certainly not with |\Vector| and |\VECTOR|. This might be useful for
% adding an arrow tip to a circular arc. See examples in
-% figure~\ref{fig:vectors}.
+% figure~\ref{fig:vectors} on page~\pageref{fig:vectors}.
%
%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2003,7 +2114,8 @@ README.txt and manifest.txt.
\ignorespaces}}
% \end{macrocode}
% Now, for example, a filled polygon can be drawn using polar coordinates
-% for its vertices; see figure~\ref{fig:filled-polygon}
+% for its vertices; see figure~\ref{fig:filled-polygon} on
+% page~\pageref{fig:filled-polygon}.
%
% Remember; the polygon polar coordinates are relative to the origin of
% the local axes; therefore in order to position a polygon in a different
@@ -2068,11 +2180,11 @@ README.txt and manifest.txt.
% words the L3 library for floating point calculations accepts such
% expressions as \texttt{123.456}, \texttt{0.12345e3}, and
% \texttt{12345e-3}, and any other equivalent expression. If the first
-% number is integer, it assumes that the decimal separator is to the right
-% of the rightmost digits of the digit string.
+% number is integer, it assumes that the decimal separator is to the
+% right of the rightmost digits of the digit string.
%
-% Floating pint calculations may be done through the |\fpeval| L3 function
-% with a very simple syntax:
+% Floating pint calculations may be done through the |\fpeval| L3
+% function with a very simple syntax:
% \begin{flushleft}
% \cs{fpeval}\marg{mathematical expression}
% \end{flushleft}
@@ -2260,7 +2372,8 @@ README.txt and manifest.txt.
% \end{macrocode}
%
% It is worth examining the following table, where the angles of nine
-% vectors $45^circ$ degrees from one another are computed from this macro.
+% vectors $45^\circ$ degrees apart from one another are computed from
+% this macro.
% \begin{center}
% \begin{tabular}{l*9r}
% Vector &0,0 &1,0 &1,1 & 0,1 & -1,1& -1,0&-1,-1&0,-1&1,-1\\
@@ -2639,7 +2752,8 @@ README.txt and manifest.txt.
% control points lay on the perpendicular to the vectors that join the arc
% center to the starting and end points respectively.
%
-% With reference to figure~\ref{fig:arcspline}, the points $P_1$ and $P_2$
+% With reference to figure~\ref{fig:arcspline} on
+% page~\pageref{fig:arcspline}, the points $P_1$ and $P_2$
% are the arc end-points; $C_1$ and $C_2$ are the Bézier-spline
% control-points; $P$ is the arc mid-point, that should be distant from
% the center of the arc the same as $P_1$ and $P_2$.
@@ -3095,16 +3209,17 @@ README.txt and manifest.txt.
% \end{macrocode}
%
-% An example of use is shown in figure~\ref{fig:Cbezier}; notice that the
-% tangents at the end points are the same for the black curve drawn with
-% |\CurveBetween| and the five red curves drawn with |\CbezierBetween|; the
-% five red curves differ only for the distance of their control point $C_0$
-% from the starting point; the differences are remarkable and the topmost
-% curve even presents a slight inflection close to the end point. These
-% effects cannot be obtained with the ``smarter'' macro |\CurveBetween|.
-% But certainly this simpler macro is more difficult to use because the
-% distances of the control points are difficult to estimate and require a
-% number of cut-and-try experiments.
+% An example of use is shown in figure~\ref{fig:Cbezier} on
+% page~\pageref{fig:Cbezier}; notice that the tangents at the end points
+% are the same for the black curve drawn with |\CurveBetween| and the five
+% red curves drawn with |\CbezierBetween|; the five red curves differ only
+% for the distance of their control point $C_0$ from the starting point;
+% the differences are remarkable and the topmost curve even presents a
+% slight inflection close to the end point. These effects cannot be
+% obtained with the ``smarter'' macro |\CurveBetween|. But certainly this
+% simpler macro is more difficult to use because the distances of the
+% control points are difficult to estimate and require a number of
+% cut-and-try experiments.
%
%
% The ``smarter'' curve macro comes next; it is supposed to determine the
@@ -3164,7 +3279,7 @@ README.txt and manifest.txt.
\def\strip@semicolon#1;{\def\@tempB{#1}}
% \end{macrocode}
% By changing the tension values we can achieve different results: see
-% figure~\ref{fig:tensions}.
+% figure~\ref{fig:tensions} on page~\pageref{fig:tensions}.
%
% We use the formula we got for arcs~\eqref{equ:corda}, where the half
% chord is indicated with $s$, and we derive the necessary distances:
@@ -3328,19 +3443,19 @@ README.txt and manifest.txt.
% to use the general internal cubic Bézier splines in a more comfortable
% way.
%
-% As it can be seen in figure~\ref{fig:sinewave} the two diagrams should
-% approximately represent a sine wave. With Bézier curves, that resort on
-% polynomials, it is impossible to represent a transcendental function, but
-% it is only possible to approximate it. It is evident that the
-% approximation obtained with full control on the control points requires
-% less arcs and it is more accurate than the approximation obtained with
-% the recursive |\Curve| macro; this macro requires almost two times as
-% many pieces of information in order to minimise the effects of the lack
-% of control on the control points, and even with this added information
-% the macro approaches the sine wave with less accuracy. At the same time
-% for many applications the |\Curve| recursive macro proves to be much
-% easier to use than with single arcs drawn with the |\CbezierBetween|
-% macro.
+% As it can be seen in figure~\ref{fig:sinewave} on
+% page~\pageref{fig:sinewave} the two diagrams should approximately
+% represent a sine wave. With Bézier curves, that resort on polynomials,
+% it is impossible to represent a transcendental function, but it is only
+% possible to approximate it. It is evident that the approximation obtained
+% with full control on the control points requires less arcs and it is more
+% accurate than the approximation obtained with the recursive |\Curve|
+% macro; this macro requires almost two times as many pieces of information
+% in order to minimise the effects of the lack of control on the control
+% points, and even with this added information the macro approaches the
+% sine wave with less accuracy. At the same time for many applications the
+% |\Curve| recursive macro proves to be much easier to use than with single
+% arcs drawn with the |\CbezierBetween| macro.
%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Quadratic splines}
@@ -3562,13 +3677,14 @@ README.txt and manifest.txt.
% specified position' \cs{Zbox} puts a symbol in math mode a little
% displaced in the proper direction relative to a specified position.
% They are just handy to label certain objects in a \texttt{picture}
-% diagram, but they are not part of the \texttt{curve2e} package.}.
-% created with the code shown within figure~\ref{fig:quadratic-arcs}.
+% diagram, but they are not part of the \texttt{curve2e} package.} on
+% page~\pageref{fig:quadratic-arcs} created with the code shown in the
+% same page.
%
% Notice also that the inflexed line is made with two arcs that meet at
% the inflection point; the same is true for the line that resembles
% a sine wave. The cusps of the inner border of the green area are
-% obtained with the usual optional argument already used also with the
+% obtained with the usual optional star already used also with the
% |\Curve| recursive macro.
%
% The ``circle'' inside the square frame is visibly different from a real
@@ -3577,10 +3693,11 @@ README.txt and manifest.txt.
% obtained with a single parabola is definitely a poor approximation of a
% real quarter circle; possibly by splitting each quarter circle in three
% or four partial arcs the approximation of a real quarter circle would be
-% much better. On the right of figure~\ref{fig:quadratic-arcs} it is
-% possible to compare a “circle” obtained with quadratic arcs with the the
-% internal circle obtained with cubic arcs; the difference is easily seen
-% even without using measuring instruments.
+% much better. On the right of figure~\ref{fig:quadratic-arcs} on
+% page~\pageref{fig:quadratic-arcs} it is possible to compare a “circle”
+% obtained with quadratic arcs with the the internal circle obtained with
+% cubic arcs; the difference is easily seen even without using measuring
+% instruments.
%
% With quadratic arcs we decided to avoid defining specific macros similar
% to |\CurveBetween| and |\CbezierBetween|; the first macro would not save
diff --git a/macros/latex/contrib/curve2e/curve2e.pdf b/macros/latex/contrib/curve2e/curve2e.pdf
index 519ee31679..59094e6a2d 100644
--- a/macros/latex/contrib/curve2e/curve2e.pdf
+++ b/macros/latex/contrib/curve2e/curve2e.pdf
Binary files differ
diff --git a/macros/latex/contrib/curve2e/curve2e.sty b/macros/latex/contrib/curve2e/curve2e.sty
new file mode 100644
index 0000000000..052cc398b0
--- /dev/null
+++ b/macros/latex/contrib/curve2e/curve2e.sty
@@ -0,0 +1,729 @@
+%%
+%% This is file `curve2e.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% curve2e.dtx (with options: `package')
+%%
+%% Copyright (C) 2005--2019 Claudio Beccari all rights reserved.
+%% License information appended
+%%
+\NeedsTeXFormat{LaTeX2e}[2016/01/01]
+\ProvidesPackage{curve2e}%
+ [2019-10-17 v.2.0.3 Extension package for pict2e]
+
+
+
+\IfFileExists{xfp.sty}{%
+ \RequirePackage{color}
+ \RequirePackageWithOptions{pict2e}[2014/01/01]
+ \@ifl@aded{sty}{xparse}{}{\RequirePackage{xparse}}
+ \@ifl@aded{sty}{xfp}{}{\RequirePackage{xfp}}%
+}{%
+ \RequirePackage{curve2e-v161}%
+ \PackageWarningNoLine{curve2e}{%
+ Package xfp is required, but apparently\MessageBreak%
+ such package cannot be found in this \MessageBreak%
+ TeX system installation\MessageBreak%
+ Either your installation is not complete \MessageBreak%
+ or it is older than 2018-10-17.\MessageBreak%
+ \MessageBreak%
+ ***************************************\MessageBreak%
+ Version 1.61 of curve2e has been loaded\MessageBreak%
+ instead of the current version\MessageBreak%
+ ***************************************\MessageBreak}%
+ \endinput
+}
+\def\TRON{\tracingcommands\tw@ \tracingmacros\tw@}%
+\def\TROF{\tracingcommands\z@ \tracingmacros\z@}%
+\ifx\undefined\@tdA \newdimen\@tdA \fi
+\ifx\undefined\@tdB \newdimen\@tdB \fi
+\ifx\undefined\@tdC \newdimen\@tdC \fi
+\ifx\undefined\@tdD \newdimen\@tdD \fi
+\ifx\undefined\@tdE \newdimen\@tdE \fi
+\ifx\undefined\@tdF \newdimen\@tdF \fi
+\ifx\undefined\defaultlinewidth \newdimen\defaultlinewidth \fi
+\gdef\linethickness#1{%
+\@wholewidth#1\@halfwidth.5\@wholewidth\ignorespaces}%
+\newcommand\defaultlinethickness[1]{\defaultlinewidth=#1\relax
+\def\thicklines{\linethickness{\defaultlinewidth}}%
+\def\thinlines{\linethickness{.5\defaultlinewidth}}\thinlines
+ \ignorespaces}%
+\def\LIne(#1){{\GetCoord(#1)\@tX\@tY
+ \moveto(0,0)
+ \pIIe@lineto{\@tX\unitlength}{\@tY\unitlength}\strokepath}\ignorespaces
+}%
+\def\segment(#1)(#2){\@killglue\polyline(#1)(#2)}%
+\def\line(#1)#2{\begingroup
+ \@linelen #2\unitlength
+ \ifdim\@linelen<\z@\@badlinearg\else
+ \expandafter\DirOfVect#1to\Dir@line
+ \GetCoord(\Dir@line)\d@mX\d@mY
+ \ifdim\d@mX\p@=\z@\else
+ \edef\sc@lelen{\fpeval{1 / abs(\d@mX)}}\relax
+ \@linelen=\sc@lelen\@linelen
+ \fi
+ \moveto(0,0)
+ \pIIe@lineto{\d@mX\@linelen}{\d@mY\@linelen}%
+ \strokepath
+ \fi
+\endgroup\ignorespaces}%
+\ifx\Dashline\undefined
+ \def\Dashline{\@ifstar{\Dashline@@}{\Dashline@}}
+
+ \def\Dashline@(#1)(#2)#3{%
+ \bgroup
+ \countdef\NumA3254\countdef\NumB3252\relax
+ \GetCoord(#1)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttA
+ \GetCoord(#2)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttB
+ \SubVect\V@ttA from\V@ttB to\V@ttC
+ \ModOfVect\V@ttC to\DlineMod
+ \DivideFN\DlineMod by#3 to\NumD
+ \NumA=\fpeval{trunc(\NumD,0)}\relax
+ \unless\ifodd\NumA\advance\NumA\@ne\fi
+ \NumB=\NumA \divide\NumB\tw@
+ \DividE\DlineMod\p@ by\NumA\p@ to\D@shMod
+ \DividE\p@ by\NumA\p@ to \@tempa
+ \MultVect\V@ttC by\@tempa,0 to\V@ttB
+ \MultVect\V@ttB by 2,0 to\V@ttC
+ \advance\NumB\@ne
+ \edef\@mpt{\noexpand\egroup
+ \noexpand\multiput(\V@ttA)(\V@ttC){\number\NumB}%
+ {\noexpand\LIne(\V@ttB)}}%
+ \@mpt\ignorespaces}%
+ \let\Dline\Dashline
+
+ \def\Dashline@@(#1)(#2)#3{\put(#1){\Dashline@(0,0)(#2){#3}}}
+\fi
+\ifx\Dotline\undefined
+ \def\Dotline{\@ifstar{\Dotline@@}{\Dotline@}}
+ \def\Dotline@(#1)(#2)#3{%
+ \bgroup
+ \countdef\NumA 3254\relax \countdef\NumB 3255\relax
+ \GetCoord(#1)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttA
+ \GetCoord(#2)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttB
+ \SubVect\V@ttA from\V@ttB to\V@ttC
+ \ModOfVect\V@ttC to\DotlineMod
+ \DivideFN\DotlineMod by#3 to\NumD
+ \NumA=\fpeval{trunc(\NumD,0)}\relax
+ \DivVect\V@ttC by\NumA,0 to\V@ttB
+ \advance\NumA\@ne
+ \edef\@mpt{\noexpand\egroup
+ \noexpand\multiput(\V@ttA)(\V@ttB){\number\NumA}%
+ {\noexpand\makebox(0,0){\noexpand\circle*{0.5}}}}%
+ \@mpt\ignorespaces}%
+
+ \def\Dotline@@(#1)(#2)#3{\put(#1){\Dotline@(0,0)(#2){#3}}}%
+\fi
+\AtBeginDocument{\@ifpackageloaded{eso-pic}{%
+\renewcommand\LenToUnit[1]{\strip@pt\dimexpr#1*\p@/\unitlength}}{}}%
+\def\GetCoord(#1)#2#3{%
+\expandafter\SplitNod@\expandafter(#1)#2#3\ignorespaces}
+\def\SplitNod@(#1)#2#3{\isnot@polar#1:!!(#1)#2#3}%
+\def\isnot@polar#1:#2!!{\def\@tempOne{#2}\ifx\@tempOne\empty
+\expandafter\@firstoftwo\else
+\expandafter\@secondoftwo\fi
+{\SplitNod@@}{\SplitPolar@@}}
+
+\def\SplitNod@@(#1,#2)#3#4{\edef#3{#1}\edef#4{#2}}%
+\def\SplitPolar@@(#1:#2)#3#4{\DirFromAngle#1to\@DirA
+\ScaleVect\@DirA by#2to\@DirA
+\expandafter\SplitNod@@\expandafter(\@DirA)#3#4}
+\let\originalput\put
+\def\put(#1){\bgroup\GetCoord(#1)\@tX\@tY
+\edef\x{\noexpand\egroup\noexpand\originalput(\@tX,\@tY)}\x}
+\RenewDocumentCommand{\multiput}{ d() d() m m o }{%
+\IfNoValueTF{#1}{\PackageError{curve2e}{%
+ \string\multiput\space initial point coordinates missing}%
+ {Nothing done}}%
+ {\IfNoValueTF{#2}{\PackageError{curve2e}{%
+ \string\multiput\space Increment components missing}%
+ {Nothing done}%
+ }%
+ {\GetCoord(#2)\dX\dY
+ \put(#1){\def\X{0}\def\Y{0}\@multicnt=#3\relax
+ \@whilenum \@multicnt > \z@\do{%
+ \put(\X,\Y){#4}\IfValueTF{#5}{#5}{%
+ \edef\X{\fpeval{\X+\dX}}\edef\Y{\fpeval{\Y+\dY}}}%
+ \advance\@multicnt\m@ne
+ }%
+ }}
+ }%
+}
+ \def\vector(#1)#2{%
+ \begingroup
+ \GetCoord(#1)\d@mX\d@mY
+ \@linelen#2\unitlength
+ \ifdim\d@mX\p@=\z@\ifdim\d@mY\p@=\z@\@badlinearg\fi\fi
+ \ifdim\@linelen<\z@ \@linelen=-\@linelen\fi
+ \MakeVectorFrom\d@mX\d@mY to\@Vect
+ \DirOfVect\@Vect to\Dir@Vect
+ \YpartOfVect\Dir@Vect to\@ynum \@ydim=\@ynum\p@
+ \XpartOfVect\Dir@Vect to\@xnum \@xdim=\@xnum\p@
+ \ifdim\d@mX\p@=\z@
+ \else\ifdim\d@mY\p@=\z@
+ \else
+ \edef\sc@lelen{\fpeval{1 / abs(\@xnum)}}\relax
+ \@linelen=\sc@lelen\@linelen
+ \fi
+ \fi
+ \@tdB=\@linelen
+\pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim{\@xnum\@linelen}{\@ynum\@linelen}%
+ \@linelen\z@
+ \pIIe@vector
+ \fillpath
+ \@linelen=\@tdB
+ \@tdA=\pIIe@FAW\@wholewidth
+ \@tdA=\pIIe@FAL\@tdA
+ \advance\@linelen-\@tdA
+ \ifdim\@linelen>\z@
+ \moveto(0,0)
+ \pIIe@lineto{\@xnum\@linelen}{\@ynum\@linelen}%
+ \strokepath\fi
+ \endgroup}
+\def\Vector(#1){{%
+\GetCoord(#1)\@tX\@tY
+\ifdim\@tX\p@=\z@
+ \vector(\@tX,\@tY){\@tY}%
+\else
+ \vector(\@tX,\@tY){\@tX}%
+\fi}}
+\def\VECTOR(#1)(#2){\begingroup
+\SubVect#1from#2to\@tempa
+\expandafter\put\expandafter(#1){\expandafter\Vector\expandafter(\@tempa)}%
+\endgroup\ignorespaces}
+\def\VVECTOR(#1)(#2){{\SubVect#1from#2to\@tempb
+\ScaleVect\@tempb by0.5to\@tempb
+\AddVect\@tempb and#1to\@tempb
+\VECTOR(\@tempb)(#2)\VECTOR(\@tempb)(#1)\ignorespaces}}
+\let\lp@r( \let\rp@r)
+\renewcommand*\polyline[1][\beveljoin]{\p@lylin@[#1]}
+
+\def\p@lylin@[#1](#2){\@killglue#1\GetCoord(#2)\d@mX\d@mY
+ \pIIe@moveto{\d@mX\unitlength}{\d@mY\unitlength}%
+ \@ifnextchar\lp@r{\p@lyline}{%
+ \PackageWarning{curve2e}%
+ {Polylines require at least two vertices!\MessageBreak
+ Control your polyline specification\MessageBreak}%
+ \ignorespaces}}
+
+\def\p@lyline(#1){\GetCoord(#1)\d@mX\d@mY
+ \pIIe@lineto{\d@mX\unitlength}{\d@mY\unitlength}%
+ \@ifnextchar\lp@r{\p@lyline}{\strokepath\ignorespaces}}
+\providecommand\polygon{}
+\RenewDocumentCommand\polygon{s O{\beveljoin} }{\@killglue\begingroup
+\IfBooleanTF{#1}{\@tempswatrue}{\@tempswafalse}%
+\@polygon[#2]}
+
+\def\@polygon[#1](#2){\@killglue#1\GetCoord(#2)\d@mX\d@mY
+ \pIIe@moveto{\d@mX\unitlength}{\d@mY\unitlength}%
+ \@ifnextchar\lp@r{\@@polygon}{%
+ \PackageWarning{curve2e}%
+ {Polygons require at least two vertices!\MessageBreak
+ Control your polygon specification\MessageBreak}%
+ \ignorespaces}}
+
+ \def\@@polygon(#1){\GetCoord(#1)\d@mX\d@mY
+ \pIIe@lineto{\d@mX\unitlength}{\d@mY\unitlength}%
+ \@ifnextchar\lp@r{\@@polygon}{\pIIe@closepath
+ \if@tempswa\pIIe@fillGraph\else\pIIe@strokeGraph\fi
+ \endgroup
+ \ignorespaces}}
+
+\def\GraphGrid(#1,#2){\bgroup\textcolor{red}{\linethickness{.1\p@}%
+\RoundUp#1modulo10to\@GridWd \RoundUp#2modulo10to\@GridHt
+\@tempcnta=\@GridWd \divide\@tempcnta10\relax \advance\@tempcnta\@ne
+\multiput(0,0)(10,0){\@tempcnta}{\line(0,1){\@GridHt}}%
+\@tempcnta=\@GridHt \divide\@tempcnta10\advance\@tempcnta\@ne
+\multiput(0,0)(0,10){\@tempcnta}{\line(1,0){\@GridWd}}\thinlines}%
+\egroup\ignorespaces}
+\def\RoundUp#1modulo#2to#3{\expandafter\@tempcnta\Integer#1.??%
+\count254\@tempcnta\divide\count254by#2\relax
+\multiply\count254by#2\relax
+\count252\@tempcnta\advance\count252-\count254
+\ifnum\count252>0\advance\count252-#2\relax
+\advance\@tempcnta-\count252\fi\edef#3{\number\@tempcnta}\ignorespaces}%
+\def\Integer#1.#2??{#1}%
+
+\def\DividE#1by#2to#3{%
+ \edef#3{\fpeval{#1 / #2}}\relax
+}
+\let\DivideFN\DividE
+\def\MultiplY#1by#2to#3{\edef#3{\fpeval{#1 * #2}}}\relax
+\let\MultiplyFN\MultiplY
+\unless\ifdefined\Numero
+ \def\Numero#1#2{\bgroup\dimen3254=#2\relax
+ \edef\x{\noexpand\egroup\noexpand\edef\noexpand#1{%
+ \strip@pt\dimen3254}}\x\ignorespaces}%
+\fi
+\def\SinOf#1to#2{\edef#2{\fpeval{round(sind#1,6)}}}\relax
+\def\CosOf#1to#2{\edef#2{\fpeval{round(cosd#1,6)}}}\relax
+\def\ArgOfVect#1to#2{\bgroup\GetCoord(#1){\t@X}{\t@Y}%
+\def\s@gno{}%
+\ifdim\t@X\p@=\z@
+ \ifdim\t@Y\p@=\z@
+ \def\ArcTan{0}% vettore nullo
+ \else
+ \def\ArcTan{90}% vettore verticale
+ \ifdim\t@Y\p@<\z@\def\ArcTan{-90}\fi
+ \fi
+\else
+ \ifdim\t@Y\p@=\z@% vettore orizzontale
+ \ifdim\t@X\p@<\z@
+ \def\ArcTan{180}%
+ \else
+ \def\ArcTan{0}%
+ \fi
+ \else % vettore qualsiasi
+ \edef\ArcTan{\fpeval{atand(\t@Y / \t@X)}}\relax
+ \ifdim\t@X\p@<\z@% vettore nei quadranti di sinistra
+ \ifdim\t@Y\p@<\z@
+ \edef\ArcTan{\fpeval{\ArcTan - 180}}\relax
+ \else
+ \edef\ArcTan{\fpeval{\ArcTan + 180}}\relax
+ \fi
+ \fi
+ \fi
+\fi
+\edef\x{\noexpand\egroup\noexpand\edef\noexpand#2{\ArcTan}}%
+\x\ignorespaces}
+\def\MakeVectorFrom#1#2to#3{\edef#3{#1,#2}\ignorespaces}%
+\def\CopyVect#1to#2{\edef#2{#1}\ignorespaces}%
+\def\ModOfVect#1to#2{\GetCoord(#1)\t@X\t@Y
+\edef#2{\fpeval{sqrt(\t@X*\t@X + \t@Y*\t@Y)}}\relax
+\ignorespaces}%
+\def\DirOfVect#1to#2{\GetCoord(#1)\t@X\t@Y
+\ModOfVect#1to\@tempa
+\unless\ifdim\@tempa\p@=\z@
+ \DividE\t@X\p@ by\@tempa to\t@X
+ \DividE\t@Y\p@ by\@tempa to\t@Y
+\fi
+\MakeVectorFrom\t@X\t@Y to#2\ignorespaces}%
+\def\ModAndDirOfVect#1to#2and#3{%
+\GetCoord(#1)\t@X\t@Y
+\ModOfVect#1to#2%
+\DirOfVect#1to#3\ignorespaces}%
+\def\DistanceAndDirOfVect#1minus#2to#3and#4{%
+\SubVect#2from#1to\@tempa
+\ModAndDirOfVect\@tempa to#3and#4\ignorespaces}%
+\def\XpartOfVect#1to#2{%
+\GetCoord(#1)#2\@tempa\ignorespaces}%
+\def\YpartOfVect#1to#2{%
+\GetCoord(#1)\@tempa#2\ignorespaces}%
+\def\DirFromAngle#1to#2{%
+\CosOf#1to\t@X
+\SinOf#1to\t@Y
+\MakeVectorFrom\t@X\t@Y to#2\ignorespaces}%
+\def\ScaleVect#1by#2to#3{\GetCoord(#1)\t@X\t@Y
+\edef\t@X{\fpeval{#2 * \t@X}}\relax
+\edef\t@Y{\fpeval{#2 * \t@Y}}\relax
+\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}%
+\def\ConjVect#1to#2{\GetCoord(#1)\t@X\t@Y
+\edef\t@Y{-\t@Y}%
+\MakeVectorFrom\t@X\t@Y to#2\ignorespaces}%
+\def\AddVect#1and#2to#3{\GetCoord(#1)\tu@X\tu@Y
+\GetCoord(#2)\td@X\td@Y
+\edef\t@X{\fpeval{\tu@X + \td@X}}\relax
+\edef\t@Y{\fpeval{\tu@Y + \td@Y}}\relax
+\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}%
+\def\SubVect#1from#2to#3{\GetCoord(#1)\tu@X\tu@Y
+\GetCoord(#2)\td@X\td@Y
+\edef\t@X{\fpeval{\td@X - \tu@X}}\relax
+\edef\t@Y{\fpeval{\td@Y - \tu@Y}}\relax
+\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}%
+\def\MultVect#1by{\@ifstar{\@ConjMultVect#1by}{\@MultVect#1by}}%
+\def\@MultVect#1by#2to#3{\GetCoord(#1)\tu@X\tu@Y
+\GetCoord(#2)\td@X\td@Y
+\edef\t@X{\fpeval{\tu@X * \td@X - \tu@Y * \td@Y}}\relax
+\edef\t@Y{\fpeval{\tu@Y * \td@X + \tu@X * \td@Y}}\relax
+\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}%
+\def\@ConjMultVect#1by#2to#3{\GetCoord(#1)\tu@X\tu@Y
+\GetCoord(#2)\td@X\td@Y
+\edef\t@X{\fpeval{\tu@X * \td@X + \tu@Y * \td@Y}}\relax
+\edef\t@Y{\fpeval{\tu@Y * \td@X - \tu@X * \td@Y}}\relax
+\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}
+\def\DivVect#1by#2to#3{\ModAndDirOfVect#2to\@Mod and\@Dir
+\edef\@Mod{\fpeval{1 / \@Mod}}\relax
+\ConjVect\@Dir to\@Dir
+\ScaleVect#1by\@Mod to\@tempa
+\MultVect\@tempa by\@Dir to#3\ignorespaces}%
+\def\Arc(#1)(#2)#3{\begingroup
+\@tdA=#3\p@
+\unless\ifdim\@tdA=\z@
+ \@Arc(#1)(#2)%
+\fi
+\endgroup\ignorespaces}%
+\def\@Arc(#1)(#2){%
+\ifdim\@tdA>\z@
+ \let\Segno+%
+\else
+ \@tdA=-\@tdA \let\Segno-%
+\fi
+\Numero\@gradi\@tdA
+\ifdim\@tdA>360\p@
+ \PackageWarning{curve2e}{The arc aperture is \@gradi\space degrees
+ and gets reduced\MessageBreak%
+ to the range 0--360 taking the sign into consideration}%
+ \@whiledim\@tdA>360\p@\do{\advance\@tdA-360\p@}%
+\fi
+\SubVect#2from#1to\@V \ModOfVect\@V to\@Raggio
+\CopyVect#2to\@pPun
+\CopyVect#1to\@Cent \GetCoord(\@pPun)\@pPunX\@pPunY
+\@@Arc\strokepath\ignorespaces}%
+\def\@@Arc{%
+\pIIe@moveto{\@pPunX\unitlength}{\@pPunY\unitlength}%
+\ifdim\@tdA>180\p@
+ \advance\@tdA-180\p@
+ \Numero\@gradi\@tdA
+ \SubVect\@pPun from\@Cent to\@V
+ \AddVect\@V and\@Cent to\@sPun
+ \MultVect\@V by0,-1.3333333to\@V
+ \if\Segno-\ScaleVect\@V by-1to\@V\fi
+ \AddVect\@pPun and\@V to\@pcPun
+ \AddVect\@sPun and\@V to\@scPun
+ \GetCoord(\@pcPun)\@pcPunX\@pcPunY
+ \GetCoord(\@scPun)\@scPunX\@scPunY
+ \GetCoord(\@sPun)\@sPunX\@sPunY
+ \pIIe@curveto{\@pcPunX\unitlength}{\@pcPunY\unitlength}%
+ {\@scPunX\unitlength}{\@scPunY\unitlength}%
+ {\@sPunX\unitlength}{\@sPunY\unitlength}%
+ \CopyVect\@sPun to\@pPun
+\fi
+\ifdim\@tdA>\z@
+ \DirFromAngle\@gradi to\@Dir \if\Segno-\ConjVect\@Dir to\@Dir \fi
+ \SubVect\@Cent from\@pPun to\@V
+ \MultVect\@V by\@Dir to\@V
+ \AddVect\@Cent and\@V to\@sPun
+ \@tdA=.5\@tdA \Numero\@gradi\@tdA
+ \DirFromAngle\@gradi to\@Phimezzi
+ \GetCoord(\@Phimezzi)\@cosphimezzi\@sinphimezzi
+ \@tdB=1.3333333\p@ \@tdB=\@Raggio\@tdB
+ \@tdC=\p@ \advance\@tdC -\@cosphimezzi\p@ \Numero\@tempa\@tdC
+ \@tdB=\@tempa\@tdB
+ \DividE\@tdB by\@sinphimezzi\p@ to\@cZ
+ \ScaleVect\@Phimezzi by\@cZ to\@Phimezzi
+ \ConjVect\@Phimezzi to\@mPhimezzi
+ \if\Segno-%
+ \let\@tempa\@Phimezzi
+ \let\@Phimezzi\@mPhimezzi
+ \let\@mPhimezzi\@tempa
+ \fi
+ \SubVect\@sPun from\@pPun to\@V
+ \DirOfVect\@V to\@V
+ \MultVect\@Phimezzi by\@V to\@Phimezzi
+ \AddVect\@sPun and\@Phimezzi to\@scPun
+ \ScaleVect\@V by-1to\@V
+ \MultVect\@mPhimezzi by\@V to\@mPhimezzi
+ \AddVect\@pPun and\@mPhimezzi to\@pcPun
+ \GetCoord(\@pcPun)\@pcPunX\@pcPunY
+ \GetCoord(\@scPun)\@scPunX\@scPunY
+ \GetCoord(\@sPun)\@sPunX\@sPunY
+ \pIIe@curveto{\@pcPunX\unitlength}{\@pcPunY\unitlength}%
+ {\@scPunX\unitlength}{\@scPunY\unitlength}%
+ {\@sPunX\unitlength}{\@sPunY\unitlength}%
+\fi}
+\def\VectorArc(#1)(#2)#3{\begingroup
+\@tdA=#3\p@ \ifdim\@tdA=\z@\else
+ \@VArc(#1)(#2)%
+\fi
+\endgroup\ignorespaces}%
+\def\VectorARC(#1)(#2)#3{\begingroup
+\@tdA=#3\p@
+\ifdim\@tdA=\z@\else
+ \@VARC(#1)(#2)%
+\fi
+\endgroup\ignorespaces}%
+\def\@VArc(#1)(#2){%
+\ifdim\@tdA>\z@
+ \let\Segno+%
+\else
+ \@tdA=-\@tdA \let\Segno-%
+\fi \Numero\@gradi\@tdA
+\ifdim\@tdA>360\p@
+ \PackageWarning{curve2e}{The arc aperture is \@gradi\space degrees
+ and gets reduced\MessageBreak%
+ to the range 0--360 taking the sign into consideration}%
+ \@whiledim\@tdA>360\p@\do{\advance\@tdA-360\p@}%
+\fi
+\SubVect#1from#2to\@V \ModOfVect\@V to\@Raggio \CopyVect#2to\@pPun
+\@tdE=\pIIe@FAW\@wholewidth \@tdE=\pIIe@FAL\@tdE
+\DividE\@tdE by \@Raggio\unitlength to\DeltaGradi
+\@tdD=\DeltaGradi\p@
+\@tdD=57.29578\@tdD \Numero\DeltaGradi\@tdD
+\@tdD=\ifx\Segno--\fi\@gradi\p@ \Numero\@tempa\@tdD
+\DirFromAngle\@tempa to\@Dir
+\MultVect\@V by\@Dir to\@sPun
+\edef\@tempA{\ifx\Segno-\m@ne\else\@ne\fi}%
+\MultVect\@sPun by 0,\@tempA to\@vPun
+\DirOfVect\@vPun to\@Dir
+\AddVect\@sPun and #1 to \@sPun
+\GetCoord(\@sPun)\@tdX\@tdY
+\@tdD\ifx\Segno--\fi\DeltaGradi\p@
+\@tdD=.5\@tdD \Numero\DeltaGradi\@tdD
+\DirFromAngle\DeltaGradi to\@Dird
+\MultVect\@Dir by*\@Dird to\@Dir
+\GetCoord(\@Dir)\@xnum\@ynum
+\put(\@tdX,\@tdY){\vector(\@xnum,\@ynum){0}}%
+\@tdE =\ifx\Segno--\fi\DeltaGradi\p@
+\advance\@tdA -\@tdE \Numero\@gradi\@tdA
+\CopyVect#1to\@Cent \GetCoord(\@pPun)\@pPunX\@pPunY
+\@@Arc
+\strokepath\ignorespaces}%
+\def\@VARC(#1)(#2){%
+\ifdim\@tdA>\z@
+ \let\Segno+%
+\else
+ \@tdA=-\@tdA \let\Segno-%
+\fi \Numero\@gradi\@tdA
+\ifdim\@tdA>360\p@
+ \PackageWarning{curve2e}{The arc aperture is \@gradi\space degrees
+ and gets reduced\MessageBreak%
+ to the range 0--360 taking the sign into consideration}%
+ \@whiledim\@tdA>360\p@\do{\advance\@tdA-360\p@}%
+\fi
+\SubVect#1from#2to\@V \ModOfVect\@V to\@Raggio \CopyVect#2to\@pPun
+\@tdE=\pIIe@FAW\@wholewidth \@tdE=0.8\@tdE
+\DividE\@tdE by \@Raggio\unitlength to\DeltaGradi
+\@tdD=\DeltaGradi\p@ \@tdD=57.29578\@tdD \Numero\DeltaGradi\@tdD
+\@tdD=\if\Segno--\fi\@gradi\p@ \Numero\@tempa\@tdD
+\DirFromAngle\@tempa to\@Dir
+\MultVect\@V by\@Dir to\@sPun% corrects the end point
+\edef\@tempA{\if\Segno--\fi1}%
+\MultVect\@sPun by 0,\@tempA to\@vPun
+\DirOfVect\@vPun to\@Dir
+\AddVect\@sPun and #1 to \@sPun
+\GetCoord(\@sPun)\@tdX\@tdY
+\@tdD\if\Segno--\fi\DeltaGradi\p@
+\@tdD=.5\@tdD \Numero\@tempB\@tdD
+\DirFromAngle\@tempB to\@Dird
+\MultVect\@Dir by*\@Dird to\@Dir
+\GetCoord(\@Dir)\@xnum\@ynum
+\put(\@tdX,\@tdY){\vector(\@xnum,\@ynum){0}}% end point arrowt ip
+\@tdE =\DeltaGradi\p@
+\advance\@tdA -2\@tdE \Numero\@gradi\@tdA
+\CopyVect#1to\@Cent \GetCoord(\@pPun)\@pPunX\@pPunY
+\SubVect\@Cent from\@pPun to \@V
+\edef\@tempa{\if\Segno-\else-\fi\@ne}%
+\MultVect\@V by0,\@tempa to\@vPun
+\@tdE\if\Segno--\fi\DeltaGradi\p@
+\Numero\@tempB{0.5\@tdE}%
+\DirFromAngle\@tempB to\@Dird
+\MultVect\@vPun by\@Dird to\@vPun% corrects the starting point
+\DirOfVect\@vPun to\@Dir\GetCoord(\@Dir)\@xnum\@ynum
+\put(\@pPunX,\@pPunY){\vector(\@xnum,\@ynum){0}}% starting point arrow tip
+\edef\@tempa{\if\Segno--\fi\DeltaGradi}%
+\DirFromAngle\@tempa to \@Dir
+\SubVect\@Cent from\@pPun to\@V
+\MultVect\@V by\@Dir to\@V
+\AddVect\@Cent and\@V to\@pPun
+\GetCoord(\@pPun)\@pPunX\@pPunY
+\@@Arc
+\strokepath\ignorespaces}%
+\def\CurveBetween#1and#2WithDirs#3and#4{%
+ \StartCurveAt#1WithDir{#3}\relax
+ \CurveTo#2WithDir{#4}\CurveFinish\ignorespaces
+}%
+\def\StartCurveAt#1WithDir#2{%
+\begingroup
+\GetCoord(#1)\@tempa\@tempb
+\CopyVect\@tempa,\@tempb to\@Pzero
+\pIIe@moveto{\@tempa\unitlength}{\@tempb\unitlength}%
+\GetCoord(#2)\@tempa\@tempb
+\CopyVect\@tempa,\@tempb to\@Dzero
+\DirOfVect\@Dzero to\@Dzero
+\ignorespaces}
+\def\ChangeDir<#1>{%
+\GetCoord(#1)\@tempa\@tempb
+\CopyVect\@tempa,\@tempb to\@Dzero
+\DirOfVect\@Dzero to\@Dzero
+\ignorespaces}
+\def\CurveFinish{\strokepath\endgroup\ignorespaces}%
+\def\FillCurve{\fillpath\endgroup\ignorespaces}
+\def\CurveEnd{\fillstroke\endgroup\ignorespaces}
+\def\CbezierTo#1WithDir#2AndDists#3And#4{%
+\GetCoord(#1)\@tX\@tY \MakeVectorFrom\@tX\@tY to\@Puno
+\GetCoord(#2)\@tX\@tY \MakeVectorFrom\@tX\@tY to \@Duno
+\DirOfVect\@Duno to\@Duno
+\ScaleVect\@Dzero by#3to\@Czero \AddVect\@Pzero and\@Czero to\@Czero
+\ScaleVect\@Duno by-#4to \@Cuno \AddVect\@Puno and\@Cuno to \@Cuno
+\GetCoord(\@Czero)\@XCzero\@YCzero
+\GetCoord(\@Cuno)\@XCuno\@YCuno
+\GetCoord(\@Puno)\@XPuno\@YPuno
+\pIIe@curveto{\@XCzero\unitlength}{\@YCzero\unitlength}%
+ {\@XCuno\unitlength}{\@YCuno\unitlength}%
+ {\@XPuno\unitlength}{\@YPuno\unitlength}%
+\CopyVect\@Puno to\@Pzero
+\CopyVect\@Duno to\@Dzero
+\ignorespaces}%
+\def\CbezierBetween#1And#2WithDirs#3And#4UsingDists#5And#6{%
+\StartCurveAt#1WithDir{#3}\relax
+\CbezierTo#2WithDir#4AndDists#5And{#6}\CurveFinish}
+
+\def\@isTension#1;#2!!{\def\@tempA{#1}%
+\def\@tempB{#2}\unless\ifx\@tempB\empty\strip@semicolon#2\fi}
+
+\def\strip@semicolon#1;{\def\@tempB{#1}}
+\def\CurveTo#1WithDir#2{%
+\def\@Tuno{1}\def\@Tzero{1}\relax
+\edef\@Puno{#1}\@isTension#2;!!%
+\expandafter\DirOfVect\@tempA to\@Duno
+\bgroup\unless\ifx\@tempB\empty\GetCoord(\@tempB)\@Tzero\@Tuno\fi
+\DistanceAndDirOfVect\@Puno minus\@Pzero to\@Chord and\@DirChord
+\MultVect\@Dzero by*\@DirChord to \@Dpzero
+\MultVect\@Duno by*\@DirChord to \@Dpuno
+\GetCoord(\@Dpzero)\@DXpzero\@DYpzero
+\GetCoord(\@Dpuno)\@DXpuno\@DYpuno
+\DivideFN\@Chord by2 to\@semichord
+\ifdim\@DXpzero\p@=\z@
+ \@tdA=1.333333\p@
+ \Numero\@KCzero{\@semichord\@tdA}%
+\fi
+\ifdim\@DYpzero\p@=\z@
+ \@tdA=1.333333\p@
+ \Numero\@Kpzero{\@semichord\@tdA}%
+\fi
+\unless\ifdim\@DXpzero\p@=\z@
+ \unless\ifdim\@DYpzero\p@=\z@
+ \edef\@CosDzero{\ifdim\@DXpzero\p@<\z@ -\fi\@DXpzero}%
+ \edef\@SinDzero{\ifdim\@DYpzero\p@<\z@ -\fi\@DYpzero}%
+ \@tdA=\@semichord\p@ \@tdA=1.333333\@tdA
+ \DividE\@tdA by\@SinDzero\p@ to \@KCzero
+ \@tdA=\dimexpr(\p@-\@CosDzero\p@)\relax
+ \DividE\@KCzero\@tdA by\@SinDzero\p@ to \@KCzero
+ \fi
+\fi
+\MultiplyFN\@KCzero by \@Tzero to \@KCzero
+\ScaleVect\@Dzero by\@KCzero to\@CPzero
+\AddVect\@Pzero and\@CPzero to\@CPzero
+\ifdim\@DXpuno\p@=\z@
+ \@tdA=-1.333333\p@
+ \Numero\@KCuno{\@semichord\@tdA}%
+\fi
+\ifdim\@DYpuno\p@=\z@
+ \@tdA=-1.333333\p@
+ \Numero\@KCuno{\@semichord\@tdA}%
+\fi
+\unless\ifdim\@DXpuno\p@=\z@
+ \unless\ifdim\@DYpuno\p@=\z@
+ \edef\@CosDuno{\ifdim\@DXpuno\p@<\z@ -\fi\@DXpuno}%
+ \edef\@SinDuno{\ifdim\@DYpuno\p@<\z@ -\fi\@DYpuno}%
+ \@tdA=\@semichord\p@ \@tdA=-1.333333\@tdA
+ \DividE\@tdA by \@SinDuno\p@ to \@KCuno
+ \@tdA=\dimexpr(\p@-\@CosDuno\p@)\relax
+ \DividE\@KCuno\@tdA by\@SinDuno\p@ to \@KCuno
+ \fi
+\fi
+\MultiplyFN\@KCuno by \@Tuno to \@KCuno
+\ScaleVect\@Duno by\@KCuno to\@CPuno
+\AddVect\@Puno and\@CPuno to\@CPuno
+\GetCoord(\@Puno)\@XPuno\@YPuno
+\GetCoord(\@CPzero)\@XCPzero\@YCPzero
+\GetCoord(\@CPuno)\@XCPuno\@YCPuno
+\pIIe@curveto{\@XCPzero\unitlength}{\@YCPzero\unitlength}%
+ {\@XCPuno\unitlength}{\@YCPuno\unitlength}%
+ {\@XPuno\unitlength}{\@YPuno\unitlength}\egroup
+\CopyVect\@Puno to\@Pzero
+\CopyVect\@Duno to\@Dzero
+\ignorespaces}%
+\def\Curve{\@ifstar{\let\fillstroke\fillpath\Curve@}%
+{\let\fillstroke\strokepath\Curve@}}
+
+\def\Curve@(#1)<#2>{%
+ \StartCurveAt#1WithDir{#2}%
+ \@ifnextchar\lp@r\@Curve{%
+ \PackageWarning{curve2e}{%
+ Curve specifications must contain at least two nodes!\Messagebreak
+ Please, control your \string\Curve\space specifications\MessageBreak}}}
+\def\@Curve(#1)<#2>{%
+ \CurveTo#1WithDir{#2}%
+ \@ifnextchar\lp@r\@Curve{%
+ \@ifnextchar[\@ChangeDir\CurveEnd}}
+\def\@ChangeDir[#1]{\ChangeDir<#1>\@Curve}
+\def\Qurve{\@ifstar{\let\fillstroke\fillpath\Qurve@}%
+{\let\fillstroke\strokepath\Qurve@}}
+
+\def\Qurve@(#1)<#2>{%
+ \StartCurveAt#1WithDir{#2}%
+ \@ifnextchar\lp@r\@Qurve{%
+ \PackageWarning{curve2e}{%
+ Quadratic curve specifications must contain at least
+ two nodes!\Messagebreak
+ Please, control your Qurve specifications\MessageBreak}}}%
+
+\def\@Qurve(#1)<#2>{\QurveTo#1WithDir{#2}%
+ \@ifnextchar\lp@r\@Qurve{%
+ \@ifnextchar[\@ChangeQDir\CurveEnd}}%
+
+\def\@ChangeQDir[#1]{\ChangeDir<#1>\@Qurve}%
+\def\QurveTo#1WithDir#2{%
+\edef\@Puno{#1}\DirOfVect#2to\@Duno\bgroup
+\DistanceAndDirOfVect\@Puno minus\@Pzero to\@Chord and\@DirChord
+\MultVect\@Dzero by*\@Duno to \@Scalar
+\YpartOfVect\@Scalar to \@YScalar
+\ifdim\@YScalar\p@=\z@
+\PackageWarning{curve2e}%
+ {Quadratic Bezier arcs cannot have their starting\MessageBreak
+ and ending directions parallel or antiparallel with\MessageBreak
+ each other. This arc is skipped and replaced with
+ a dotted line.\MessageBreak}%
+ \Dotline(\@Pzero)(\@Puno){2}\relax
+\else
+\MultVect\@Dzero by*\@DirChord to \@Dpzero
+\MultVect\@Duno by*\@DirChord to \@Dpuno
+\GetCoord(\@Dpzero)\@DXpzero\@DYpzero
+\GetCoord(\@Dpuno)\@DXpuno\@DYpuno
+\MultiplyFN\@DXpzero by\@DXpuno to\@XXD
+\MultiplyFN\@DYpzero by\@DYpuno to\@YYD
+\unless\ifdim\@YYD\p@<\z@\ifdim\@XXD\p@<\z@
+\PackageWarning{curve2e}%
+ {Quadratic Bezier arcs cannot have inflection points\MessageBreak
+ Therefore the tangents to the starting and ending arc\MessageBreak
+ points cannot be directed to the same half plane.\MessageBreak
+ This arc is skipped and replaced by a dotted line\MessageBreak}%
+ \Dotline(\@Pzero)(\@Puno){2}\fi
+\else
+\edef\@CDzero{\@DXpzero}\relax
+\edef\@SDzero{\@DYpzero}\relax
+\edef\@CDuno{\@DXpuno}\relax
+\edef\@SDuno{\@DYpuno}\relax
+\MultiplyFN\@SDzero by\@CDuno to\@tempA
+\MultiplyFN\@SDuno by\@CDzero to\@tempB
+\edef\@tempA{\strip@pt\dimexpr\@tempA\p@-\@tempB\p@}\relax
+\@tdA=\@SDuno\p@ \@tdB=\@Chord\p@ \@tdC=\@tempA\p@
+\edef\@tempC{\strip@pt\dimexpr \@tdA*\@tdB/\@tdC}\relax
+\MultiplyFN\@tempC by\@CDzero to \@XC
+\MultiplyFN\@tempC by\@SDzero to \@YC
+\ModOfVect\@XC,\@YC to\@KC
+\ScaleVect\@Dzero by\@KC to\@CP
+\AddVect\@Pzero and\@CP to\@CP
+\GetCoord(\@Pzero)\@XPzero\@YPzero
+\GetCoord(\@Puno)\@XPuno\@YPuno
+\GetCoord(\@CP)\@XCP\@YCP
+\@ovxx=\@XPzero\unitlength \@ovyy=\@YPzero\unitlength
+\@ovdx=\@XCP\unitlength \@ovdy=\@YCP\unitlength
+\@xdim=\@XPuno\unitlength \@ydim=\@YPuno\unitlength
+ \pIIe@bezier@QtoC\@ovxx\@ovdx\@ovro
+ \pIIe@bezier@QtoC\@ovyy\@ovdy\@ovri
+ \pIIe@bezier@QtoC\@xdim\@ovdx\@clnwd
+ \pIIe@bezier@QtoC\@ydim\@ovdy\@clnht
+ \pIIe@curveto\@ovro\@ovri\@clnwd\@clnht\@xdim\@ydim
+\fi\fi\egroup
+\CopyVect\@Puno to\@Pzero
+\CopyVect\@Duno to\@Dzero
+\ignorespaces}
+
+%%
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "author-maintained"
+%%
+%% This work consists of file curve2e.dtx, and the derived files
+%% curve2e.sty and curve2e.pdf, plus the auxiliary derived files
+%% README.txt and manifest.txt.
+%%
+%%
+%% End of file `curve2e.sty'.