From 70471008188a9958254fb3a466cbc1248d33f929 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 14 Jun 2020 22:18:35 +0000 Subject: pict2e (15jun20) git-svn-id: svn://tug.org/texlive/trunk@55550 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/pict2e/pict2e.sty | 84 ++++++++++++--------------- 1 file changed, 36 insertions(+), 48 deletions(-) (limited to 'Master/texmf-dist/tex/latex/pict2e') 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@ -- cgit v1.2.3