summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/curve2e
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-04-11 03:09:12 +0000
committerNorbert Preining <norbert@preining.info>2020-04-11 03:09:12 +0000
commitc2697fc286a1e2c94fd9968b76be6f4a6d2114cd (patch)
tree1dc2cfb07cb032740483dd8be7c74aff66b70352 /macros/latex/contrib/curve2e
parent25111608e6aa05042b0c6f83009262e1973d7a45 (diff)
CTAN sync 202004110309
Diffstat (limited to 'macros/latex/contrib/curve2e')
-rw-r--r--macros/latex/contrib/curve2e/README.txt2
-rw-r--r--macros/latex/contrib/curve2e/curve2e-manual.pdfbin566076 -> 565999 bytes
-rw-r--r--macros/latex/contrib/curve2e/curve2e-manual.tex22
-rw-r--r--macros/latex/contrib/curve2e/curve2e.dtx66
-rw-r--r--macros/latex/contrib/curve2e/curve2e.pdfbin641726 -> 648539 bytes
5 files changed, 57 insertions, 33 deletions
diff --git a/macros/latex/contrib/curve2e/README.txt b/macros/latex/contrib/curve2e/README.txt
index 66d32795f9..d805a99f29 100644
--- a/macros/latex/contrib/curve2e/README.txt
+++ b/macros/latex/contrib/curve2e/README.txt
@@ -10,7 +10,7 @@
%% License information appended
%%
File README.txt for package curve2e
- [2020-02-28 v.2.2.3 Extension package for pict2e]
+ [2020-04-02 v.2.2.6 Extension package for pict2e]
The package bundle curve2e is composed of the following files
curve2e.dtx
diff --git a/macros/latex/contrib/curve2e/curve2e-manual.pdf b/macros/latex/contrib/curve2e/curve2e-manual.pdf
index 389c3b74ae..9d0fc06c45 100644
--- a/macros/latex/contrib/curve2e/curve2e-manual.pdf
+++ b/macros/latex/contrib/curve2e/curve2e-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/curve2e/curve2e-manual.tex b/macros/latex/contrib/curve2e/curve2e-manual.tex
index e2dc3de5a6..23a35a8f85 100644
--- a/macros/latex/contrib/curve2e/curve2e-manual.tex
+++ b/macros/latex/contrib/curve2e/curve2e-manual.tex
@@ -36,17 +36,19 @@
\renewcommand\cs[1]{{\normalfont\texttt{\char92#1}}}
\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!{%
diff --git a/macros/latex/contrib/curve2e/curve2e.dtx b/macros/latex/contrib/curve2e/curve2e.dtx
index 2c4d727bda..a0e4bae20b 100644
--- a/macros/latex/contrib/curve2e/curve2e.dtx
+++ b/macros/latex/contrib/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>{%
diff --git a/macros/latex/contrib/curve2e/curve2e.pdf b/macros/latex/contrib/curve2e/curve2e.pdf
index 1141d91861..21c403da84 100644
--- a/macros/latex/contrib/curve2e/curve2e.pdf
+++ b/macros/latex/contrib/curve2e/curve2e.pdf
Binary files differ