From 12fef7aa53e3695c36d3650fa4fb98f991bc223e Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 5 May 2020 03:00:58 +0000 Subject: CTAN sync 202005050300 --- macros/latex/contrib/curve2e/curve2e-manual.tex | 40 ++++++++++++++++--------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'macros/latex/contrib/curve2e/curve2e-manual.tex') 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. -- cgit v1.2.3