diff options
author | Karl Berry <karl@freefriends.org> | 2020-06-14 22:18:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-06-14 22:18:35 +0000 |
commit | 70471008188a9958254fb3a466cbc1248d33f929 (patch) | |
tree | bc30f4a832bf8cd5ebcd48e218f6941d78747e92 | |
parent | 3cc75a75fe8966b95123fd66dbd8db584ad74151 (diff) |
pict2e (15jun20)
git-svn-id: svn://tug.org/texlive/trunk@55550 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/pict2e/p2e-drivers.pdf | bin | 216023 -> 216020 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/pict2e/pict2e.pdf | bin | 577516 -> 887097 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/pict2e/pict2e.dtx | 192 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pict2e/pict2e.sty | 84 |
4 files changed, 129 insertions, 147 deletions
diff --git a/Master/texmf-dist/doc/latex/pict2e/p2e-drivers.pdf b/Master/texmf-dist/doc/latex/pict2e/p2e-drivers.pdf Binary files differindex 1b8add2b0ec..fe1a1c89afd 100644 --- a/Master/texmf-dist/doc/latex/pict2e/p2e-drivers.pdf +++ b/Master/texmf-dist/doc/latex/pict2e/p2e-drivers.pdf diff --git a/Master/texmf-dist/doc/latex/pict2e/pict2e.pdf b/Master/texmf-dist/doc/latex/pict2e/pict2e.pdf Binary files differindex df33032e04b..bcc86e4850b 100644 --- a/Master/texmf-dist/doc/latex/pict2e/pict2e.pdf +++ b/Master/texmf-dist/doc/latex/pict2e/pict2e.pdf diff --git a/Master/texmf-dist/source/latex/pict2e/pict2e.dtx b/Master/texmf-dist/source/latex/pict2e/pict2e.dtx index 9c4baa4f3f8..9c2b986cc24 100644 --- a/Master/texmf-dist/source/latex/pict2e/pict2e.dtx +++ b/Master/texmf-dist/source/latex/pict2e/pict2e.dtx @@ -2,7 +2,7 @@ % % % -% Copyright (C) 2003-2016 +% Copyright (C) 2003-2020 % Rolf Niepraschk, Rolf.Niepraschk@gmx.de % Hubert Gaesslein, hubertjg@gmx.de % Josef Tkadlec, j.tkadlec@email.cz @@ -23,12 +23,12 @@ % %<*package> \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{pict2e}[2019/08/20 v0.3c Improved picture commands (HjG,RN,JT)] +\ProvidesPackage{pict2e}[2020/06/13 v0.3d Improved picture commands (HjG,RN,JT)] %</package> % %<*driver> \listfiles -\errorcontextlines5 +\setcounter{errorcontextlines}{5} \documentclass{ltxdoc} \usepackage{pict2e} % [pstarrows] %%\usepackage[debug]{pict2e} @@ -37,13 +37,16 @@ \usepackage{color} \usepackage{graphicx} \usepackage{array} -%%\usepackage{pstcol} +\usepackage[T1]{fontenc} +\usepackage{lmodern} \usepackage{longtable} \IfFileExists{geometry.sty}{% \usepackage[left=\marginparwidth,textwidth=1.15\textwidth,% top=20mm,bottom=30mm]{geometry}}{} \IfFileExists{url.sty}{\usepackage{url}} {\newcommand*\url[1]{\texttt{#1}}} +\usepackage{hypdoc} + %\OnlyDescription \AlsoImplementation \EnableCrossrefs @@ -60,9 +63,9 @@ % \fi % % \GetFileInfo{pict2e.sty} -% \def\docdate{2016/01/09} +% \def\docdate{2020/06/13} % -% \CheckSum{2158} +% \CheckSum{2157} % % ^^A ======== % @@ -184,6 +187,7 @@ % \changes{v0.2y}{2011/04/05}{Support for dvipdfmx. (JT)} % \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@sline} (RN)} % \fi % % \changes{v0.1a}{2003/07/18}{First version. (RN)} @@ -1594,39 +1598,44 @@ } % \end{macrocode} % \end{macro} -% Arrow shape options. -% The values for \LaTeX-style arrows are ``hand optimized''; -% they should be regarded as experimental, -% i.e., they may change in future versions of this package. -% The values for \PSTricks-style arrows are the default ones used by -% that bundle. -% If the \textsf{pstricks} package is actually loaded, then -% \textsf{pict2e} will obey the current values of the corresponding -% internal \PSTricks\ parameters; -% this feature should be regarded as experimental, -% i.e., it may change in future versions of this package. +% \begin{macro}{\pIIe@FAL} +% \begin{macro}{\pIIe@FAW} +% \begin{macro}{\pIIe@CAW} +% \begin{macro}{\pIIe@FAI} +% Some macros to parametrize the shape of the vector outline. +% The following values are “hand optimized” with the aim of emulating +% \LaTeX-style arrows. They also seem suitable for our \PSTricks-style arrows. +% See Figures~\ref{fig:vector:ltx} and~\ref{fig:vector:pst}. +% \changes{v0.1x}{2003/11/27}{Introduce ``inset''. (RN,HjG)} % \begin{macrocode} -\DeclareOption{ltxarrows}{\AtEndOfPackage{% +\newcommand*\pIIe@FAL{1.52}% +\newcommand*\pIIe@FAW{3.2}% +\newcommand*\pIIe@CAW{1.5pt}% +\newcommand*\pIIe@FAI{0.25}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\ltxarrows} +% \begin{macro}{\pstarrows} +% The following user-level macros can be used to change the arrow style +% (\LaTeX-style is the default). +% \changes{v0.3d}{2020/06/13}{New user-level macros \cmd{\ltxarrows} +% and \cmd{\pstarrows}. (RN)} +% \begin{macrocode} +\newcommand*\ltxarrows{% \let\pIIe@vector=\pIIe@vector@ltx - \def\pIIe@FAL{1.52}% - \def\pIIe@FAW{3.2}% - \def\pIIe@CAW{1.5pt}% - \def\pIIe@FAI{0.25}% - }} -\DeclareOption{pstarrows}{\AtEndOfPackage{% +} +\newcommand*\pstarrows{% \let\pIIe@vector=\pIIe@vector@pst - \iffalse - \def\pIIe@FAL{1.4}% - \def\pIIe@FAW{2}% - \def\pIIe@CAW{1.5pt}% - \def\pIIe@FAI{0.4}% - \else % These are the ltxarrows values, which looks better. (RN) - \def\pIIe@FAL{1.52}% - \def\pIIe@FAW{3.2}% - \def\pIIe@CAW{1.5pt}% - \def\pIIe@FAI{0.25}% - \fi - }} +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macrocode} +\DeclareOption{ltxarrows}{\AtEndOfPackage{\ltxarrows}} +\DeclareOption{pstarrows}{\AtEndOfPackage{\pstarrows}} % \end{macrocode} % % \begin{macro}{\pIIe@debug@comment} @@ -2392,41 +2401,61 @@ % \changes{v0.2t}{2008/05/11}{All lines by \cmd{\@sline} (JT)} % \begin{macrocode} \def\line(#1,#2)#3{% + \begingroup \pIIe@checkslopeargsline{#1}{#2}% \@tempdima=#1pt\relax \@tempdimb=#2pt\relax \@linelen #3\unitlength - \ifdim\@linelen<\z@ \@badlinearg \else \@sline \fi} + \ifdim\@linelen<\z@ \@badlinearg \else + \pIIe@sline + \pIIe@moveto\z@\z@ + \pIIe@lineto\@xdim\@ydim + \pIIe@strokeGraph +% \end{macrocode} +% Simulated bounding box +% \begin{macrocode} + \box\@tempboxa + \fi + \endgroup} % \end{macrocode} % \end{macro} -% -% \begin{macro}{\@sline} -% (The implementation here is different from \cmd{\vector}!) +% \begin{macro}{\pIIe@sline} +% Common code for \cmd{\line} and \cmd{\vector}. +% \changes{v0.3d}{2020/06/13}{Simulated bounding boxes for \cmd{\line} +% and \cmd{\vector} suggested by Donald Arseneau (RN)} +% \begin{macrocode} + \newcommand*\pIIe@sline{% +% \end{macrocode} +% Calculation of the endpoints \cmd{\@xdim}, \cmd{\@ydim} +% (used for \cmd{\line} only). % \begin{macrocode} - \def\@sline{% - \begingroup \ifdim\@tempdima=\z@ \ifdim\@tempdimb<\z@\@linelen-\@linelen\fi \@ydim=\@linelen \@xdim=\z@ \else + \ifdim\@tempdima<\z@\@linelen-\@linelen\fi \ifdim\@tempdimb=\z@ - \ifdim\@tempdima<\z@\@linelen-\@linelen\fi \@xdim=\@linelen \@ydim=\z@ \else - \ifnum\@tempdima<\z@\@linelen-\@linelen\fi \pIIe@divide\@tempdimb\@tempdima\dimen@ \@ydim=\strip@pt\dimen@\@linelen \@xdim=\@linelen \fi \fi - \pIIe@moveto\z@\z@ - \pIIe@lineto\@xdim\@ydim - \pIIe@strokeGraph - \endgroup} +% \end{macrocode} +% Prepare a box that can be used as a bounding box for \cmd{\line} and +% \cmd{\vector} to achieve the same behavior as standard \LaTeX\ outside +% of a picture environment. +% \begin{macrocode} + \@ovxx=\ifnum\@xdim=\z@ \z@\else\@linelen\fi + \@ovyy=\ifnum\@ydim<\z@ \z@\else\@ydim\fi + \@ovdy=\ifnum\@ydim<\z@ -\@ydim\else\z@\fi + \setbox\@tempboxa\hbox{% + \vrule\@height \@ovyy \@depth \@ovdy \@width \z@ + \vrule\@height \z@ \@depth \z@ \@width \@ovxx}} % \end{macrocode} % \end{macro} -% % \subsubsection{Vector} % \label{sec:implementation:vector} % @@ -2450,10 +2479,11 @@ \@tempdima=#1pt\relax \@tempdimb=#2pt\relax \@linelen#3\unitlength \ifdim\@linelen<\z@ \@badlinearg \else + \pIIe@sline + \@linelen#3\unitlength \pIIe@pyth{\@tempdima}{\@tempdimb}\dimen@ - \ifdim\@tempdima=\z@ - \else\ifdim\@tempdimb=\z@ - \else + \ifdim\@tempdima=\z@ \else + \ifdim\@tempdimb=\z@ \else % \end{macrocode} % This calculation is only necessary, if the vector is actually % sloped. @@ -2477,6 +2507,10 @@ % \begin{macrocode} \pIIe@vector \pIIe@fillGraph +% \end{macrocode} +% Simulated bounding box +% \begin{macrocode} + \box\@tempboxa \fi \endgroup} % \end{macrocode} @@ -2492,51 +2526,6 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\pIIe@FAL} -% \begin{macro}{\pIIe@FAW} -% \begin{macro}{\pIIe@CAW} -% \begin{macro}{\pIIe@FAI} -% \changes{v0.1x}{2003/11/27}{Introduce ``inset''. (RN,HjG)} -% \begin{macro}{\pIIe@@firstnum} -% \changes{v0.1x}{2003/11/27}{New ancillary macro (RN,HjG)} -% \begin{macro}{\pIIe@@secondnum} -% \changes{v0.1x}{2003/11/27}{New ancillary macro (RN,HjG)} -% Some macros to parametrize the shape of the vector outline. -% ^^A Should be user-level macros or changeable via key-value interface. -% ^^A (Defered to future version.) -% See Figures~\ref{fig:vector:ltx} and~\ref{fig:vector:pst}. -%\iffalse -% Note that when the \textsf{pstricks} package has been loaded, its -% arrow-drawing parameters will be dynamically evaluated; -% of course, -% this is only useful with the \textsf{pstarrows} package -% option. -% probably\slash most likely not useful with the default -% \textsf{ltxarrows} package option. -% \fi -% \begin{macrocode} - \newcommand*\pIIe@FAL{}\newcommand*\pIIe@FAW{}\newcommand*\pIIe@CAW{} - \newcommand*\pIIe@FAI{} - \newcommand*\pIIe@@firstnum{}\newcommand*\pIIe@@secondnum{} - \iffalse% the pstricks values gives too small arrows. (RN) - \AtBeginDocument{% - \@ifpackageloaded{pstricks}{% - \def\pIIe@FAL{\psk@arrowlength}% - \def\pIIe@FAW{\expandafter\pIIe@@secondnum\psk@arrowsize}% - \def\pIIe@CAW{\expandafter\pIIe@@firstnum\psk@arrowsize}% - \def\pIIe@FAI{\psk@arrowinset}% - \def\pIIe@@firstnum#1 #2 {#1\p@}% - \def\pIIe@@secondnum#1 #2 {#2}% - }{}% - } - \fi -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} % % \paragraph{\LaTeX\ version} % @@ -3069,6 +3058,7 @@ % % \begin{macro}{\oval} % \begin{macro}{\pIIe@maxovalrad} +% \begin{macro}{\pIIe@oval} % The variant of \cmd{\oval} defined here takes an additional optional % argument, which specifies the maximum radius of the rounded corners % (default = 20\,pt, as given above). @@ -3078,19 +3068,23 @@ % \changes{v0.2n}{2004/04/22}{Moved radius test from \cmd{\pIIe@def@UL} % (RN/HjG)} % \changes{v0.2n}{2004/04/22}{Allow zero diameter (RN/HjG)} +% \changes{v0.3d}{2020/06/13}{Allow spaces after the first optional Argument +% suggested by FMi (RN)} % \begin{macrocode} \newcommand*\pIIe@maxovalrad{} + \newcommand*\pIIe@oval{} + \def\pIIe@oval#1(#2,#3){\@ifnextchar[{\@oval(#2,#3)}{\@oval(#2,#3)[]}} \renewcommand*\oval[1][\maxovalrad]{% \begingroup \pIIe@defaultUL\pIIe@maxovalrad{#1}% \ifdim\pIIe@maxovalrad<\z@ \pIIe@badcircarg \fi % \end{macrocode} % Can't close the group here, since arguments must be parsed. -% (This is done by calling the saved original.) % \begin{macrocode} - \pIIe@oldoval} + \pIIe@oval} % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\@oval} % (This is called in turn by the saved original.) diff --git a/Master/texmf-dist/tex/latex/pict2e/pict2e.sty b/Master/texmf-dist/tex/latex/pict2e/pict2e.sty index 669253315b4..48d6e7482e6 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}[2019/08/20 v0.3c Improved picture commands (HjG,RN,JT)] +\ProvidesPackage{pict2e}[2020/06/13 v0.3d Improved picture commands (HjG,RN,JT)] \edef\Gin@codes{% \catcode`\noexpand\^^A\the\catcode`\^^A\relax \catcode`\noexpand\"\the\catcode`\"\relax @@ -73,27 +73,18 @@ \buttcap \fi } -\DeclareOption{ltxarrows}{\AtEndOfPackage{% +\newcommand*\pIIe@FAL{1.52}% +\newcommand*\pIIe@FAW{3.2}% +\newcommand*\pIIe@CAW{1.5pt}% +\newcommand*\pIIe@FAI{0.25}% +\newcommand*\ltxarrows{% \let\pIIe@vector=\pIIe@vector@ltx - \def\pIIe@FAL{1.52}% - \def\pIIe@FAW{3.2}% - \def\pIIe@CAW{1.5pt}% - \def\pIIe@FAI{0.25}% - }} -\DeclareOption{pstarrows}{\AtEndOfPackage{% +} +\newcommand*\pstarrows{% \let\pIIe@vector=\pIIe@vector@pst - \iffalse - \def\pIIe@FAL{1.4}% - \def\pIIe@FAW{2}% - \def\pIIe@CAW{1.5pt}% - \def\pIIe@FAI{0.4}% - \else % These are the ltxarrows values, which looks better. (RN) - \def\pIIe@FAL{1.52}% - \def\pIIe@FAW{3.2}% - \def\pIIe@CAW{1.5pt}% - \def\pIIe@FAI{0.25}% - \fi - }} +} +\DeclareOption{ltxarrows}{\AtEndOfPackage{\ltxarrows}} +\DeclareOption{pstarrows}{\AtEndOfPackage{\pstarrows}} \newcommand*\pIIe@debug@comment{} \DeclareOption{debug}{% \def\pIIe@debug@comment{^^J^^J\@percentchar\space >>> pict2e <<<^^J}% @@ -394,42 +385,51 @@ \def\@badlinearg{\PackageError {pict2e}{Bad \protect\line\space or \protect\vector\space argument}{}} \def\line(#1,#2)#3{% + \begingroup \pIIe@checkslopeargsline{#1}{#2}% \@tempdima=#1pt\relax \@tempdimb=#2pt\relax \@linelen #3\unitlength - \ifdim\@linelen<\z@ \@badlinearg \else \@sline \fi} - \def\@sline{% - \begingroup + \ifdim\@linelen<\z@ \@badlinearg \else + \pIIe@sline + \pIIe@moveto\z@\z@ + \pIIe@lineto\@xdim\@ydim + \pIIe@strokeGraph + \box\@tempboxa + \fi + \endgroup} + \newcommand*\pIIe@sline{% \ifdim\@tempdima=\z@ \ifdim\@tempdimb<\z@\@linelen-\@linelen\fi \@ydim=\@linelen \@xdim=\z@ \else + \ifdim\@tempdima<\z@\@linelen-\@linelen\fi \ifdim\@tempdimb=\z@ - \ifdim\@tempdima<\z@\@linelen-\@linelen\fi \@xdim=\@linelen \@ydim=\z@ \else - \ifnum\@tempdima<\z@\@linelen-\@linelen\fi \pIIe@divide\@tempdimb\@tempdima\dimen@ \@ydim=\strip@pt\dimen@\@linelen \@xdim=\@linelen \fi \fi - \pIIe@moveto\z@\z@ - \pIIe@lineto\@xdim\@ydim - \pIIe@strokeGraph - \endgroup} + \@ovxx=\ifnum\@xdim=\z@ \z@\else\@linelen\fi + \@ovyy=\ifnum\@ydim<\z@ \z@\else\@ydim\fi + \@ovdy=\ifnum\@ydim<\z@ -\@ydim\else\z@\fi + \setbox\@tempboxa\hbox{% + \vrule\@height \@ovyy \@depth \@ovdy \@width \z@ + \vrule\@height \z@ \@depth \z@ \@width \@ovxx}} \def\vector(#1,#2)#3{% \begingroup \pIIe@checkslopeargsvector{#1}{#2}% \@tempdima=#1pt\relax \@tempdimb=#2pt\relax \@linelen#3\unitlength \ifdim\@linelen<\z@ \@badlinearg \else + \pIIe@sline + \@linelen#3\unitlength \pIIe@pyth{\@tempdima}{\@tempdimb}\dimen@ - \ifdim\@tempdima=\z@ - \else\ifdim\@tempdimb=\z@ - \else + \ifdim\@tempdima=\z@ \else + \ifdim\@tempdimb=\z@ \else \pIIe@divide\dimen@{\@tempdima}\@xdim \@linelen\strip@pt\@xdim\@linelen \ifdim\@linelen<\z@\@linelen-\@linelen\fi @@ -440,24 +440,10 @@ \pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim\z@\z@ \pIIe@vector \pIIe@fillGraph + \box\@tempboxa \fi \endgroup} \newcommand*\pIIe@vector{} - \newcommand*\pIIe@FAL{}\newcommand*\pIIe@FAW{}\newcommand*\pIIe@CAW{} - \newcommand*\pIIe@FAI{} - \newcommand*\pIIe@@firstnum{}\newcommand*\pIIe@@secondnum{} - \iffalse% the pstricks values gives too small arrows. (RN) - \AtBeginDocument{% - \@ifpackageloaded{pstricks}{% - \def\pIIe@FAL{\psk@arrowlength}% - \def\pIIe@FAW{\expandafter\pIIe@@secondnum\psk@arrowsize}% - \def\pIIe@CAW{\expandafter\pIIe@@firstnum\psk@arrowsize}% - \def\pIIe@FAI{\psk@arrowinset}% - \def\pIIe@@firstnum#1 #2 {#1\p@}% - \def\pIIe@@secondnum#1 #2 {#2}% - }{}% - } - \fi \newcommand*\pIIe@vector@ltx{% \@ydim\pIIe@FAW\@wholewidth \advance\@ydim\pIIe@CAW\relax \@ovxx\pIIe@FAL\@ydim @@ -544,10 +530,12 @@ \def\pIIe@def@UL#1\relax#2#3{% \edef#2{\the\dimen@}} \newcommand*\pIIe@maxovalrad{} + \newcommand*\pIIe@oval{} + \def\pIIe@oval#1(#2,#3){\@ifnextchar[{\@oval(#2,#3)}{\@oval(#2,#3)[]}} \renewcommand*\oval[1][\maxovalrad]{% \begingroup \pIIe@defaultUL\pIIe@maxovalrad{#1}% \ifdim\pIIe@maxovalrad<\z@ \pIIe@badcircarg \fi - \pIIe@oldoval} + \pIIe@oval} \def\@oval(#1,#2)[#3]{% \@ovxx#1\unitlength \divide\@ovxx\tw@ \@ovyy#2\unitlength \divide\@ovyy\tw@ |