summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pict2e/pict2e.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/pict2e/pict2e.sty')
-rw-r--r--Master/texmf-dist/tex/latex/pict2e/pict2e.sty31
1 files changed, 26 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/pict2e/pict2e.sty b/Master/texmf-dist/tex/latex/pict2e/pict2e.sty
index 48d6e7482e6..63e27730da3 100644
--- a/Master/texmf-dist/tex/latex/pict2e/pict2e.sty
+++ b/Master/texmf-dist/tex/latex/pict2e/pict2e.sty
@@ -24,7 +24,7 @@
%% This work consists of all files listed in `manifest.txt'.
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{pict2e}[2020/06/13 v0.3d Improved picture commands (HjG,RN,JT)]
+\ProvidesPackage{pict2e}[2020/06/20 v0.3e Improved picture commands (HjG,RN,JT)]
\edef\Gin@codes{%
\catcode`\noexpand\^^A\the\catcode`\^^A\relax
\catcode`\noexpand\"\the\catcode`\"\relax
@@ -589,10 +589,10 @@
\else
\pIIe@old@bezier{#1}(#2,#3)(#4,#5)(#6,#7)
\fi}
- \newcommand*\pIIe@bezier@QtoC[3]{%
- \@tempdimc#1\relax \advance\@tempdimc-#2\relax
- \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
- #3\@tempdimc}
+ \newcommand*\pIIe@bezier@QtoC[3]{%
+ \@tempdimc#1\relax \advance\@tempdimc-#2\relax
+ \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
+ #3\@tempdimc}
\ifx\undefined\@arclen \newdimen\@arclen \fi
\ifx\undefined\@arcrad \newdimen\@arcrad \fi
\ifx\undefined\@tempdimd \newdimen\@tempdimd \fi
@@ -676,6 +676,27 @@
\def\@polyline(#1,#2){%
\pIIe@lineto{#1\unitlength}{#2\unitlength}%
\@ifnextchar\lp@r{\@polyline}{\pIIe@strokeGraph\ignorespaces}}
+ \def\Vector(#1,#2)(#3,#4){\polyvector(#1,#2)(#3,#4)}
+ \def\polyvector(#1,#2){%
+ \@killglue
+ \@ifnextchar\lp@r{\begingroup\@polyvector(#1,#2)}{%
+ \PackageWarning{pict2e}%
+ {Polygonal vectors require at least two vertices!}\ignorespaces}}
+ \def\@polyvector(#1,#2)(#3,#4){%
+ \@xdim#1\unitlength \@tempdima=#3\unitlength
+ \@ydim#2\unitlength \@tempdimb=#4\unitlength
+ \advance\@tempdima-\@xdim \advance\@tempdimb-\@ydim
+ \ifdim\@tempdima=\z@ \@linelen\@tempdimb \else
+ \ifdim\@tempdimb=\z@ \@linelen\@tempdima \else
+ \pIIe@pyth\@tempdima\@tempdimb\@linelen
+ \fi
+ \fi
+ \ifdim\@linelen<\z@ \@linelen-\@linelen\fi
+ \pIIe@divide{\@tempdima}\@linelen\@ovxx
+ \pIIe@divide{\@tempdimb}\@linelen\@ovyy
+ \pIIe@concat\@ovxx\@ovyy{-\@ovyy}\@ovxx\@xdim\@ydim
+ \pIIe@vector \pIIe@fillGraph
+ \@ifnextchar\lp@r{\@polyvector(#3,#4)}{\endgroup\ignorespaces}}
\def\polygon{%
\@killglue
\@ifstar{\begingroup\@tempswatrue\@polygon}%