texlive[55609] Master/texmf-dist: pict2e (20jun20)

commits+karl at tug.org commits+karl at tug.org
Sat Jun 20 22:41:42 CEST 2020


Revision: 55609
          http://tug.org/svn/texlive?view=revision&revision=55609
Author:   karl
Date:     2020-06-20 22:41:42 +0200 (Sat, 20 Jun 2020)
Log Message:
-----------
pict2e (20jun20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/pict2e/README.md
    trunk/Master/texmf-dist/doc/latex/pict2e/p2e-drivers.pdf
    trunk/Master/texmf-dist/doc/latex/pict2e/pict2e.pdf
    trunk/Master/texmf-dist/source/latex/pict2e/pict2e.dtx
    trunk/Master/texmf-dist/tex/latex/pict2e/pict2e.sty

Modified: trunk/Master/texmf-dist/doc/latex/pict2e/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pict2e/README.md	2020-06-20 20:41:10 UTC (rev 55608)
+++ trunk/Master/texmf-dist/doc/latex/pict2e/README.md	2020-06-20 20:41:42 UTC (rev 55609)
@@ -36,8 +36,5 @@
    pict2e.cfg:                   tex/latex/[TEXDIST]/graphics.cfg
 ```
 
-For general installation advice, see
-http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages
-
 For bug reports use the GitHub repository: https://github.com/rolfn/pict2e/issues
 

Modified: trunk/Master/texmf-dist/doc/latex/pict2e/p2e-drivers.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pict2e/pict2e.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/pict2e/pict2e.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pict2e/pict2e.dtx	2020-06-20 20:41:10 UTC (rev 55608)
+++ trunk/Master/texmf-dist/source/latex/pict2e/pict2e.dtx	2020-06-20 20:41:42 UTC (rev 55609)
@@ -23,7 +23,7 @@
 %
 %<*package>
 \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)]
 %</package>
 %
 %<*driver>
@@ -63,9 +63,9 @@
 % \fi
 %
 % \GetFileInfo{pict2e.sty}
-% \def\docdate{2020/06/13}
+% \def\docdate{2020/06/20}
 %
-% \CheckSum{2157}
+% \CheckSum{2206}
 %
 % ^^A ========
 %
@@ -188,6 +188,8 @@
 % \changes{v0.2z}{2014/01/12}{Conflict wit epic, eepic solved. (JT)}
 % \changes{v0.3a}{2016/01/09}{Local line types, documentation fixes. (JT)}
 % \changes{v0.3d}{2020/06/13}{\cmd{\@sline} renamed \cmd{\pIIe at sline} (RN)}
+% \changes{v0.3e}{2020/06/20}{Added \cmd{\Vector}, \cmd{\polyvector}
+%   suggested by FMi (RN)}
 % \fi
 %
 % \changes{v0.1a}{2003/07/18}{First version. (RN)}
@@ -1284,26 +1286,32 @@
 % An equivalent \cmd{\pIIearc} to \cmd{\arc} is defined to solve possible
 % conflicts with other packages.
 %
-% \subsubsection{Lines, polygons}
+% \subsubsection{Line, Vector, polyline, polyvector, and polygon}
 % \label{sec:usage:lines+polygons}
 %
 % \DescribeMacro\Line
 % \DescribeMacro\polyline
+% \DescribeMacro\Vector
+% \DescribeMacro\polyvector
 % \DescribeMacro\polygon
 % \DescribeMacro{\polygon*}
 %  |\Line|\parg{X1,Y1}\parg{X2,Y2}\\
 %  |\polyline|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
+%  |\Vector|\parg{X1,Y1}\parg{X2,Y2}\\
+%  |\polyvector|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
 %  |\polygon|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
 %  |\polygon*|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
 % A natural way how to describe a line segment is to give the coordinates of
-% the endpoints. The syntax of the \cmd{\line} is different because
+% the endpoints. The syntax of the \cmd{\line}/\cmd{\vector} is different
+% because
 % the lines in the standard \texttt{picture} environment are made from small
 % line segments of a limited number of slopes given in a font. However, this
 % package changes the \cmd{\line} command computing the coordinates of the
 % endpoints and using an internal macro for drawing a line segment with given
 % endpoints. Hence it would be crazy do not use this possibility directly.
-% This is done by the command \cmd{\Line}. The command \cmd{\polyline} draws a
-% stroken line connecting points with given coordinates. The command
+% This is done by the commands \cmd{\Line} and \cmd{\Vector}. The commands
+% \cmd{\polyline} and \cmd{\polyvector} draws a
+% stroken line/vector connecting points with given coordinates. The command
 % \cmd{\polygon} draws a polygon with given vertices, the star variant gives
 % filled polygon. At least two points should be given.
 %
@@ -2203,7 +2211,7 @@
 % \]
 % and $t = x/s$  and  $\tau = 2(t-1/2)$.
 % \end{quote}
-% \changes{v0.2r}{2005/07/15}{Two wrong global assignment changed. (RN)}
+% \changes{v0.2r}{2005/07/15}{Two wrong global assignments changed. (RN)}
 %    \begin{macrocode}
   \newcommand*\pIIe at pyth[3]{%
     \begingroup
@@ -2499,11 +2507,13 @@
       \pIIe at divide{\@tempdimb}\dimen@\@ydim
       \pIIe at divide{\@tempdima}\dimen@\@xdim
 %    \end{macrocode}
-% Rotate the following vector\slash arrow outlines by angle $\theta$.
+% Rotate the following vector\slash arrow outlines by angle $\theta$:\par
+% \BigIndent
+% $\cos{\theta}$\quad$\sin{\theta}$\quad$-\sin{\theta}$\quad$\cos{\theta}$\quad $0\quad 0$ 
 %    \begin{macrocode}
       \pIIe at concat\@xdim\@ydim{-\@ydim}\@xdim\z@\z@
 %    \end{macrocode}
-% Internal command to draw the outline of the vector\slash arrow.
+% Internal command to draw the outline of the vector\slash arrow. 
 %    \begin{macrocode}
       \pIIe at vector
       \pIIe at fillGraph
@@ -3196,15 +3206,14 @@
 % We abuse \cmd{\@setfpsbit} from the float processing modules of the
 % kernel.
 % ^^A (Should this go to section low-level?)
-% \begin{macrocode}
+%    \begin{macrocode}
   \newcommand*\pIIe at get@quadrants[1]{%
     \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@tempcnta\z@
     \@tfor\reserved at a:=#1\do{\csname @ov\reserved at a false\endcsname}%
     \if at ovr \if at ovb\@setfpsbit2\fi \if at ovt\@setfpsbit4\fi \fi
     \if at ovl \if at ovb\@setfpsbit1\fi \if at ovt\@setfpsbit8\fi \fi}
-% \end{macrocode}
+%    \end{macrocode}
 % \end{macro}
-%
 % \subsubsection{Quadratic Bezier Curve}
 % \label{sec:implementation:bezier-curves}
 %
@@ -3259,7 +3268,6 @@
     \fi}
 %    \end{macrocode}
 % \end{macro}
-%
 % \begin{macro}{\pIIe at bezier@QtoC}
 % \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
 % Ancillary macro; saves us some tokens above.
@@ -3271,10 +3279,10 @@
 % \noindent
 % (Missing: Reference for mathematical formula. Or is this trivial?)
 %    \begin{macrocode}
-    \newcommand*\pIIe at bezier@QtoC[3]{%
-      \@tempdimc#1\relax      \advance\@tempdimc-#2\relax
-      \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
-      #3\@tempdimc}
+  \newcommand*\pIIe at bezier@QtoC[3]{%
+    \@tempdimc#1\relax      \advance\@tempdimc-#2\relax
+    \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
+    #3\@tempdimc}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -3404,13 +3412,17 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsubsection{Lines and polygons}
-% \label{sec:implementation:lines-polygons}
+% \subsubsection{Line, Vector, polyline, polyvector, and polygon}
+% \label{sec:implementation:polyline-polyvector}
 %
+% \changes{v0.3e}{2020/06/20}{Added \cmd{\Vector} and \cmd{\polyvector}
+%   suggested by FMi. (RN)}
 % \begin{macro}{\Line}
 % \begin{macro}{\polyline}
+% \begin{macro}{\Vector}
+% \begin{macro}{\polyvector}
 % \begin{macro}{\polygon}
-% We use recursive macros for \cmd{\polyline} and \cmd{\polygon}.
+% We use recursive macros for \cmd{\polyline}, \cmd{\polyvector}, and \cmd{\polygon}.
 %    \begin{macrocode}
   \let\lp at r( \let\rp at r)
   \def\Line(#1,#2)(#3,#4){\polyline(#1,#2)(#3,#4)}
@@ -3423,6 +3435,33 @@
   \def\@polyline(#1,#2){%
     \pIIe at lineto{#1\unitlength}{#2\unitlength}%
     \@ifnextchar\lp at r{\@polyline}{\pIIe at strokeGraph\ignorespaces}}
+  \def\Vector(#1,#2)(#3,#4){\polyvector(#1,#2)(#3,#4)}
+  \def\polyvector(#1,#2){%
+    \@killglue
+    \@ifnextchar\lp at r{\begingroup\@polyvector(#1,#2)}{%
+      \PackageWarning{pict2e}%
+      {Polygonal vectors require at least two vertices!}\ignorespaces}}
+  \def\@polyvector(#1,#2)(#3,#4){%
+%    \end{macrocode}
+% See the similar definition for \cmd{\vector} (\ref{sec:implementation:vector})
+%    \begin{macrocode}
+    \@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 at pyth\@tempdima\@tempdimb\@linelen
+      \fi
+    \fi
+    \ifdim\@linelen<\z@ \@linelen-\@linelen\fi
+    \pIIe at divide{\@tempdima}\@linelen\@ovxx
+    \pIIe at divide{\@tempdimb}\@linelen\@ovyy
+%    \end{macrocode}
+% Note the shift to the previous point in addition to the rotation.
+%    \begin{macrocode}
+    \pIIe at concat\@ovxx\@ovyy{-\@ovyy}\@ovxx\@xdim\@ydim
+    \pIIe at vector \pIIe at fillGraph 
+    \@ifnextchar\lp at r{\@polyvector(#3,#4)}{\endgroup\ignorespaces}}
   \def\polygon{%
     \@killglue
     \@ifstar{\begingroup\@tempswatrue\@polygon}%
@@ -3441,6 +3480,8 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
+% \end{macro}
 %
 % \subsubsection{Path commands}
 % \label{sec:implementation:path-commands}

Modified: trunk/Master/texmf-dist/tex/latex/pict2e/pict2e.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pict2e/pict2e.sty	2020-06-20 20:41:10 UTC (rev 55608)
+++ trunk/Master/texmf-dist/tex/latex/pict2e/pict2e.sty	2020-06-20 20:41:42 UTC (rev 55609)
@@ -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 at codes{%
  \catcode`\noexpand\^^A\the\catcode`\^^A\relax
  \catcode`\noexpand\"\the\catcode`\"\relax
@@ -589,10 +589,10 @@
     \else
       \pIIe at old@bezier{#1}(#2,#3)(#4,#5)(#6,#7)
     \fi}
-    \newcommand*\pIIe at bezier@QtoC[3]{%
-      \@tempdimc#1\relax      \advance\@tempdimc-#2\relax
-      \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
-      #3\@tempdimc}
+  \newcommand*\pIIe at 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 at lineto{#1\unitlength}{#2\unitlength}%
     \@ifnextchar\lp at r{\@polyline}{\pIIe at strokeGraph\ignorespaces}}
+  \def\Vector(#1,#2)(#3,#4){\polyvector(#1,#2)(#3,#4)}
+  \def\polyvector(#1,#2){%
+    \@killglue
+    \@ifnextchar\lp at 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 at pyth\@tempdima\@tempdimb\@linelen
+      \fi
+    \fi
+    \ifdim\@linelen<\z@ \@linelen-\@linelen\fi
+    \pIIe at divide{\@tempdima}\@linelen\@ovxx
+    \pIIe at divide{\@tempdimb}\@linelen\@ovyy
+    \pIIe at concat\@ovxx\@ovyy{-\@ovyy}\@ovxx\@xdim\@ydim
+    \pIIe at vector \pIIe at fillGraph
+    \@ifnextchar\lp at r{\@polyvector(#3,#4)}{\endgroup\ignorespaces}}
   \def\polygon{%
     \@killglue
     \@ifstar{\begingroup\@tempswatrue\@polygon}%



More information about the tex-live-commits mailing list.