diff options
author | Karl Berry <karl@freefriends.org> | 2020-04-11 22:22:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-04-11 22:22:35 +0000 |
commit | 1fc41b1fba482cb23d6bf3636c69fe60cc193f5e (patch) | |
tree | c13ce556e9df22a0edc2438a0162757aeb85ba80 /Master/texmf-dist/source/latex | |
parent | f6ad7bb333822b212c5df11b3e276f19995b0425 (diff) |
curve2e (10apr20)
git-svn-id: svn://tug.org/texlive/trunk@54657 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/curve2e/curve2e.dtx | 66 |
1 files changed, 44 insertions, 22 deletions
diff --git a/Master/texmf-dist/source/latex/curve2e/curve2e.dtx b/Master/texmf-dist/source/latex/curve2e/curve2e.dtx index 2c4d727bda7..a0e4bae20b6 100644 --- a/Master/texmf-dist/source/latex/curve2e/curve2e.dtx +++ b/Master/texmf-dist/source/latex/curve2e/curve2e.dtx @@ -46,7 +46,7 @@ README.txt and curve2e-v161.sty. %<+package>\ProvidesPackage{curve2e}% %<+readme>File README.txt for package curve2e %<*package|readme> - [2020-02-28 v.2.2.3 Extension package for pict2e] + [2020-04-02 v.2.2.6 Extension package for pict2e] %</package|readme> %<*driver> \documentclass{ltxdoc}\errorcontextlines=9 @@ -81,17 +81,19 @@ README.txt and curve2e-v161.sty. \renewcommand\eTeX{\lower0.5ex\hbox{$\varepsilon\!$}\TeX} \providecommand\Pbox{} -\RenewDocumentCommand\Pbox{D(){0,0} O{cc} m O{0.5ex}}{% -\put(#1){% -\dimendef\Dim=2566\relax -\settowidth\Dim{#2}% -\edef\Rapp{\fpeval{\Dim/{1ex}}}% +\newlength\PbDim +\RenewDocumentCommand\Pbox{D(){0,0} O{cc} m O{0.5ex} s D<>{0}}{% +\put(#1){\rotatebox{#6}{\makebox(0,0){% +\settowidth\PbDim{#2}% +\edef\Rapp{\fpeval{\PbDim/{1ex}}}% \fptest{\Rapp > 1.5}{\fboxsep=0.5ex}{\fboxsep=0.75ex}% -\fboxrule=0pt -\fptest{#4 = 0sp}{\makebox(0,0)[#2]{\fbox{$\relax#3\relax$}}}% -{\edef\Diam{\fpeval{#4/\unitlength}}% -\makebox(0,0){\circle*{\Diam}}% -\makebox(0,0)[#2]{\fbox{$\relax\mathsf#3\relax$}}}% +\IfBooleanTF{#5}{\fboxrule=0.4pt}{\fboxrule=0pt}% +\fptest{#4 = 0sp}% + {\makebox(0,0)[#2]{\fbox{$\relax#3\relax$}}}% + {\edef\Diam{\fpeval{(#4)/\unitlength}}% + \makebox(0,0){\circle*{\Diam}}% + \makebox(0,0)[#2]{\fbox{$\relax\mathsf#3\relax$}}% + }}}% }\ignorespaces} \def\LissajousCoefs#1,#2,#3,#4,#5,#6!{% @@ -181,7 +183,7 @@ README.txt and curve2e-v161.sty. %</driver> % \fi % -% \CheckSum{5581} +% \CheckSum{5594} % \begin{abstract} % This file documents the |curve2e| extension package to the |pict2e| % bundle implementation; the latter was described by Lamport @@ -486,6 +488,11 @@ README.txt and curve2e-v161.sty. % necessary any more, but it's true that it became imperative when older % versions were used. % +% Some others users spotted other “features” that did not produce the +% desired results; they have been acknowledged by footnotes in +% correspondence with the corrections that were made tanks their +% contribution. +% % \StopEventually{% % \begin{thebibliography}{9} % \bibitem{pict2e} Gäßlein H., Niepraschk R., and Tkadlec J. @@ -1000,7 +1007,7 @@ README.txt and curve2e-v161.sty. {\IfNoValueTF{#3}{\PackageError{curve2e} {\string\multiput\space Increment components missing}% {Nothing done} - } + }% {\put(#1){\let\c@multicnt\@multicnt \CopyVect #2 to \R \CopyVect#3 to\D @@ -1009,9 +1016,9 @@ README.txt and curve2e-v161.sty. \put(\R){#5}% \IfValueTF{#6}{#6}{\AddVect#3 and\R to \R}% \advance\@multicnt\m@ne - } - } - } + }% + }% + }% }\ignorespaces } % \end{macrocode} @@ -1637,7 +1644,7 @@ README.txt and curve2e-v161.sty. % \begin{macrocode} \def\ArgOfVect#1to#2{\GetCoord(#1){\t@X}{\t@Y}% \fptest{\t@X=\z@ && \t@Y=\z@}{\edef#2{0}% -\PackageWarning{curve2e}{Null vector}{Check your data\Messagebreak +\PackageWarning{curve2e}{Null vector}{Check your data\MessageBreak Computations go on, but the results may be meaningless}}{% \edef#2{\fpeval{round(atand(\t@Y,\t@X),6)}}}\ignorespaces} % \end{macrocode} @@ -2690,10 +2697,22 @@ Computations go on, but the results may be meaningless}}{% % the distances of the control points from the adjacent nodes using the % half chord length, not the full length. We also distinguish between the % computations relative to the arc starting point and those relative to -% the end point. +% the end point. Notice that if the directions of two successive nodes are +% identical, it is necessary to draw a line, not a third order +% spline\footnote{Many thanks to John Hillas who spotted this bug, that +% passed unnoticed fora long time, because it is a very unusual situation.}; +% therefore it is necessary to make a suitable test that is more +% comfortable to do after the chord has been rotated to be horizontal; +% in facts, if the two directions are equal, the vertical componente +% of the directions are both vanishing values; probably, instead of +% testing with respect to zero, it might be advisable to test the +% absolute value with respect to a small number such as, for example, +% “1.e-6.” % % \begin{macrocode} -\ifdim\@DXpzero\p@=\z@ +\fptest{\@DYpuno=0 && \@DYpzero=0}{\GetCoord(\@Puno)\@tX\@tY + \pIIe@lineto{\@tX\unitlength}{\@tY\unitlength}}% +{\ifdim\@DXpzero\p@=\z@ \@tdA=1.333333\p@ \Numero\@KCzero{\@semichord\@tdA}% \fi @@ -2757,7 +2776,7 @@ Computations go on, but the results may be meaningless}}{% \GetCoord(\@CPuno)\@XCPuno\@YCPuno \pIIe@curveto{\@XCPzero\unitlength}{\@YCPzero\unitlength}% {\@XCPuno\unitlength}{\@YCPuno\unitlength}% - {\@XPuno\unitlength}{\@YPuno\unitlength}\egroup + {\@XPuno\unitlength}{\@YPuno\unitlength}}\egroup % \end{macrocode} % It does not have to stroke the curve because other Bézier splines % might still be added to the path. On the opposite it memorises the @@ -2774,7 +2793,10 @@ Computations go on, but the results may be meaningless}}{% % selected color, while the latter just strokes the path. Both % recursively examine an arbitrary list of nodes and directions; node % coordinates are grouped within round parentheses while direction -% components are grouped within angle brackets. The first call of the +% components are grouped within angle brackets. Before testing for a +% possible star, this initial command kills any space or glue that +% might precede it\footnote{Thanks to John Hillas who spotted the +% effects of this missing glue elimination.} The first call of the % macro initialises the drawing process and checks for the next node and % direction; if a second node is missing, it issues a warning message and % does not draw anything. It does not check for a change in direction, @@ -2791,7 +2813,7 @@ Computations go on, but the results may be meaningless}}{% % regular |\ChangeDir| macro, but also for recursing again by recalling % |\@Curve|. % \begin{macrocode} -\def\Curve{\@ifstar{\let\fillstroke\fillpath\Curve@}% +\def\Curve{\@killglue\@ifstar{\let\fillstroke\fillpath\Curve@}% {\let\fillstroke\strokepath\Curve@}} \def\Curve@(#1)<#2>{% |