summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/curve2e
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-05-05 03:00:58 +0000
committerNorbert Preining <norbert@preining.info>2020-05-05 03:00:58 +0000
commit12fef7aa53e3695c36d3650fa4fb98f991bc223e (patch)
tree851ce6216775d5d7b763952c5c861e86a7f48a03 /macros/latex/contrib/curve2e
parent47af91cb8475b7352015cf05ce881e6b8415112d (diff)
CTAN sync 202005050300
Diffstat (limited to 'macros/latex/contrib/curve2e')
-rw-r--r--macros/latex/contrib/curve2e/README.txt38
-rw-r--r--macros/latex/contrib/curve2e/curve2e-manual.pdfbin565999 -> 567196 bytes
-rw-r--r--macros/latex/contrib/curve2e/curve2e-manual.tex40
-rw-r--r--macros/latex/contrib/curve2e/curve2e.dtx20
-rw-r--r--macros/latex/contrib/curve2e/curve2e.pdfbin648539 -> 649719 bytes
5 files changed, 59 insertions, 39 deletions
diff --git a/macros/latex/contrib/curve2e/README.txt b/macros/latex/contrib/curve2e/README.txt
index d805a99f29..c938d9e12e 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-04-02 v.2.2.6 Extension package for pict2e]
+ [2020-05-03 v.2.2.8 Extension package for pict2e]
The package bundle curve2e is composed of the following files
curve2e.dtx
@@ -33,21 +33,23 @@ Move curve2e.sty and curve2e-v161.sty to ROOT/tex/latex/curve2e/
Move README.txt to ROOT/doc/latex/curve2e/
curve2e.dtx is the documented TeX source file of the derived files
-curve2e.sty, curve2e-v161.sty and README.txt.
+curve2e.sty, curve2e.pdf, curve2e-v161.sty and README.txt.
You get curve2e.sty, curve2e.pdf, curve2e-v161.sty, and README.txt
by running pdflatex on curve2e.dtx.
The curve2e-manual files contains the user manual; in
-this way the long preliminary descriptive part has been transferred to
-a shorter dedicated file, and the “normal” user should have enough
-information to use the package. Th curve2e.pdf file, extracted from
-the .dtx one, contains the code documentation and is intended for the
-developers, or for the curious advanced users. For what concerns
-curve2e-v161.sty is a previous version of this package; see below why
-the older version might become necessary to the end user.
+this way the long preliminary descriptive part of the previous versions
+curve2e.pdf file has been transferred to shorter dedicated file, and the
+“normal” user should have enough information to use the package. The
+curve2e.pdf file, extracted from the .dtx one, contains the code
+documentation and is intended for the developers, or for the curious
+advanced users. For what concerns curve2e-v161.sty is a previous
+version of this package; see below why the older version might become
+necessary to the end user.
README.txt, this file, contains general information.
+
This bundle contains also package curve2e-v161.sty, a roll-back
version needed in certain rare cases.
@@ -56,15 +58,15 @@ standard picture LaTeX environment according to what Leslie Lamport
specified in the second edition of his LaTeX manual (1994).
This further extension curve2e.sty to pict2e.sty allows to draw lines
-and vectorsith any non integer slope parameters, to draw dashed and dotted
-lines of any slope, to draw arcs and curved vectors, to draw curves where
-just the interpolating nodes are specified together with the slopes at
-such nodes; closed paths of any shape can be filled with color; all
-coordinates are treated as ordered pairs, i.e. 'complex numbers';
-coordinates may be expressed also in polar form. Coordinates may be
-specified with macros, so that editing any drawing is rendered much
-simpler: any point specified with a macro is modified only once in
-its macro definition.
+and vectors with any non integer slope parameters, to draw dashed and
+dotted lines of any slope, to draw arcs and curved vectors, to draw
+curves where just the interpolating nodes are specified together with
+the slopes at such nodes; closed paths of any shape can be filled with
+color; all coordinates are treated as ordered pairs, i.e. 'complex
+numbers'; coordinates may be expressed also in polar form. Coordinates
+may be specified with macros, so that editing any drawing is rendered
+much simpler: any point specified with a macro is modified only once
+in its macro definition.
Some of these features have been incorporated in the 2009 version of
pict2e; therefore this package avoids any modification to the original
pict2e commands. In any case the version of curve2e is compatible with
diff --git a/macros/latex/contrib/curve2e/curve2e-manual.pdf b/macros/latex/contrib/curve2e/curve2e-manual.pdf
index 9d0fc06c45..034014125e 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 23a35a8f85..87961a4cd9 100644
--- a/macros/latex/contrib/curve2e/curve2e-manual.tex
+++ b/macros/latex/contrib/curve2e/curve2e-manual.tex
@@ -1279,7 +1279,7 @@ Remember to delete all these subfolders if you decide to install a complete upda
\multiput(50,50)(-15:5){11}{\polygon*(-1,-1)(1,-1)(1,1)(-1,1)}
\end{picture}
\end{minipage}
-\caption{Some examples of the \meta{handler} optional argument}%\label{pag:multiput}
+\caption{Some examples of the \meta{handler} optional argument}\label{pag:multiput}
\end{figure}
A new command |\xmultiput| (not available with the previous versions
@@ -1331,14 +1331,14 @@ Remember to delete all these subfolders if you decide to install a complete upda
\end{figure}
\item This implementation of \pack{curve2e} includes an extension
- to package |xfp|, in the sense that adds two more L3 commands:
- |\fptest| and |\fpdowhile| to the two already contained and
+ to package |xfp|, in the sense that adds three more L3 commands:
+ |\fptest|, |\fpdowhile|, |fpwhiledo| to the two already contained and
documented in the latter package. The syntax of such new commands
is the following
\begin{flushleft}\obeylines
\cs{fptext}\marg{test}\marg{true}\marg{false}
- and
\cs{fpdowhile}\meta{test}\meta{operations to be repeated}
+ \cs{fpwhiledo}\meta{test}\meta{operations to be repeated}
\end{flushleft}
The macro |\fptest| requires two further arguments that contain
what to do if the \meta{test} is true, and what to do if the
@@ -1346,20 +1346,32 @@ Remember to delete all these subfolders if you decide to install a complete upda
The \meta{test} is a logical expressions that connects math relation
expressions, even floating point ones, by means of \emph{logical
operators}; such operators are \verb+||+, \verb|&&|, and \verb|!|,
- respectively for OR, AND, NOT; for example \verb|!<| means “not lower
- than”, which is equivalent to “equal or grater than”. The logical
- expression is parsed left to right and normal parentheses may be
- used to alter this sequence. The logical operators work also
- between logical variables, therefore the \meta{test} may contain
- an interesting mixture of relation and logical operators.
-
- Before using |\fpdowhile| the arguments the \meta{test} depends
- from must be set so that the test is true; during the execution
+ respectively for OR, AND, NOT; math relation expressions contain
+ relation operators, even negated ones: for example \verb|!<| means
+ “not lower than”, which is equivalent to “equal or grater than”, i.e.
+ \verb|=>|. The logical expression is parsed left to right and normal
+ parentheses may be used to alter this sequence. The logical operators
+ work also between logical variables, therefore the \meta{test} may
+ contain an interesting mixture of relation and logical operators.
+
+ Before using |\fpdowhile| and |\fpwhiledo|the arguments of \meta{test}
+ depends on must be set so that the test is true; during the execution
of the \meta{operations to be repeated} there must be some setting
that eventually renders the \meta{test} false. The user should
- pay attention to set the elements that \meta{test} depends from,
+ pay attention to set the elements that \meta{test} depends on,
because the risk is to enter an infinite loop and end up with some
error message stating that the working memory of the program is full.
+ Notice that |\fpdowhile| first puts the \meta{operations to be repeated}
+ into the work flow then checks the \meta{test} and possibly repeats the
+ cycle; on the opposite, |\fpwhiledo| first checks the \meta{test} then
+ possibly inserts the \meta{operations to be repeated} and cycles.
+ Evidently with the same \meta{test} the two while cycles produce
+ different results with a little, but important difference: if the input
+ data are macros defined by previous computations, there is no guarantee
+ that the \meta{test} is initially true; if it sis false, |fpwhiledo|
+ does not do anything, while |\fpdowhile| executes one cycle and produces
+ in the output stream something that might be nonsense. While cycles done
+ with |\fpwhiledo| should be safer and should be preferred.
Nevertheless such commands are very useful also for drawing graphics;
the |xmultiput| already makes use of such L3~functions.
diff --git a/macros/latex/contrib/curve2e/curve2e.dtx b/macros/latex/contrib/curve2e/curve2e.dtx
index a0e4bae20b..748a8e38d2 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-04-02 v.2.2.6 Extension package for pict2e]
+ [2020-05-03 v.2.2.8 Extension package for pict2e]
%</package|readme>
%<*driver>
\documentclass{ltxdoc}\errorcontextlines=9
@@ -183,7 +183,7 @@ README.txt and curve2e-v161.sty.
%</driver>
% \fi
%
-% \CheckSum{5594}
+% \CheckSum{5598}
% \begin{abstract}
% This file documents the |curve2e| extension package to the |pict2e|
% bundle implementation; the latter was described by Lamport
@@ -554,9 +554,9 @@ README.txt and curve2e-v161.sty.
}
% \end{macrocode}
% Since we already loaded package|xfp| or at least we explicitly load it
-% in our preamble, we add, if not already defined by the package, the two
-% new commands that allow to make floating point tests, and to implement
-% a “while” cycle\footnote{Thanks to Brian Dunn who spotted a bug in
+% in our preamble, we add, if not already defined by the package, three
+% new commands that allow to make floating point tests, and two
+% “while” cycles\footnote{Thanks to Brian Dunn who spotted a bug in
% the previous 2.0.x version definitions.}
% \begin{macrocode}
%
@@ -566,10 +566,14 @@ README.txt and curve2e-v161.sty.
\fp_compare:nTF{#1}{#2}{#3}}
\ProvideExpandableDocumentCommand\fpdowhile{m m}{%
\fp_do_while:nn{#1}{#2}}
+\ProvideExpandableDocumentCommand\fpwhiledo{m m}{%
+ \fp_while_do:nn{#1}{#2}}
}
\ExplSyntaxOff
% \end{macrocode}
+% The while cycles differ in the order of what they do; see the
+% |interface3.pdf| documentation file for details.
%
% The next macros are just for debugging. With the \texttt{trace} package
% it would probably be better to define other macros, but this is not for
@@ -989,7 +993,9 @@ README.txt and curve2e-v161.sty.
% original macros, but now the increments are computed within the while
% loop, but outside the argument of the inner |\put| command. If the
% optional \meta{handler} is specified the increments are computed
-% from the macros specified by the user.
+% from the macros specified by the user. Another new feature: the fourth
+% argument, that contains the number of objects to be put in place,
+% may be an integer expression such as for example |3*\N+1|.
%
% The two increments components inside the optional argument may be set
% by means of mathematical expressions operated upon by the |\fpeval|
@@ -1011,7 +1017,7 @@ README.txt and curve2e-v161.sty.
{\put(#1){\let\c@multicnt\@multicnt
\CopyVect #2 to \R
\CopyVect#3 to\D
- \@multicnt=#4\relax
+ \@multicnt=\inteval{#4}\relax
\@whilenum \@multicnt > \z@\do{%
\put(\R){#5}%
\IfValueTF{#6}{#6}{\AddVect#3 and\R to \R}%
diff --git a/macros/latex/contrib/curve2e/curve2e.pdf b/macros/latex/contrib/curve2e/curve2e.pdf
index 21c403da84..81441253bd 100644
--- a/macros/latex/contrib/curve2e/curve2e.pdf
+++ b/macros/latex/contrib/curve2e/curve2e.pdf
Binary files differ