summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pict2e
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-06-20 20:41:42 +0000
committerKarl Berry <karl@freefriends.org>2020-06-20 20:41:42 +0000
commit9c0288d8e2834239788bddff9ff1cd341f382643 (patch)
treef64d19c87da15c9954b0faa19aa9ea1ee63ca9c3 /Master/texmf-dist/tex/latex/pict2e
parent1b12ecaff6cafe084e874415ac8aff0ccc07fb95 (diff)
pict2e (20jun20)
git-svn-id: svn://tug.org/texlive/trunk@55609 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pict2e')
-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}%