summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/ebezier/ebezier.sty533
1 files changed, 533 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ebezier/ebezier.sty b/Master/texmf-dist/tex/latex/ebezier/ebezier.sty
new file mode 100644
index 00000000000..a2a7bcc9198
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ebezier/ebezier.sty
@@ -0,0 +1,533 @@
+%%
+%% This is file `ebezier.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ebezier.dtx (with options: `package')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from ebezier.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file ebezier.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+\ProvidesPackage{ebezier}
+ [2005/03/01 v4]
+%%
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{calc}
+%%
+\newfont{\vrm}{cmr5}
+\newfont{\virm}{cmr6}
+\newfont{\viirm}{cmr7}
+\newfont{\viiirm}{cmr8}
+\newfont{\ixrm}{cmr9}
+\newfont{\xrm}{cmr10}
+\newfont{\xiirm}{cmr12}
+\newfont{\xviirm}{cmr17}
+\newfont{\xirm}{cmr10 scaled \magstephalf}
+\newfont{\xivrm}{cmr10 scaled \magstep2}
+\newfont{\xxrm}{cmr10 scaled \magstep4}
+\newfont{\xxvrm}{cmr10 scaled \magstep5}
+%%
+\newcounter{@cnta}\newcounter{@cntb}\newcounter{@cntc}\newcounter{@cntd}
+%%
+%% \@TempDim#1#2#3{"count"|"dimen"|"box"|"skip"}{\myname}{\realname}
+%% allocate new one or alias is defined, so use it
+%%
+\def\@TempDim#1#2#3{%
+ \ifx\@und@fined#3\csname new#1\endcsname#2%
+ \else\let#2#3\fi}
+%%
+\@TempDim{dimen}\@X\@ovxx
+\@TempDim{dimen}\@Xa\@ovdx
+\@TempDim{dimen}\@Xb\@ovyy
+\@TempDim{dimen}\@Xc\@ovdy
+\@TempDim{dimen}\@Y\@ovro
+\@TempDim{dimen}\@Ya\@ovri
+\@TempDim{dimen}\@Yb\@xdim
+\@TempDim{dimen}\@Yc\@ydim
+\@TempDim{dimen}\@Z\@clnht
+\@TempDim{dimen}\@Za\@clnwd
+\@TempDim{dimen}\@Zb\@dashdim
+\@TempDim{dimen}\@Zc\@tempdima
+\@TempDim{dimen}\@Zd\@tempdimb
+\@TempDim{dimen}\@Ze\@tempdimc
+%%
+\newlength{\@Zf}\newlength{\@Zg}\newlength{\@Zh}
+\newlength{\@Zi}\newlength{\@Zj}
+\newlength{\magicnum}
+\newcommand\set@magic{%
+ \setlength{\magicnum}{0.55228474983\unitlength}}
+%%
+\newlength{\eps}
+\setlength{\eps}{1sp}
+%%
+\newlength{\PathLength}
+%%
+\chardef\x@=10
+\newcommand{\pathmax}{50}
+%%
+\newsavebox{\@pt}
+%%
+\newif\if@other@symbol
+\newif\if@standard@symbol
+\newcommand{\DefStandardPlotSymbol}{%
+ \@other@symbolfalse\@standard@symboltrue
+ \setbox\@pt\hbox{\hskip -.5\wd0\vrule height\@halfwidth
+ depth\@halfwidth width\@wholewidth}}
+\newcommand{\DefOldPlotSymbol}{%
+ \@other@symbolfalse\@standard@symbolfalse
+ \setbox\@pt\hbox{\vrule height\@halfwidth
+ depth\@halfwidth width\@wholewidth}}
+\newcommand{\DefPlotSymbol}[1]{\setbox0=\hbox{#1}\@X\ht0\advance\@X-\dp0
+ \@halfwidth.5\ht0\@wholewidth\ht0
+ \@other@symboltrue\@standard@symbolfalse
+ \setbox\@pt\hbox{\hskip -.5\wd0\lower.5\@X\copy0}}
+\newcommand{\DefShiftedPlotSymbol}[4]{\setbox0=\hbox{#1}\@X #2\@Y #3
+ \@wholewidth #4\@halfwidth.5\@wholewidth
+ \@other@symboltrue\@standard@symbolfalse
+ \setbox\@pt\hbox{\hskip-\@X\lower\@Y\copy0}}
+\newcommand{\set@width}{%
+ \if@other@symbol
+ \relax
+ \else
+ \if@standard@symbol
+ \@X-.5\@wholewidth
+ \else
+ \@X\z@
+ \fi
+ \setbox\@pt\hbox{\hskip\@X\vrule height\@halfwidth
+ depth\@halfwidth width\@wholewidth}%
+ \fi}
+%%
+\DefStandardPlotSymbol
+%%
+\def\lbezier{\@ifnextchar [{\@lbezier}{\@lbezier[0]}}
+\def\@lbezier[#1](#2,#3)(#4,#5){%
+ \c@@cntc#1\relax
+ \ifnum \c@@cntc<\@ne
+ \multiply\eps\x@
+ \Length(#2,#3)(#4,#5){\PathLength}%
+ \divide\eps\x@
+ \c@@cntc\PathLength
+ \@X.5\@halfwidth \divide\c@@cntc\@X
+ \ifnum \c@@cntc>\qbeziermax%
+ \PackageInfo{ebezier}{\the\c@@cntc\space points needed exceeding %
+ qbeziermax=\qbeziermax!}\fi
+ \fi
+ \ifnum \c@@cntc>\qbeziermax
+ \c@@cntc\qbeziermax\relax
+ \PackageWarning{ebezier}{Counter reset to qbeziermax=\qbeziermax!}\fi
+ \c@@cnta\c@@cntc\relax\advance\c@@cnta\@ne
+ \@Xa #4\unitlength \advance\@Xa-#2\unitlength \divide\@Xa\c@@cntc
+ \@Ya #5\unitlength \advance\@Ya-#3\unitlength \divide\@Ya\c@@cntc
+ \c@@cntb\z@\relax
+ \set@width
+ \put(#2,#3){\@whilenum{\c@@cntb<\c@@cnta}\do
+ {\@X\c@@cntb \@Xa\@Y \c@@cntb\@Ya
+ \raise\@Y\hbox to\z@{\hskip\@X\unhcopy\@pt\hss}%
+ \advance\c@@cntb\@ne}}}
+%%
+\def\Lbezier{\@ifnextchar [{\@Lbezier}{\@Lbezier[0]}}
+\def\@Lbezier[#1](#2,#3)(#4,#5){\c@@cntc#1\relax
+ \@Xb\@wholewidth
+ \@X #4\unitlength \advance\@X-#2\unitlength \AbsLen{\@X}%
+ \@Y #5\unitlength \advance\@Y-#3\unitlength \AbsLen{\@Y}%
+ \LenNorm{\@X}{\@Y}{\@Xc}\LenMult{\@Xc}{\@wholewidth}{\@Yb}%
+ \LenDiv{\@Yb}{\@X+\@Y}{\@wholewidth}\@halfwidth .5\@wholewidth
+ \ifnum \c@@cntc<\@ne
+ \multiply\eps\x@
+ \Length(#2,#3)(#4,#5){\PathLength}%
+ \divide\eps\x@
+ \c@@cntc\PathLength
+ \@X.5\@halfwidth \divide\c@@cntc\@X
+ \ifnum \c@@cntc>\qbeziermax%
+ \PackageInfo{ebezier}{\the\c@@cntc\space points needed exceeding %
+ qbeziermax=\qbeziermax!}\fi
+ \fi
+ \ifnum \c@@cntc>\qbeziermax
+ \c@@cntc\qbeziermax\relax
+ \PackageWarning{ebezier}{Counter reset to qbeziermax=\qbeziermax!}\fi
+ \c@@cnta\c@@cntc\relax \advance\c@@cnta\@ne
+ \@Xa #4\unitlength \advance\@Xa-#2\unitlength \divide\@Xa\c@@cntc
+ \@Ya #5\unitlength \advance\@Ya-#3\unitlength \divide\@Ya\c@@cntc
+ \c@@cntb\z@\relax
+ \set@width
+ \put(#2,#3){\@whilenum{\c@@cntb<\c@@cnta}\do
+ {\@X\c@@cntb \@Xa\@Y \c@@cntb\@Ya
+ \raise\@Y\hbox to\z@{\hskip\@X\unhcopy\@pt\hss}%
+ \advance\c@@cntb\@ne}}
+ \@wholewidth\@Xb \@halfwidth .5\@Xb}
+%%
+\def\ljoin{\@ifnextchar [{\@ljoin}{\@ljoin[0]}}
+\def\@ljoin[#1](#2,#3){\@ifnextchar ({\l@join[#1](#2,#3)}{\relax}}
+\def\l@join[#1](#2,#3)(#4,#5){%
+ \lbezier[#1](#2,#3)(#4,#5)%
+ \ljoin[#1](#4,#5)}
+%%
+\def\Ljoin{\@ifnextchar [{\@Ljoin}{\@Ljoin[0]}}
+\def\@Ljoin[#1](#2,#3){\@ifnextchar ({\L@join[#1](#2,#3)}{\relax}}
+\def\L@join[#1](#2,#3)(#4,#5){%
+ \Lbezier[#1](#2,#3)(#4,#5)%
+ \Ljoin[#1](#4,#5)}
+%%
+\def\Qbezier{\@ifnextchar [{\@Qbezier}{\@Qbezier[0]}}
+\def\@Qbezier[#1](#2,#3)(#4,#5)(#6,#7){\c@@cntc#1\relax
+ \ifnum \c@@cntc<\@ne
+ \multiply\eps\x@
+ \PathLengthQ[5](#2,#3)(#4,#5)(#6,#7)%
+ \divide\eps\x@
+ \c@@cntc\PathLength
+ \@X.5\@halfwidth \divide\c@@cntc\@X
+ \ifnum \c@@cntc>\qbeziermax%
+ \PackageInfo{ebezier}{\the\c@@cntc\space points needed exceeding %
+ qbeziermax=\qbeziermax!}\fi
+ \fi
+ \ifnum \c@@cntc>\qbeziermax
+ \c@@cntc\qbeziermax\relax
+ \PackageWarning{ebezier}{Counter reset to qbeziermax=\qbeziermax!}\fi
+ \c@@cnta\c@@cntc\relax \advance\c@@cnta\@ne
+ \@Xa #4\unitlength \advance\@Xa-#2\unitlength \multiply\@Xa\tw@
+ \@Xb #6\unitlength \advance\@Xb-#2\unitlength
+ \advance\@Xb-\@Xa \divide\@Xb\c@@cntc
+ \@Ya #5\unitlength \advance\@Ya-#3\unitlength \multiply\@Ya\tw@
+ \@Yb #7\unitlength \advance\@Yb-#3\unitlength
+ \advance\@Yb-\@Ya \divide\@Yb\c@@cntc
+ \c@@cntb\z@\relax
+ \set@width
+ \put(#2,#3){\@whilenum{\c@@cntb<\c@@cnta}\do
+ {\@X\c@@cntb \@Xb\@Y \c@@cntb\@Yb
+ \advance\@X\@Xa \advance\@Y\@Ya
+ \divide\@X\c@@cntc \divide\@Y\c@@cntc
+ \multiply\@X\c@@cntb \multiply\@Y\c@@cntb
+ \raise \@Y \hb@xt@\z@{\kern\@X\unhcopy\@pt\hss}%
+ \advance\c@@cntb\@ne}}}
+%%
+\def\cbezier{\@ifnextchar [{\@cbezier}{\@cbezier[0]}}
+\def\@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){%
+ \c@@cntc#1\relax
+ \ifnum \c@@cntc<\@ne
+ \multiply\eps\x@
+ \PathLengthC[5](#2,#3)(#4,#5)(#6,#7)(#8,#9)%
+ \divide\eps\x@
+ \c@@cntc\PathLength
+ \@X = 0.5\@halfwidth
+ \divide\c@@cntc\@X
+ \ifnum \c@@cntc>\qbeziermax%
+ \PackageInfo{ebezier}{\the\c@@cntc\space points needed exceeding %
+ qbeziermax=\qbeziermax!}\fi
+ \fi
+ \ifnum \c@@cntc>\qbeziermax
+ \c@@cntc\qbeziermax\relax
+ \PackageWarning{ebezier}{Counter reset to qbeziermax=\qbeziermax!}\fi
+ \c@@cnta\c@@cntc\relax \advance\c@@cnta\@ne
+ \@Xa #4\unitlength \advance\@Xa-#2\unitlength \multiply\@Xa\thr@@
+ \@Xb #6\unitlength \advance\@Xb-#2\unitlength \multiply\@Xb\thr@@
+ \advance\@Xb -2\@Xa
+ \@Xc #8\unitlength \advance\@Xc-#2\unitlength
+ \advance\@Xc-\@Xa \advance\@Xc-\@Xb
+ \@Ya #5\unitlength \advance\@Ya-#3\unitlength \multiply\@Ya\thr@@
+ \@Yb #7\unitlength \advance\@Yb-#3\unitlength \multiply\@Yb\thr@@
+ \advance\@Yb-2\@Ya
+ \@Yc #9\unitlength \advance\@Yc-#3\unitlength
+ \advance\@Yc-\@Ya \advance\@Yc-\@Yb
+ \divide\@Xc\c@@cntc \divide\@Yc\c@@cntc
+ \c@@cntb\z@\relax
+ \set@width
+ \put(#2,#3){\@whilenum{\c@@cntb<\c@@cnta}\do
+ {\@X\c@@cntb \@Xc\@Y \c@@cntb\@Yc
+ \advance\@X\@Xb \advance\@Y\@Yb
+ \divide\@X\c@@cntc \divide\@Y\c@@cntc
+ \multiply\@X\c@@cntb \multiply\@Y\c@@cntb
+ \advance\@X\@Xa \advance\@Y\@Ya
+ \divide\@X\c@@cntc \divide\@Y\c@@cntc
+ \multiply\@X\c@@cntb \multiply\@Y\c@@cntb
+ \raise \@Y \hbox to \z@{\hskip \@X\unhcopy\@pt\hss}%
+ \advance\c@@cntb\@ne}}}
+%%
+\def\Cbezier{\@ifnextchar [{\@Cbezier}{\@Cbezier[0]}}
+\def\@Cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){%
+ \cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9)%
+ \c@@cntc#1\relax\divide\c@@cntc\thr@@
+ \lbezier[\c@@cntc](#2,#3)(#4,#5)%
+ \lbezier[\c@@cntc](#4,#5)(#6,#7)%
+ \lbezier[\c@@cntc](#6,#7)(#8,#9)%
+ \DefPlotSymbol{$\bullet$}
+ \lbezier[1](#2,#3)(#2,#3)
+ \lbezier[1](#4,#5)(#4,#5)
+ \lbezier[1](#6,#7)(#6,#7)
+ \lbezier[1](#8,#9)(#8,#9)
+ \DefStandardPlotSymbol
+ \thinlines}
+%%
+\long\gdef\l@put(#1,#2)#3{%
+ \@killglue\raise#2\hb@xt@\z@{\kern#1#3\hss}\ignorespaces}
+%%
+\long\gdef\l@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){%
+ \c@@cntc#1\relax
+ \dimen1#2\dimen3#3
+%%
+ \@Xa #4 \advance\@Xa-#2 \multiply\@Xa\thr@@
+ \@Xb #6 \advance\@Xb-#2 \multiply\@Xb\thr@@
+ \advance\@Xb-2\@Xa
+ \@Xc #8 \advance\@Xc-#2
+ \advance\@Xc-\@Xa \advance\@Xc-\@Xb
+ \@Ya #5 \advance\@Ya-#3 \multiply\@Ya\thr@@
+ \@Yb #7 \advance\@Yb-#3 \multiply\@Yb\thr@@
+ \advance\@Yb-2\@Ya
+ \@Yc #9 \advance\@Yc-#3
+ \advance\@Yc-\@Ya \advance\@Yc-\@Yb
+%%
+%% assume half arc
+%%
+ \ifnum \c@@cntc <\@ne
+ \multiply\eps\x@
+ \dimen5#2 \advance\dimen5-#8 \AbsLen{\dimen5}%
+ \dimen7#3 \advance\dimen7-#9 \AbsLen{\dimen7}%
+ \LenNorm{\dimen5}{\dimen7}{\PathLength}%
+ \divide\eps\x@
+ \c@@cntc\PathLength
+ \dimen5.5\@halfwidth
+ \divide\c@@cntc\dimen5
+%%
+%% 11/7 \approx \pi/2
+%%
+ \divide\c@@cntc 7 \multiply\c@@cntc 11
+ \ifnum \c@@cntc>\qbeziermax
+ \PackageInfo{ebezier}{\the\c@@cntc\space points needed exceeding %
+ qbeziermax=\qbeziermax!}\fi
+ \fi
+ \ifnum\c@@cntc>\qbeziermax
+ \c@@cntc\qbeziermax\relax
+ \PackageWarning{ebezier}{Counter reset to qbeziermax=\qbeziermax!}\fi
+ \c@@cnta\c@@cntc\relax\advance\c@@cnta\@ne%
+ \divide\@Xc\c@@cntc \divide\@Yc\c@@cntc
+ \c@@cntb\z@\relax
+ \set@width
+ \l@put(\dimen1,\dimen3){\@whilenum{\c@@cntb<\c@@cnta}\do
+ {\@X\c@@cntb \@Xc\@Y \c@@cntb\@Yc
+ \advance\@X\@Xb \advance\@Y\@Yb
+ \divide\@X\c@@cntc \divide\@Y\c@@cntc
+ \multiply\@X\c@@cntb \multiply\@Y\c@@cntb
+ \advance\@X\@Xa \advance\@Y\@Ya
+ \divide\@X\c@@cntc \divide\@Y\c@@cntc
+ \multiply\@X\c@@cntb \multiply\@Y\c@@cntb
+ \raise\@Y\hbox to\z@{\hskip\@X\unhcopy\@pt\hss}%
+ \advance\c@@cntb\@ne}}}
+%%
+\def\@circle@rt[#1](#2,#3)#4{%
+ \set@magic
+ \@Z #4\magicnum\@Za #2\unitlength\@Zb #3\unitlength
+ \@Zc #2\unitlength \advance\@Zc\@Z
+ \@Zd #3\unitlength \advance\@Zd\@Z
+ \@Ze #4\unitlength \advance\@Ze\@Za
+ \@Zf #4\unitlength \advance\@Zf\@Zb
+ \l@cbezier[#1](\@Ze,\@Zb)(\@Ze,\@Zd)(\@Zc,\@Zf)(\@Za,\@Zf)}
+%%
+\def\@circle@lt[#1](#2,#3)#4{%
+ \set@magic
+ \@Z #4\magicnum\@Za #2\unitlength\@Zb #3\unitlength
+ \@Zc #2\unitlength \advance\@Zc-\@Z
+ \@Zd #3\unitlength \advance\@Zd\@Z
+ \@Ze -#4\unitlength \advance\@Ze\@Za
+ \@Zf #4\unitlength \advance\@Zf\@Zb
+ \l@cbezier[#1](\@Za,\@Zf)(\@Zc,\@Zf)(\@Ze,\@Zd)(\@Ze,\@Zb)}
+%%
+\def\@circle@rb[#1](#2,#3)#4{%
+ \set@magic
+ \@Z #4\magicnum\@Za #2\unitlength\@Zb #3\unitlength
+ \@Zc #2\unitlength \advance\@Zc\@Z
+ \@Zd #3\unitlength \advance\@Zd-\@Z
+ \@Ze #4\unitlength \advance\@Ze\@Za
+ \@Zf -#4\unitlength \advance\@Zf\@Zb
+ \l@cbezier[#1](\@Za,\@Zf)(\@Zc,\@Zf)(\@Ze,\@Zd)(\@Ze,\@Zb)}
+%%
+\def\@circle@lb[#1](#2,#3)#4{%
+ \set@magic
+ \@Z #4\magicnum\@Za #2\unitlength\@Zb #3\unitlength
+ \@Zc #2\unitlength \advance\@Zc-\@Z
+ \@Zd #3\unitlength \advance\@Zd-\@Z
+ \@Ze -#4\unitlength \advance\@Ze\@Za
+ \@Zf -#4\unitlength \advance\@Zf\@Zb
+ \l@cbezier[#1](\@Ze,\@Zb)(\@Ze,\@Zd)(\@Zc,\@Zf)(\@Za,\@Zf)}
+%%
+\newif\if@ovf
+\def\cCircle{\@ifnextchar [{\@cCircle}{\@cCircle[0]}}
+\def\@cCircle[#1](#2,#3)#4[#5]{%
+ \@ovtfalse\@ovbfalse\@ovlfalse\@ovrfalse\@ovffalse
+ \c@@cnta#1\relax
+ \@tfor\reserved@a:=#5\do{\csname @ov\reserved@a true\endcsname}%
+ \if@ovf\@ovttrue \divide\c@@cnta\tw@\fi
+ \if@ovt
+ \if@ovr
+ \@circle@rt[\c@@cnta](#2,#3){#4}
+ \else\if@ovl
+ \@circle@lt[\c@@cnta](#2,#3){#4}
+ \else\divide\c@@cnta\tw@
+ \@circle@rt[\c@@cnta](#2,#3){#4}
+ \@circle@lt[\c@@cnta](#2,#3){#4}
+ \fi\fi
+ \if@ovf
+ \@circle@rb[\c@@cnta](#2,#3){#4}
+ \@circle@lb[\c@@cnta](#2,#3){#4}
+ \fi
+ \else\if@ovb
+ \if@ovr
+ \@circle@rb[\c@@cnta](#2,#3){#4}
+ \else\if@ovl
+ \@circle@lb[\c@@cnta](#2,#3){#4}
+ \else\divide\c@@cnta\tw@
+ \@circle@rb[\c@@cnta](#2,#3){#4}
+ \@circle@lb[\c@@cnta](#2,#3){#4}
+ \fi\fi
+ \else
+ \divide\c@@cnta\tw@
+ \if@ovr
+ \@circle@rb[\c@@cnta](#2,#3){#4}
+ \@circle@rt[\c@@cnta](#2,#3){#4}
+ \else
+ \if@ovl
+ \@circle@lb[\c@@cnta](#2,#3){#4}
+ \@circle@lt[\c@@cnta](#2,#3){#4}
+ \else
+ \PackageError{Ebezier}{Missing or illegal position specifier in cCircle}
+ \fi\fi\fi\fi}
+%%
+\def\cArc{\@ifnextchar [{\@cArc}{\@cArc[0]}}
+\def\@cArc[#1](#2,#3)(#4,#5){%
+ \c@@cntc#1\relax
+ \@X #2\unitlength \@Y #3\unitlength
+ \@Za #4\unitlength \@Zb #5\unitlength
+ \@Zc 2\@X \advance\@Zc-\@Za \@Zd 2\@Y \advance\@Zd-\@Zb
+ \@Xa\@Y \advance\@Xa-\@Zb \@Ya\@Za \advance\@Ya-\@X
+ \multiply\@Xa 4 \divide\@Xa\thr@@ \multiply\@Ya 4 \divide\@Ya\thr@@
+ \@Ze\@Za \advance\@Ze\@Xa \@Zf\@Zb \advance\@Zf\@Ya
+ \@Zg\@Zc \advance\@Zg\@Xa \@Zh\@Zd \advance\@Zh\@Ya
+ \l@cbezier[#1](\@Za,\@Zb)(\@Ze,\@Zf)(\@Zg,\@Zh)(\@Zc,\@Zd)}
+%%
+\def\LenMult#1#2#3{\setlength{#3}{#1*\ratio{#2}{\unitlength}}}
+%%
+\def\LenDiv#1#2#3{\setlength{#3}{\unitlength*\ratio{#1}{#2}}}
+%%
+\def\AbsLen#1{\ifdim#1<\z@\setlength{#1}{-#1}\fi}
+%%
+\def\LenSqrt#1#2{%
+ \setlength{\@Za}{#1}%
+ \ifdim\@Za>\eps\loop\setlength{\@Zb}{(\@Za+\unitlength*\ratio{#1}{\@Za})/2}%
+ \setlength{\@Zc}{\@Za-\@Zb}\AbsLen{\@Zc}%
+ \ifdim\@Zc>\eps\setlength{\@Za}{\@Zb}\repeat\fi%
+ \setlength{#2}{\@Za}}
+%%
+\def\Length(#1,#2)(#3,#4)#5{%
+ \setlength{\@Zd}{#3\unitlength-#1\unitlength}%
+ \setlength{\@Ze}{#4\unitlength-#2\unitlength}%
+ \setcounter{@cntd}{1}%
+ \setlength{\@Zf}{\@Zd}\ifdim\@Ze>\@Zd\setlength{\@Zf}{\@Ze}\fi
+ \loop\setlength{\@Zd}{\@Zd/2}\setlength{\@Ze}{\@Ze/2}\setlength{\@Zf}{\@Zf/2}%
+ \multiply\c@@cntd\tw@\ifdim\@Zf>\x@ pt\repeat
+ \LenMult{\@Zd}{\@Zd}{\@Zg}\LenMult{\@Ze}{\@Ze}{\@Zh}\setlength{\@Zf}{\@Zg+\@Zh}%
+ \LenSqrt{\@Zf}{\@Zg}\setlength{#5}{\@Zg*\value{@cntd}}}
+%%
+\def\LenNorm#1#2#3{%
+ \setlength{\@Zd}{#1}\setlength{\@Ze}{#2}\setcounter{@cntd}{1}%
+ \setlength{\@Zf}{\@Zd}\ifdim\@Ze>\@Zd\setlength{\@Zf}{\@Ze}\fi
+ \loop\setlength{\@Zd}{\@Zd/2}\setlength{\@Ze}{\@Ze/2}\setlength{\@Zf}{\@Zf/2}%
+ \multiply\c@@cntd\tw@\ifdim\@Zf>\x@ pt\repeat
+ \LenMult{\@Zd}{\@Zd}{\@Zg}\LenMult{\@Ze}{\@Ze}{\@Zh}\setlength{\@Zf}{\@Zg+\@Zh}%
+ \LenSqrt{\@Zf}{\@Zg}\setlength{#3}{\@Zg*\value{@cntd}}}
+%%
+\def\PathLengthQ[#1](#2,#3)(#4,#5)(#6,#7){%
+ \PathLength\z@\c@@cntc#1\relax
+ \ifnum \c@@cntc<\@ne \c@@cntc\pathmax\relax\fi
+ \ifnum \c@@cntc>\pathmax \c@@cntc\pathmax\relax
+ \PackageWarning{ebezier}{Counter reset to pathmax=\pathmax!}\fi
+ \@Za\z@ \@Zb\z@ \c@@cntb\c@@cntc\relax \advance\c@@cntb\@ne
+ \@Xb #4\unitlength \advance\@Xb-#2\unitlength \multiply\@Xb\tw@
+ \@Yb #5\unitlength \advance\@Yb-#3\unitlength \multiply\@Yb\tw@
+ \@Xa #6\unitlength \advance\@Xa-#2\unitlength
+ \advance\@Xa-\@Xb \divide\@Xa\c@@cntc
+ \@Ya #7\unitlength \advance\@Ya-#3\unitlength
+ \advance\@Ya-\@Yb \divide\@Ya\c@@cntc \c@@cnta\@ne\relax
+ \@whilenum{\c@@cnta<\c@@cntb}\do
+ {\@X\c@@cnta\@Xa \advance\@X\@Xb \divide\@X\c@@cntc \multiply\@X\c@@cnta
+ \@Y\c@@cnta\@Ya \advance\@Y\@Yb \divide\@Y\c@@cntc \multiply\@Y\c@@cnta
+ \@Zi\@X\@Zj\@Y
+ \advance\@X-\@Za \advance\@Y-\@Zb \LenNorm{\@X}{\@Y}{\@Z}%
+ \advance\PathLength\@Z
+ \@Za\@Zi\@Zb\@Zj \advance\c@@cnta\@ne}}
+%%
+\def\PathLengthC[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){%
+ \PathLength\z@ \c@@cntc#1\relax
+ \ifnum \c@@cntc<\@ne \c@@cntc\pathmax\relax\fi
+ \ifnum \c@@cntc>\pathmax \c@@cntc\pathmax\relax
+ \PackageWarning{ebezier}{Counter reset to pathmax=\pathmax!}\fi
+ \@Za\z@ \@Zb\z@ \c@@cnta\c@@cntc\relax \advance\c@@cnta\@ne
+ \@Xa #4\unitlength \advance\@Xa-#2\unitlength \multiply\@Xa\thr@@
+ \@Xb #6\unitlength \advance\@Xb-#2\unitlength \multiply\@Xb\thr@@
+ \advance\@Xb-2\@Xa
+ \@Xc #8\unitlength \advance\@Xc-#2\unitlength
+ \advance\@Xc-\@Xa \advance\@Xc-\@Xb
+ \@Ya #5\unitlength \advance\@Ya-#3\unitlength \multiply\@Ya\thr@@
+ \@Yb #7\unitlength \advance\@Yb-#3\unitlength \multiply\@Yb\thr@@
+ \advance\@Yb-2\@Ya
+ \@Yc #9\unitlength \advance\@Yc-#3\unitlength
+ \advance\@Yc-\@Ya \advance\@Yc-\@Yb
+ \divide\@Xc\c@@cntc \divide\@Yc\c@@cntc
+ \c@@cntb\@ne\relax
+ \@whilenum{\c@@cntb<\c@@cnta}\do
+ {\@X\c@@cntb\@Xc \@Y\c@@cntb\@Yc \advance\@X\@Xb \advance\@Y\@Yb
+ \divide\@X\c@@cntc \divide\@Y\c@@cntc
+ \multiply\@X\c@@cntb \multiply\@Y\c@@cntb
+ \advance\@X\@Xa \advance\@Y\@Ya
+ \divide\@X\c@@cntc \divide\@Y\c@@cntc
+ \multiply\@X\c@@cntb \multiply\@Y\c@@cntb
+ \@Zi\@X\@Zj\@Y
+ \advance\@X-\@Za \advance\@Y-\@Zb \LenNorm{\@X}{\@Y}{\@Z}%
+ \advance\PathLength\@Z
+ \@Za\@Zi\@Zb\@Zj\advance\c@@cntb\@ne}}
+%%
+\def\cArcs{\@ifnextchar [{\@cArcs}{\@cArcs[0]}}
+\def\@cArcs[#1](#2,#3)(#4,#5)(#6,#7){%
+ \c@@cntc#1\relax
+ \@ovffalse
+ \@X#2\unitlength\@Y#3\unitlength
+ \@Zi#6\unitlength\@Zj#7\unitlength
+ \setlength{\@Xa}{\@X-\@Zi}\setlength{\@Ya}{\@Y-\@Zj}%
+ \LenNorm{\@Xa}{\@Ya}{\@Xb}%
+ \@Xa#4\unitlength \advance\@Xa\@Zi \advance\@Xa-2\@X
+ \@Ya#5\unitlength \advance\@Ya\@Zj \advance\@Ya-2\@Y
+ \@Xc\@Xa\AbsLen{\@Xc}\@Yc\@Ya\AbsLen{\@Yc}%
+ \ifdim\@Xc<\eps\ifdim\@Yc<\eps\@ovftrue\fi\fi
+ \if@ovf
+ \cArc[#1](#2,#3)(#4,#5)%
+ \else
+ \LenNorm{\@Xa}{\@Ya}{\@Yb}%
+ \setlength{\@Xc}{\unitlength*\ratio{\@Xb}{\@Yb}}%
+ \setlength{\@Yc}{(-\unitlength+\@Xc*2)*4/3}%
+ \@Xb-#5\unitlength \advance\@Xb\@Zj
+ \@Z\@Xb\AbsLen{\@Z}%
+ \ifdim\@Z<100\eps \@Xb#4\unitlength \advance\@Xb-\@Zi \@Xa\@Ya\fi
+ \setlength{\@Z}{\@Yc*\ratio{\@Xa}{\@Xb}}%
+ \@Xa#4\unitlength\@Ya#5\unitlength
+ \setlength{\@Za}{\@Y-\@Ya}\setlength{\@Zb}{\@Xa-\@X}%
+ \setlength{\@Zc}{\@Zj-\@Y}\setlength{\@Zd}{\@X-\@Zi}%
+ \@Xb\@Xa \LenMult{\@Z}{\@Za}{\@Zh}\advance\@Xb\@Zh
+ \@Yb\@Ya\LenMult{\@Z}{\@Zb}{\@Zh}\advance\@Yb\@Zh
+ \@Xc\@Zi\LenMult{\@Z}{\@Zc}{\@Zh}\advance\@Xc\@Zh
+ \@Yc\@Zj\LenMult{\@Z}{\@Zd}{\@Zh}\advance\@Yc\@Zh
+ \@Z\@Xa\@Za\@Ya\@Zb\@Xb\@Zc\@Yb\@Zd\@Xc\@Ze\@Yc
+ \l@cbezier[#1](\@Z,\@Za)(\@Zb,\@Zc)(\@Zd,\@Ze)(\@Zi,\@Zj)%
+ \fi}
+\endinput
+%%
+%% End of file `ebezier.sty'.