diff options
author | Karl Berry <karl@freefriends.org> | 2020-10-04 21:13:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-10-04 21:13:32 +0000 |
commit | e242e2da315de7f5e9c7c7ab8f078f17cdcde5e6 (patch) | |
tree | fa6ade4b31f83d23581e3767a1509e58b2b2e558 /Master/texmf-dist | |
parent | 1e3598faa2c913da7dda4fc84b39ba5e444d7a2a (diff) |
curve2e (4oct20)
git-svn-id: svn://tug.org/texlive/trunk@56538 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/curve2e/README.txt | 86 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/curve2e/curve2e-manual.pdf | bin | 567196 -> 568145 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/curve2e/curve2e-manual.tex | 417 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/curve2e/curve2e.pdf | bin | 649719 -> 641798 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/curve2e/curve2e.dtx | 147 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/curve2e/curve2e.sty | 39 |
6 files changed, 311 insertions, 378 deletions
diff --git a/Master/texmf-dist/doc/latex/curve2e/README.txt b/Master/texmf-dist/doc/latex/curve2e/README.txt index dac99619c6b..f8526c8a102 100644 --- a/Master/texmf-dist/doc/latex/curve2e/README.txt +++ b/Master/texmf-dist/doc/latex/curve2e/README.txt @@ -1,20 +1,16 @@ %% %% This is file `README.txt', -%% generated with the docstrip utility. %% -%% The original source files were: -%% -%% curve2e.dtx (with options: `readme') -%% %% Copyright (C) 2005--2020 Claudio Beccari all rights reserved. %% License information appended %% File README.txt for package curve2e - [2020-05-03 v.2.2.8 Extension package for pict2e] + [2020-10-03 v.2.2.10 Extension package for pict2e] The package bundle curve2e is composed of the following files curve2e.dtx curve2e-manual.tex +README.txt The derived files are @@ -22,7 +18,6 @@ curve2e.sty curve2e-v161.sty curve2e.pdf curve2e-manual.pdf -README.txt Compile curve2e.dtx and curve2e-manual.tex two or three times until all labels and citation keys are completely resolved. @@ -33,37 +28,37 @@ 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, and curve2e-v161.sty. -You get curve2e.sty, curve2e.pdf, curve2e-v161.sty, and README.txt -by running pdflatex on curve2e.dtx. +You get curve2e.sty, curve2e.pdf, and curve2e-v161.sty 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. +The curve2e-manual file 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. 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, it is a previous +roll back 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. -Curve2e.sty is an extension of the package pict2e.sty which extends the -standard picture LaTeX environment according to what Leslie Lamport -specified in the second edition of his LaTeX manual (1994). +Curve2e.sty is an extension of the package pict2e.sty which initially +extended the standard picture LaTeX environment according to what Leslie +Lamport specified in the second edition of his LaTeX manual (1994); in +time pict2e.sty evolved to contain further enhancements to what Leslie +Lamport announced in 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 +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 @@ -73,19 +68,20 @@ later versions of pict2e; see below. Curve2e now accepts polar coordinates in addition to the usual cartesian ones; several macros have been upgraded; a new macro for tracing cubic Bezier splines with their control nodes specified in polar form is -available. The same applies to quadratic Bezier splines. The multiput +available. The same applies to quadratic Bezier splines. The \multiput command has been completely modified in a backwards compatible way; the -new version allows to manipulate the increment components in a configurable -way. A new xmultiput command has been defined that is more configurable -than the original one; both commands multiput and xmultiput are backwards -compatible with the original picture environment definition. +new version allows to manipulate the increment components in a +configurable way. A new xmultiput command has been defined that is more +configurable than the original one; both commands multiput and xmultiput +are backwards compatible with the original picture environment definition. Curve2e solves a conflict with package eso-pic. This version of curve2e is almost fully compatible with pict2e dated -2014/01/12 version 0.2z and later. +2014/01/12 version 0.2z and later; as of today the last pct2e revision +is version 0.4b dated 2020, and curve2e has been tested also with this revision confirming that it performs as expected. -If you specify +If you specify: \usepackage[<pict2e options>]{curve2e} @@ -93,8 +89,8 @@ the package pict2e is automatically invoked with the specified options. The -almost fully compatible- phrase is necessary to explain that this version of curve2e uses some `functions' of the LaTeX3 language that were -made available to the LaTeX developers by mid October 2018. Should the user -have an older or a basic/incomplete installation of the TeX system, +made available to the LaTeX developers by mid October 2018. Should the +user have an older or a basic/incomplete installation of the TeX system, such L3 functions might not be available. This is why this package checks the presence of the developer interface; in case such interface is not available it rolls back to the previous version @@ -110,8 +106,8 @@ The package has the LPPL status of maintained. According to the LPPL licence, you are entitled to modify this package, as long as you fulfil the few conditions set forth by the Licence. -Nevertheless this package is an extension to the standard LaTeX -pict2e (2014) package. Therefore any change must be controlled on the +Nevertheless this package is an extension to the standard LaTeX pict2e +(2014 and 2020) package. Therefore any change must be controlled on the parent package pict2e, so as to avoid redefining or interfering with what is already contained in that package. @@ -131,9 +127,9 @@ claudio dot beccari at gmail dot com %% %% This work is "maintained" %% -%% This work consists of file curve2e.dtx, and the derived files -%% curve2e.sty and curve2e.pdf, plus the auxiliary derived files -%% README.txt and curve2e-v161.sty. +%% This work consists of files curve2e.dtx and curve2e-manual.tex, +%% and the derived files curve2e.sty and curve2e.pdf, curve2e-manual.pdf, +%% plus the auxiliary files README.txt and curve2e-v161.sty. %% %% %% End of file `README.txt'. diff --git a/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.pdf b/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.pdf Binary files differindex 034014125ea..30b44a0841c 100644 --- a/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.pdf +++ b/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.pdf diff --git a/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.tex b/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.tex index 87961a4cd96..e7da6498523 100644 --- a/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.tex +++ b/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.tex @@ -5,8 +5,9 @@ \usepackage[utf8]{inputenc} \usepackage{lmodern,textcomp} \usepackage{mflogo} -\usepackage{multicol,amsmath,fancyvrb,graphics,shortvrb,trace} -\usepackage{xcolor,curve2e,verbatim,enumitem} +\usepackage{multicol,amsmath,fancyvrb,graphics,shortvrb} +\usepackage{xcolor,verbatim,enumitem,trace} +\usepackage{curve2e} \MakeShortVerb{\|} \providecommand*\diff{\mathop{}\!\mathrm{d}} \providecommand\meta{}\providecommand\marg{} @@ -90,7 +91,7 @@ \newwrite\example@out \ProvideDocumentEnvironment{Esempio}{ O{\footnotesize} D(){0.50}} % All definitions and assignments are local -% #1 := Lates font size command or \setfontsize{<size>} +% #1 := Latex font size command or \setfontsize{<size>} % %2 := \textwidth percentage for the code box; the complement, less the % column gap for the result dedicata al codice % Syntax: \begin{Esempio}[<size command>](<code box percentage width>) @@ -148,33 +149,33 @@ \begin{abstract} This file contains the user manual of the \pack{curve2e} extension package to the \pack{pict2e} bundle; the latter was described by Lamport himself in the 1994 second edition of his \LaTeX\ handbook. -Please take notice that on April 2011 a package \pack{pict2e} upgraded version has been released that incorporates some of the commands defined in early versions of this package; apparently there are no conflicts, because \pack{curve2e} contains only the advanced features that extend the above package. +Please take notice that on April 2011 a package \pack{pict2e} upgraded version has been released that incorporates some of the commands defined in early versions of this package \pack{curve2e}; apparently there are no conflicts, because this package contains only the advanced features that extend the above package. -Since this extension redefines some commands and introduces some more drawing facilities (that allow to draw circular arcs and arbitrary curves with the minimum of user intervention) the user needs a user manual that contains several actual examples. The software available to show the code and its result after compilation is incompatible with the usual \LaTeX\ |ltxdoc| class for code documentation, therefore a separate user manual has been made available. If the user wants to explore the \pack{curve2e} code and its documentation s/he has available the documented file |curve2e.pdf|. +Since this extension redefines some commands and introduces some more drawing facilities (that allow to draw circular arcs and arbitrary curves with the minimum of user intervention) the user needs a user manual that contains several actual examples. The software available to show the code and its result after compilation is incompatible with the usual \LaTeX\ |ltxdoc| class for code documentation, therefore a separate user manual has been made available. If the user wants to explore the \pack{curve2e} code and its documentation s/he has available the |curve2e.pdf| file. \end{abstract} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Installation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -If you installed your \TeX\ system with a \TeX~Live or a Mik\TeX\ complete and updated distribution you already have this package installed; in order to verify open a terminal or command prompt window and use it to enter the \texttt{texdoc curve2e-manual}; as soon as the command is executed a screen window should open displaying this manual. If this does not happen, either you misspelt the command (it happens more often than not), or your installation is not complete and updated. +If \TeX\ system was installed with a \TeX~Live or a MiK\TeX\ complete and updated distribution this packageis already installed; in order to verify open a terminal or command prompt window and use it to enter the \texttt{texdoc curve2e-manual}; as soon as the command is executed a screen window should open displaying this manual. If this does not happen, either you misspelt the command (it happens more often than not), or your installation is not complete and updated. -I suggest you to youse your computer installation facilities to install this bundle. Otherwise, download this curve2e.zip package from one of the CTAN (Comprehensive TeX Archive Network) archives, to your downloads folder. -Before doing anything else verify if you have a personal \texttt{temf} tree; if not, create one reading you distribution instruction; let us assume that your personal |texmf| archive is in |HOME/texmf| (on Windows change the slash with a backslash) and |HOME| is a path starting from the root of you hard disk and going though several other folders. On Windows~10 it might be |C:\Users\YouName|; on Linux it might be simply |~|; On Mac it would be |~\Library|, but sometimes the |HOME| might be different, especially o Windows platforms. Create the following subfolders: +I suggest you to use your computer installation facilities to install this bundle. Otherwise, download this curve2e.zip package from one of the CTAN (Comprehensive TeX Archive Network) archives, to your downloads folder. +Before doing anything else verify if you have a personal \texttt{texmf} tree; if not, create one reading you distribution instruction; let us assume that your personal |texmf| archive is in |HOME/texmf| (on Windows change the slash with a backslash) and |HOME| is a path starting from the root of you hard disk and going though several other folders. On Windows~10 it might be |C:\Users\YourName|; on Linux it might simply be |~|; on Mac it would be |~/\Library|, but sometimes the |HOME| might be different, especially o Windows platforms. Create the following subfolders: \begin{enumerate}[noitemsep] \item |HOME/texmf/source/latex/curve2e/| \item |HOME/texmf/doc/latex/curve2e/| \item |HOME/texmf/tex/latex/curve2e/| \end{enumerate} -Now move file \file{curve2e.zip} to the |.../source/latex/curve2e/| folder; the decompress the |.zip| file with the software you have on board of your platform. Run with |pdflatex| on |.dtx| file; then do the same with the |curve2e-manual.tex|. You might need to repeat these compilations two or three times in order to have the table of contents and all the references correctly connected. +Now move file \file{curve2e.zip} to the |.../source/latex/curve2e/| folder; then decompress the |.zip| file with the software you have available on your platform. Run |pdflatex| on the |.dtx| file; then do the same with the |curve2e-manual.tex|. You might need to repeat these compilations two or three times in order to have the table of contents and all the references correctly connected. This done move the |.pdf| files to the |.../doc/latex/curve2e/| folder. and move the |.sty| files to the |.../tex/latex/curve2e/| folder. -Clear the |.../source/latex/curve2e/| folder from the auxiliary files, all those remaining in the folder except those that have the extensions |.zip|, |.dtx|, |.tex|, and |.txt|. Read the \file{README.txt} file. +Clear the |.../source/latex/curve2e/| folder from the auxiliary files, all those remaining in the folder except those that have the extensions |.zip|, |.dtx|, |.tex|, and |.txt|. Read the \file{README.txt} file. -If your \TeX\ system is correctly set up, your files in your persanl tree should be immediately usable; probably you have to create the file name database with Mik\TeX; in this case read the documentation of your Mik\TeX\ installation to discover how to~do~it. +If your \TeX\ system is correctly set up, your files in your personal tree should be immediately usable; probably you have to create the file-name database with MiK\TeX; in this case read the documentation of your MiK\TeX\ installation to discover how to~do~it. -Remember to delete all these subfolders if you decide to install a complete updated version of your favourite distribution, and if you keep it updated approximately once every 7-10 days. This is much simpler than to struggle with these manual operations. +Remember to delete all these subfolders if you decide to install a complete updated version of your favourite distribution, and you'd better keep it updated approximately once every 7 or 10 days. This is much simpler than to struggle with these manual operations. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Package \pack{pict2e} and this extension \pack{curve2e}} @@ -182,14 +183,14 @@ Remember to delete all these subfolders if you decide to install a complete upda Package \pack{pict2e} was announced in issue 15 of \file{latexnews} around December 2003; it was declared that the new package would - replace the dummy one that has been accompanying every release of + replace the dummy one that had been accompanying every release of \LaTeXe\ since its beginnings in 1994. The dummy package was just issuing an info message that simply announced the temporary unavailability of the real package. Eventually Gäßlein and Niepraschk implemented what Lamport himself had - already documented in the second edition of his \LaTeX\ handbook, that - is a \LaTeX\ package that contained the macros capable of removing all + already documented in the second edition of his \LaTeX\ handbook, it was + a \LaTeX\ package that contained the macros capable of removing all the limitations contained in the standard commands of the original \texttt{picture} environment; specifically what follows. @@ -202,8 +203,7 @@ Remember to delete all these subfolders if you decide to install a complete upda limited number of specific glyphs contained in the special \LaTeX\ \texttt{picture} fonts. % - \item Quarter circles were also limited in their radii for the same - reason. + \item Quarter circles radii were also limited for the same reason. % \item Ovals (rectangles with rounded corners) could not be too small because of the unavailability of small radius quarter circles, nor @@ -211,7 +211,7 @@ Remember to delete all these subfolders if you decide to install a complete upda rounded corners remained the same and would not increase proportionally to the oval size. % - \item Vector arrows had only one possible shape and matched the limited + \item Vector tips had only one possible shape and matched the limited number of vector slopes. % \item For circles and inclined lines and vectors just two possible @@ -243,13 +243,22 @@ Remember to delete all these subfolders if you decide to install a complete upda straight, curved, vertical, horizontal, arrow tipped, et cetera. \end{enumerate} - This specific extension package \pack{curve2e} adds the following features. + This specific extension package \pack{curve2e} adds the following + features. \begin{enumerate}[noitemsep] - \item Point coordinates my be specified in both cartesian and polar +% + \item Point coordinates can be specified with macros; this is similar + to “naming” points; it eases editing the user's graphic work, because + points that are used several times are specified with a single macro; + it also eases the transmission of coordinates between different macros + and environments. It is also important for the following feature, i.e. + the user possibility to use coordinates in both cartesian or polar form. +% + \item Point coordinates my be specified in both cartesian and polar form: internally they are handled as cartesian coordinates, but the user can specify his/her points also in polar form. In order to avoid - confusion with other graphic packages, \pack{curve2e} uses the usual comma - separated couple \meta{$x,y$} of integer or fractional numbers for + confusion with other graphic packages, \pack{curve2e} uses the usual + comma separated couple \meta{$x,y$} of integer or fractional numbers for cartesian coordinates, and the couple \meta{$\theta$}:\meta{$\rho$} for polar coordinates (the angle preceding the radius). All graphic object commands accept polar or cartesian coordinates at @@ -258,10 +267,10 @@ Remember to delete all these subfolders if you decide to install a complete upda as to accept cartesian or polar coordinates. Of course the user should pay attention to the meaning of cartesian - vs. polar coordinates. Both imply a displacement with respect to the - actual origin of the axes. So when a circle is placed at coordinates - $a,b$ with a normal |\put| command, the circle is placed exactly in - that point; with a normal |\put| command the same happens if + vs.~polar coordinates. Both imply a displacement with respect to the + actual origin of the axes. So when a circle center is placed at + coordinates $a,b$ with a normal |\put| command, the circle is placed + exactly in that point; with a normal |\put| command the same happens if coordinates $\alpha{:}\rho$ are specified. But if the |\put| command is nested into another |\put| command, the current origin of the axes is displaced — this is obvious and the @@ -269,13 +278,13 @@ Remember to delete all these subfolders if you decide to install a complete upda is specified so that its ending point is at a specific distance and in specific direction form its starting point, polar coordinates appear to be the most convenient to use; in this case, though, the origin of the - axes becomes the stating point of the segment, therefore the segment + axes becomes the starting point of the segment, therefore the segment might be drawn in a strange way. Attention has been paid to avoid such misinterpretation, but maybe some unusual situation may not have come to my mind; feedback is very welcome. Meanwhile pay attention when you use polar coordinates. % -\item Most if not all cartesian coordinate pairs and slope pairs are +\item At user level most if not all coordinate pairs and slope pairs are treated as \emph{ordered pairs}, that is \emph{complex numbers}; in practice the user does not notice any difference from what s/he was used to, but all the mathematical treatment to be applied to these @@ -293,21 +302,21 @@ Remember to delete all these subfolders if you decide to install a complete upda \item Originally the |\line| macro was redefined so as to allow large (up to three digits) integer direction coefficients, but maintaining the same syntax as in the original \texttt{picture} environment; now - \pack{pict2e} removes the integer number limitations and allows fractional - values, initially implemented by \pack{curve2e}. + \pack{pict2e} removes the integer number limitations and allows + fractional values, initially implemented by \pack{curve2e}. % - \item A new macro |\Line| was originally defined by \pack{curve2e} so as to - avoid the need to specify the horizontal projection of inclined lines; - now this functionality is available directly with \pack{pict2e}; but this - \pack{curve2e} macro name now conflicts with \pack{pict2e} 2009 version; - therefore its name is changed to |\LIne| and supposedly it will not be - used very often, if ever, by the end user (but it is used within this - package macros). + \item A new macro |\Line| was originally defined by \pack{curve2e} so + as to avoid the need to specify the horizontal projection of inclined + lines; now this functionality is available directly with \pack{pict2e}; + but this \pack{curve2e} macro name now conflicts with the \pack{pict2e} + 2009 version; therefore its name is changed to |\LIne| and supposedly it + will not be used very often, if ever, by the end user (but it is used + within this package macros). % \item A new macro |\LINE| was defined in order to join two points specified with their coordinates; this is now the normal behaviour of - the |\Line| macro of \pack{pict2e} so that in this package |\LINE| is now - renamed |\segment|; there is no need to use the |\put| command with + the |\Line| macro of \pack{pict2e}, so that in this package |\LINE| is + now renamed |\segment|; there is no need to use the |\put| command with this segment specification. % \item A new macro |\DashLine| (alias: |\Dline|) is defined in order to @@ -315,31 +324,36 @@ Remember to delete all these subfolders if you decide to install a complete upda gap (equal to one another) get specified through one of the macro arguments.The starting point may be specified in cartesiano or polar form; the end point in cartesian format specifies the desired end - point; while if the second point is in polar form it is meant + point; but, if the second point is in polar form, it is meant \emph{relative to the starting point}, not as an absolute end point. See the examples further on. % \item A similar new macro |\Dotline| is defined in order to draw dotted straight lines as a sequence of equally spaced dots, where the gap can be specified by the user; such straight line may have any inclination, - as well as the above dashed lines.Polar coordinates for the second + as well as the above dashed lines. Polar coordinates for the second point have the same relative meaning as specified for the |\Dashline| - macro. The dot diameter may be specified with an optional argument; by default this diameter equals the |1pt| width. + macro. The dot diameter may be specified with an optional argument; by + default this diameter equals the |1pt| width. % \item Similar macros are redefined for vectors; |\vector| redefines the - original macro but with the vector slope limitations removed; |\Vector| + original macro but with the vector slope limitations removed and the + vector direction may be given in polar form; |\Vector| gets specified with its two horizontal and vertical components in analogy with |\LIne|; |\VECTOR| joins two specified points (without - using the |\put| command) with the arrow pointing to the second point. + using the |\put| command) with the arrow pointing to the second point. + |\VVECTOR| may be available if used with a sufficiently recent \LaTeX\ + kernel version; is draws a vector, with arrow tips at both ends, + between two given points % \item A new macro |\polyline| for drawing polygonal lines is defined that accepts from two vertices up to an arbitrary (reasonably limited) - number of them (available now also in \pack{pict2e}); here it is redefined - so as to allow an optional specification of the way segments for the - polyline are joined to one another. Vertices may be specified with - polar coordinates and are always relative to the preceding point. + number of them (available now also in \pack{pict2e}); here it is + redefined so as to allow an optional specification of the way segments + for the polyline are joined to one another. Vertices may be specified + with polar coordinates and are always relative to the preceding point. % - \item The \pack{pict2e} |polygon| macro to draw closed polylines (in + \item The \pack{pict2e} |polygon| macro draws closed polylines (in practice general polygons) has been redefined in such a way that it can accept the various vertices specified with (relative) polar coordinates. The |polygon*| macro produces a color filled polygon; the @@ -351,8 +365,8 @@ Remember to delete all these subfolders if you decide to install a complete upda arbitrary radius and arbitrary aperture (angle amplitude); this amplitude is specified in sexagesimal degrees, not in radians; a similar functionality is now achieved with the |\arc| macro of - \pack{pict2e}, which provides also the starred version |\arc*| that fills - up the interior of the generated circular arc with the current color. + \pack{pict2e}, which provides also the starred version |\arc*| that + fills up with the current color the sector generated by circular arc. It must be noticed that the syntax is slightly different, so that it's reasonable that these commands, in spite of producing identical arcs, might be more comfortable with this or that syntax. @@ -387,16 +401,16 @@ Remember to delete all these subfolders if you decide to install a complete upda The \pack{pict2e} package already defines macros such as |\moveto|, |\lineto|, |\curveto|, |\closepath|, |\fillpath|, and |\strokepath|; + |curve2e| just redefines them so as to accept also polar coordinates; of course these macros can be used by the end user, and sometimes they perform better than the macros defined in this package, because the user has a better control on the position of the Bézier splines - control points, while here the control points are sort of rigid. It - would be very useful to resort to the \pack{hobby} package, but its macros - are compatible with those of the \pack{tikz} and \pack{pgf} packages, not - with\pack{curve2e}; an interface should be created in order to deal with - the \pack{hobby} package, but this has not been done yet. - In any case they are redefined so as to accept symbolic names for the - point coordinates in both the cartesian and polar form. + control points; in this case the control points are sort of rigid. It + would be very useful to resort to the \pack{hobby} package, but its + macros are compatible with those of the \pack{tikz} and \pack{pgf} + packages, not with\pack{curve2e}; an interface should be created in + order to deal with the \pack{hobby} package, but this has not been + done yet. In order to make the necessary calculations many macros have been defined so as to use complex number arithmetics to manipulate point @@ -406,7 +420,7 @@ Remember to delete all these subfolders if you decide to install a complete upda believed to be more efficient than those defined by the \texttt{trig} package; in any case the macro names were sufficiently different to accommodate both definition sets in the same \LaTeX\ run. With the - progress of the \LaTeX\,3 language, package \pack{xfp} has recently become + progress of the \LaTeX\,3 language, package \pack{xfp} has become available, by which any sort of calculations can be done with floating point decimal numbers; therefore the most common algebraic, irrational and transcendental functions can be computed in the background with the @@ -423,7 +437,8 @@ Remember to delete all these subfolders if you decide to install a complete upda package. The |\Curve| algorithm, as said before, might be redefined so as to use the macros introduced by the \pack{hobby} package, that implements for the \pack{tikz} and \pack{pgf} packages the same - functionalities that John Hobby implemented for the \MF\ and \MP\ programs. + functionalities that John Hobby implemented for the \MF\ and \MP\ + programs. For these reasons I suppose that every enhancement should be submitted to Gäßlein, Niepraschk, and Tkadlec who are the prime maintainers of @@ -438,14 +453,14 @@ Remember to delete all these subfolders if you decide to install a complete upda the following modifications and the following new commands. \begin{enumerate}[noitemsep] \item This package \pack{curve2e} calls directly the \LaTeX\ packages - |color| and \pack{pict2e}; it passes to the latter one any possible option that - it can receive; actually the only options that make sense for - \pack{pict2e} are those concerning the arrow tips, either \LaTeX\ or - PostScript styled, because it is assumed that if this package is used, - the original \LaTeX\ commands are of no interest: see the - \pack{pict2e} documentation in order to see the correct options \pack{pict2e} - can receive. If the user wants to use the \pack{xcolor} package, it has to - load this one \emph{before} \pack{curve2e}. + |color| and \pack{pict2e}; it passes to the latter one any possible + option that it can receive; actually the only options that make sense + for \pack{pict2e} are those concerning the arrow tip shapes, either + \LaTeX\ or PostScript styled, because it is assumed that if this + package is used, the original \LaTeX\ commands are of no interest: see + the \pack{pict2e} documentation in order to find the correct options + \pack{pict2e} can receive. If the user wants to use the \pack{xcolor} + package, it has to load it \emph{before} \pack{curve2e}. %% \item The user is offered new commands in order to control the line terminators and the line joins; specifically: @@ -466,12 +481,12 @@ Remember to delete all these subfolders if you decide to install a complete upda together with |\defaultlinethickness| always redefine the internal |\@wholewidth| and |\@halfwidth| so that the latter ones always refer to a full width and to a half of it in this way: if you issue - the command {\setfontsize{8.75}|\defaultlinethickness{2pt}|} all thin lines will be - drawn with a thickness of 1\,pt while, if a drawing command - directly refers to the internal value |\@wholewidth|, its line - will be drawn with a thickness of 2\,pt. If one issues the + the command {\setfontsize{8.75}|\defaultlinethickness{2pt}|} all thin + lines will be drawn with a thickness of 1\,pt while, if a drawing + command directly refers to the internal value |\@wholewidth|, its + line will be drawn with a thickness of 2\,pt. If one issues the declaration |\thinlines| all lines will be drawn with - a 1\,pt width, but if a command refers to the internal value + a 1\,pt width, but if a command refers to the internal value |\@halfwidth| the line will be drawn with a thickness of 0.5\,pt. The command |\linethickness| redefines the above internals but does not change the default width value; all these width @@ -489,17 +504,17 @@ Remember to delete all these subfolders if you decide to install a complete upda %% \item Straight lines and vectors are redefined in such a way that fractional slope coefficients may be specified; the zero length - line does not produce errors and is ignored; the zero length vectors draw - only the arrow tips. + line does not produce errors and is ignored; the zero length vectors + draw only the arrow tips. %% \item New line and vector macros are defined that avoid the necessity of specifying the horizontal component; |\put(3,4){\LIne(25,15)}| specifies a segment that starts at point $(3,4)$ and goes to point $(3+25,4+15)$; the command |\segment(3,4)(28,19)| achieves the same result without the need of using the |\put| command. Therefore |\LIne| - is just for internal usage, rather than a user command. Now \pack{curve2e} - has available also the “arc vectors” with the arrow tip at one or at both - ends. + is just for internal usage, rather than a user command. Now + \pack{curve2e} has available also the “arc vectors” with the arrow tip + at one or at both ends. The same applies to the vector commands |\Vector| and |\VECTOR| and |\VVECTOR|; the latter command behaves as |\VECTOR| but draws a vector @@ -525,7 +540,7 @@ Remember to delete all these subfolders if you decide to install a complete upda also shown\fi.}\label{fig:vectors} \end{figure} %% - \item The |\polyline| command has already been introduced in \pack{pict2e}: in \pack{curve2e} it is redefined so as to accept also polar coordinates this new version of |\polyline| accepts also an optional argument to specify how two consecutive segments join together;; it accepts an unlimited list of point coordinates, possibly stored in macros, enclosed within round parentheses; the command draws a sequence of connected segments that join in order the specified points; the syntax is: + \item The |\polyline| command has already been introduced in \pack{pict2e}: in \pack{curve2e} it is redefined so as to accept also polar coordinates; this new version of |\polyline| accepts also an optional argument to specify how two consecutive segments join together; it accepts an unlimited list of point coordinates, possibly stored in macros, enclosed within round parentheses; the command draws a sequence of connected segments that join in order the specified points; the syntax is: \begin{flushleft} \cs{polyline}\oarg{optional join style}\parg{$P_1$}\parg{$P_2$}\texttt{...}\parg{$P_n$} \end{flushleft} @@ -555,9 +570,9 @@ Remember to delete all these subfolders if you decide to install a complete upda \AutoGrid(40,30) \Zbox(40,0)[l]{40,0}[1] \Zbox(90:30)[bc]{90{:}30}[1] -\Zbox(60:30)[bc]{60{:}30}[1] +\Zbox(45:30)[bc]{45{:}30}[1] \Zbox(30,30)[bc]{30,30}[1] -\multiput(0,0)(30:10){5}% +\multiput(0,0)(20:10){5}% {\makebox(0,0){\rule{1.5mm}{1.5mm}}} \end{picture} \end{Esempio} @@ -677,22 +692,24 @@ Remember to delete all these subfolders if you decide to install a complete upda starting at the grid lower right vertex.} \label{fig:dottedlines} \end{figure} -%%>>> +%% \item |\GraphGrid| and |\AutoGrid| are commands that draw a red grid - under the drawing with lines separated |10\unitlength|s apart; it is - described only with a comma separated couple of numbers, representing the - base and the height of the grid, see figure~\ref{fig:dashline}; it's - better to specify multiples of ten and the grid can be placed anywhere in - the drawing canvas by means of |\put|, whose cartesian coordinates are - multiples of 10; nevertheless the grid line distance is rounded to the - nearest multiple of 10, while the point coordinates specified to |\put| - are not rounded at all; therefore some care should be used to place the - working grid on the drawing canvas. This grid is intended as an aid - while drawing; even if you sketch your drawing on millimetre paper, the - drawing grid turns out to be very useful; one must only delete or - comment out the command when the drawing is finished. Several examples - of usage of such grid are shown in several figures. |\Autogrid| does not - require arguments; if the latter are specified they are simply ignored. + under the drawing with lines separated |10\unitlength|s apart; it is + described only with a comma separated couple of numbers, representing + the base and the height of the grid, see figure~\ref{fig:dashline}; it's + better to specify multiples of ten and the grid can be placed anywhere + in the drawing canvas by means of |\put|, whose cartesian coordinates + are multiples of 10; nevertheless the grid line distance is rounded to + the nearest multiple of 10, while the point coordinates specified to + |\put| are not rounded at all; therefore some care should be used to + place the working grid on the drawing canvas. This grid is intended as + an aid while drawing; even if you sketch your drawing on millimetre + paper, the drawing grid turns out to be very useful; one must only + delete or comment out the command when the drawing is finished. Several + examples of usage of such grid are shown in several figures. |\Autogrid| + does not require arguments, but requires the canvas dimensions and + offsets to be specified as multiples of~10; if the latter are specified + they are simply ignored. %% \item New trigonometric function macros have been computed by means of the functionalities of the |xfp| package. The difference with the other @@ -743,8 +760,10 @@ Remember to delete all these subfolders if you decide to install a complete upda %% \item A multitude of commands have been defined in order to manage complex numbers; actually complex numbers are represented as a comma - separated pair of fractional numbers (here we use only cartesian - coordinates). They are used to address specific points in the drawing + separated pair of fractional numbers; internally these macros use + cartesian we use only the cartesian form, and output, unless + differently specified is also in cartesian form; but input can be in + polar form. They are used to address specific points in the drawing plane, but also as operators so as to scale and rotate other objects. In the following \meta{vector} means a comma separated pair of fractional numbers, \meta{vector macro} means a macro that contains a @@ -782,15 +801,15 @@ Remember to delete all these subfolders if you decide to install a complete upda \item |\DivVect|\meta{dividend vector}|by|\meta{divisor vector}|to|\meta{vector macro} (maintained for backwards compatibility) \end{itemize} %% - \item General curves can be drawn with the \pack{pict2e} macro |\curve| but - it requires the specification of the third-order Bézier-spline control - points; sometimes it's better to be very specific with the control - points and there is no other means to do a decent graph; sometimes the - curves to be drawn are not so tricky and a general set of macros can be - defined so as to compute the control points, while letting the user - specify only the nodes through which the curve must pass, and the - tangent direction of the curve in such nodes. Such commands are the - following: + \item General curves can be drawn with the \pack{pict2e} macro + |\curve| but it requires the specification of the third-order + Bézier-spline control points; sometimes it's better to be very + specific with the control points and there is no other means to + do a decent graph; sometimes the curves to be drawn are not so + tricky and a general set of macros can be defined so as to + compute the control points, while letting the user specify only + the nodes through which the curve must pass, and the tangent + direction of the curve in such nodes. Such commands are the following: \begin{itemize}[noitemsep] \item \cs{Curve} draws a sequence of arcs as explained above, using @@ -801,9 +820,9 @@ Remember to delete all these subfolders if you decide to install a complete upda but the driver between this code and the physical representation on paper or screen) assumes a straight line closure of the whole path. -\item \cs{Qurve} is similar to |\Curve|, but with second order (quadratic) - Bézier splines. The starred version fills the interior with the current - color. +\item \cs{Qurve} is similar to |\Curve|, but with second order +(quadratic) Bézier splines. The starred version fills the interior +with the current color. \item \cs{CurveBetween} draws a single cubic Bézier spline between two given nodes and with two given directions vectors. @@ -816,6 +835,40 @@ Remember to delete all these subfolders if you decide to install a complete upda \end{itemize} +% le equazioni parametriche del cuore, da stackexchange, sono +%\def\x(#1){sin(#1)^3} +%\def\y(#1){(13*cos(#1)-5*cos(2*#1)-2*cos(3*#1)-cos(4*#1))/16} +% Varrebbe a penda di provarle con curve2e +% + \begin{figure}[!htp] +\begin{Esempio}[\small]% + \unitlength=8mm\relax + \begin{picture}(5,5) + \put(0,0){\framebox(5,5){}}\thicklines\roundcap + \Curve(2.5,0)<0.1,1>(5,3.5)<0,1>% + (4,5)<-1,0>(2.5,3.5)<-0.1,-1.2>[-0.1,1.2]% + (1,5)<-1,0>(0,3.5)<0,-1>(2.5,0)<0.1,-1> + \end{picture} +\end{Esempio} + \caption{A heart shaped curve with cusps drawn with \texttt{\string\Curve}} + \label{fig:curve} + +\vspace*{2\baselineskip} + +\begin{Esempio}[\small]% + \unitlength=8mm\relax + \begin{picture}(5,5) + \put(0,0){\framebox(5,5){}}\thicklines\roundcap + \color{green}\relax + \Curve*(2.5,0)<0.1,1>(5,3.5)<0,1>% + (4,5)<-1,0>(2.5,3.5)<-0.1,-1.2>[-0.1,1.2]% + (1,5)<-1,0>(0,3.5)<0,-1>(2.5,0)<0.1,-1> + \end{picture} +\end{Esempio} +\caption{Coloring the inside of a closed path drawn with \texttt{\string\Curve*}} +\label{fig:colored-curve} + \end{figure} + The main macro is |\Curve| and must be followed by an “unlimited” sequence of node-direction coordinates as a quadruple defined as @@ -828,7 +881,7 @@ Remember to delete all these subfolders if you decide to install a complete upda \mbox{\dots\parg{...}\aarg{...}\oarg{new direction vector}\parg{...}\aarg{...}\dots} \] - Possibly it is necessary to specify the “tension” or the “looseness” + Sometimes it is necessary to specify the “tension” or the “looseness” of a specific Bézier arc; such tension parameters range from 0 (zero) to~4; the zero value implies a very stiff arc, as if it was a string subject to a high tension (i.e. with zero looseness); a value of~4 @@ -846,7 +899,7 @@ Remember to delete all these subfolders if you decide to install a complete upda control the tension; not all commands for drawing cubic splines accept this optional tension specification.}: \[ -\mbox{\dots\parg{...}\aarg{\upshape{\em direction vector}\texttt{;}{\em start tension}|,|{\em end tension}}\parg{...}\aarg{...}\dots} +\mbox{\dots\parg{...}\Aarg{\meta{direction vector};\meta{start tension},\meta{end tension}}\parg{...}\aarg{...}\dots} \] The |\Curve| macro does not (still) have facilities for cycling the @@ -863,40 +916,6 @@ Remember to delete all these subfolders if you decide to install a complete upda it can be done with other programs or commands, as, for example, with \MF\ or the |pgf/tikz| package and environment. See figure~\ref{fig:curve} for an example. -% -% le equazioni parametriche del cuore, da stackexchange, sono -%\def\x(#1){sin(#1)^3} -%\def\y(#1){(13*cos(#1)-5*cos(2*#1)-2*cos(3*#1)-cos(4*#1))/16} -% Varrebbe a penda di provarle con curve2e -% - \begin{figure}[!htp] -\begin{Esempio}[\small]% - \unitlength=8mm\relax - \begin{picture}(5,5) - \put(0,0){\framebox(5,5){}}\thicklines\roundcap - \Curve(2.5,0)<0.1,1>(5,3.5)<0,1>% - (4,5)<-1,0>(2.5,3.5)<-0.1,-1.2>[-0.1,1.2]% - (1,5)<-1,0>(0,3.5)<0,-1>(2.5,0)<0.1,-1> - \end{picture} -\end{Esempio} - \caption{A heart shaped curve with cusps drawn with \texttt{\string\Curve}} - \label{fig:curve} - -\vspace*{2\baselineskip} - -\begin{Esempio}[\small]% - \unitlength=8mm\relax - \begin{picture}(5,5) - \put(0,0){\framebox(5,5){}}\thicklines\roundcap - \color{green}\relax - \Curve*(2.5,0)<0.1,1>(5,3.5)<0,1>% - (4,5)<-1,0>(2.5,3.5)<-0.1,-1.2>[-0.1,1.2]% - (1,5)<-1,0>(0,3.5)<0,-1>(2.5,0)<0.1,-1> - \end{picture} -\end{Esempio} -\caption{Coloring the inside of a closed path drawn with \texttt{\string\Curve*}} -\label{fig:colored-curve} - \end{figure} With the starred version of |\Curve|, instead of stroking the contour, the macro fills up the contour with the selected current color, @@ -1208,9 +1227,9 @@ Remember to delete all these subfolders if you decide to install a complete upda \label{fig:quadratic-arcs} \end{figure} - Notice that the previous version of \pack{curve2e} contained an error and - would color the outside of the green four-pointed star. - The |curve2e-v161|, attached to this bundle, has been corrected; + Notice that the previous version of \pack{curve2e} contained an error + and would color the outside of the green four-pointed star. + The |curve2e-v161| package, attached to this bundle, has been corrected; therefore it is not actually identical to the previous version, although the latter one performed correctly for everything else except for color-filled quadratic paths. @@ -1291,8 +1310,8 @@ Remember to delete all these subfolders if you decide to install a complete upda to zero). See the figure on page~\ref{pag:orologio} to inspect its usage. It is important to notice that if the command|\rotatebox| has to be used, as in the example of figure~\ref{pag:orologio}, the - package |graphics| should be also loaded, because \pack{curve2e} does not - do it. + package |graphicx| should be also loaded, because \pack{curve2e} does + not load it. \begin{figure}[!htb] \begin{minipage}{0.45\textwidth}\setfontsize{9.5}% @@ -1332,7 +1351,7 @@ Remember to delete all these subfolders if you decide to install a complete upda \item This implementation of \pack{curve2e} includes an extension to package |xfp|, in the sense that adds three more L3 commands: - |\fptest|, |\fpdowhile|, |fpwhiledo| to the two already contained and + |\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 @@ -1341,7 +1360,7 @@ Remember to delete all these subfolders if you decide to install a complete upda \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 + what to do if the \meta{test} is true, and what to do of the \meta{test} is false. The \meta{test} is a logical expressions that connects math relation expressions, even floating point ones, by means of \emph{logical @@ -1354,8 +1373,8 @@ Remember to delete all these subfolders if you decide to install a complete upda 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 + 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 on, @@ -1368,9 +1387,9 @@ Remember to delete all these subfolders if you decide to install a complete upda 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| + 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 + in the output stream something that might be nonsense. Cycles done with |\fpwhiledo| should be safer and should be preferred. Nevertheless such commands are very useful also for drawing graphics; @@ -1389,7 +1408,7 @@ y = f_2(t) We start by defining the Lissajous function with arguments to specify the parameter $t$, the sinusoid amplitudes $A_1, A_2$, - the respective “frequencies", by means of integer multiples of + the respective “frequencies”, by means of integer multiples of a unit pulsation, $N_1, N_2$, and the initial phases $\phi_1, \phi_2$ of such sinusoids. It is better to keep apart the input of the curve coefficients from the actual curve @@ -1434,7 +1453,7 @@ y = f_2(t) \end{flushleft} where \meta{$P_{\mathrm{out}}$} is a macro that gets defined with the cartesian coordinates of the computed output - point.Arguments \meta{in} (the $t$ parameter) and \meta{out} (the computed coordinates) need not be enclosed within braces if they are given as macros; actually the code shown in figure~\ref{fig:lissajous} shows such procedure that renders the input code simpler to read. + point. Arguments \meta{in} (the $t$ parameter) and \meta{out} (the computed coordinates) need not be enclosed within braces if they are given as macros; actually the code shown in figure~\ref{fig:lissajous} shows such procedure that renders the input code simpler to read. After this definition the diagram is plotted in figure~\ref{fig:lissajous}. @@ -1443,7 +1462,7 @@ y = f_2(t) \begin{Esempio}[\setfontsize{8.5}](0.55) \unitlength=0.01\linewidth \begin{picture}(100,100)(-50,-50) -\GraphGrid(-50,-50)(100,100) +\AutoGrid \VECTOR(-50,0)(50,0)\Pbox(50,0)[tr]{x}[0] \VECTOR(0,-50)(0,50)\Pbox(0,50)[tr]{y}[0] \Pbox(0,0)[tr]{O}[2] @@ -1487,20 +1506,21 @@ y = f_2(t) 2003, the first implementation of Lamport's extension was announced; the first version of this package \pack{curve2e} was issued in 2006. It was time to have a better drawing environment; this package - is a simple attempt to follow the initial path while further extending the - drawing facilities. + is a simple attempt to follow the initial path while further extending + the drawing facilities. There are other packages in the \textsc{ctan} archives that deal with tracing curves of various kinds. \pack{PSTricks} and \pack{pgf/tikz} are - the most powerful ones. And they are becoming the standard for programmed - drawing. - Their documentation is huge and the multitude of extra modules to perform - special tasks is countless. Therefore they are difficult to use; when the - user gets used to their particular syntax and got sufficient familiarity - with several modules, s/he can uses these bundles very comfortably. + the most powerful ones. And they are becoming the standard for + programmed drawing. + Their documentation is huge and the multitude of extra modules to + perform special tasks is countless. Therefore they are difficult to use; + when the user gets used to their particular syntax and got sufficient + familiarity with several modules, s/he can use these bundles very + comfortably. - This difficulty in getting a TikZ or PS expert is why I think a simpler - drawing machinery should be appreciated; I admit it: I like the + This difficulty in becoming a TikZ or PS expert is why I think a simpler + drawing machinery should be appreciated. I admit it: I like the \env{picture} environment; and I like to deal with simple codes so as to create my own macros. @@ -1508,16 +1528,16 @@ y = f_2(t) anything by using little dots or other symbols partially superimposed to one another. It uses only quadratic Bézier curves and the curve tracing is eased by specifying only the curve nodes, without specifying - the control nodes; with a suitable option to the package call, it is + the control nodes; with a suitable package option, it is possible to reduce the memory usage by using short straight segments drawn with the PostScript facilities offered by the |dvips| driver. - Another package, \pack{ebezier} performs about the same as \pack{curve2e} - but draws its Bézier curves by using little dots partially superimposed to - one another. The documentation is quite interesting since it - explains very clearly what exactly are the Bézier splines. Apparently - \pack{ebezier} should be used only for DVI output without recourse to - PostScript or PDF machinery. + Another package, \pack{ebezier} performs about the same as + \pack{curve2e} but draws its Bézier curves by using little dots + partially superimposed to one another. The documentation is quite + interesting since it explains very clearly what exactly are the Bézier + splines. Apparently \pack{ebezier} should be used only for DVI output + without recourse to PostScript or PDF machinery. The \pack{picture} package extends the performance of the \env{picture} environment (extended with \pack{pict2e}) by accepting coordinates @@ -1525,12 +1545,13 @@ y = f_2(t) |\unitlength|; it provides commands to extend that functionality to other packages. In certain circumstances it may be very useful. - Package \pack{xpicture} builds over the \env{picture} \LaTeX\ environment - so as to allow to draw the usual curves that are part of an - introductory analytic geometry course; lines, circles, parabolas, - ellipses, hyperbolas, and polynomials; the syntax is rather comfortable, - although it is not a simple extension of the \env{picture} own syntax; - for all these curves it uses the quadratic Bézier splines. + Package \pack{xpicture} builds over the \env{picture} \LaTeX\ + environment so as to allow to draw the usual curves that are part + of an introductory analytic geometry course; lines, circles, + parabolas, ellipses, hyperbolas, and polynomials; the syntax is + rather comfortable, although it is not a simple extension of the + \env{picture} own syntax; for all these curves it uses the quadratic + Bézier splines. Package \pack{hobby} extends the cubic Bézier spline handling with the algorithms John Hobby created for \MF\ and \MP. But by now this package @@ -1546,15 +1567,16 @@ y = f_2(t) errors and very kindly submitted them to me so that I was able to correct them. - Josef Tkadlec and the author collaborated extensively in order to implement - a better real long division so as to get correctly the quotient - fractional part and to avoid as much as possible any numeric overflow; - many Josef's ideas are incorporated in the macro that was implemented - in the previous version of this package, although the macro used by - Josef was slightly different. Both versions aim/aimed at a better - accuracy and at widening the operand ranges. In this version of - \pack{curve2e} we abandoned our long division macro, and substituted it - with the floating point division provided by the |xfp| package. + Josef Tkadlec and the author collaborated extensively in order to + implement a better real long division so as to get correctly the + quotient fractional part and to avoid as much as possible any numeric + overflow; many Josef's ideas are incorporated in the macro that was + implemented in the previous version of this package, although the + macro used by Josef was slightly different. Both versions aim/aimed + at a better accuracy and at widening the operand ranges. In this + version of \pack{curve2e} we abandoned our long division macro, and + substituted it with the floating point division provided by the |xfp| + package. Daniele Degiorgi spotted a fault in the kernel definition of |\linethickness| that heavily influenced also \pack{curve2e}; see in @@ -1563,9 +1585,14 @@ y = f_2(t) Thanks also to Jin-Hwan Cho and Juho Lee who suggested a small but crucial modification in order to have \pack{curve2e} work smoothly also with XeTeX (XeLaTeX). Actually if \pack{pict2e}, version 0.2x or - later dated 2009/08/05 or later, is being used, such modification is not - necessary any more, but it is true that it becomes imperative when legacy - versions were used. + later dated 2009/08/05 or later, is being used, such modification is + not necessary any more, but it is true that it becomes imperative when + legacy versions were used. + + Many thanks also to Ashish Kumar Das who spotted + an inconsistency in the design of vectors with PostScript style arrow + tips with large line width settings, that did not show up with \LaTeX\ + styled ones. \end{document} diff --git a/Master/texmf-dist/doc/latex/curve2e/curve2e.pdf b/Master/texmf-dist/doc/latex/curve2e/curve2e.pdf Binary files differindex 81441253bd5..a10b1b69d86 100644 --- a/Master/texmf-dist/doc/latex/curve2e/curve2e.pdf +++ b/Master/texmf-dist/doc/latex/curve2e/curve2e.pdf diff --git a/Master/texmf-dist/source/latex/curve2e/curve2e.dtx b/Master/texmf-dist/source/latex/curve2e/curve2e.dtx index 748a8e38d23..0367ab88e0b 100644 --- a/Master/texmf-dist/source/latex/curve2e/curve2e.dtx +++ b/Master/texmf-dist/source/latex/curve2e/curve2e.dtx @@ -27,7 +27,7 @@ README.txt and curve2e-v161.sty. \askforoverwritefalse \generate{\file{curve2e.sty}{\from{curve2e.dtx}{package}}} -\generate{\file{README.txt}{\from{curve2e.dtx}{readme}}} +%\generate{\file{README.txt}{\from{curve2e.dtx}{readme}}} \generate{\file{curve2e-v161.sty}{\from{curve2e.dtx}{v161}}} \def\tmpa{plain} @@ -46,7 +46,7 @@ README.txt and curve2e-v161.sty. %<+package>\ProvidesPackage{curve2e}% %<+readme>File README.txt for package curve2e %<*package|readme> - [2020-05-03 v.2.2.8 Extension package for pict2e] + [2020-10-03 v.2.2.10 Extension package for pict2e] %</package|readme> %<*driver> \documentclass{ltxdoc}\errorcontextlines=9 @@ -183,7 +183,7 @@ README.txt and curve2e-v161.sty. %</driver> % \fi % -% \CheckSum{5598} +% \CheckSum{5510} % \begin{abstract} % This file documents the |curve2e| extension package to the |pict2e| % bundle implementation; the latter was described by Lamport @@ -1093,89 +1093,21 @@ README.txt and curve2e-v161.sty. % for straight lines. % % We start with the redefinition of |\vector| and we use the machinery -% for vectors (as complex numbers) we used for |\line|. -% \begin{macrocode} - \def\vector(#1)#2{% - \begingroup - \GetCoord(#1)\d@mX\d@mY - \@linelen#2\unitlength -% \end{macrocode} -% As in \texttt{pict2e} we avoid tracing vectors if the slope parameters -% are both zero. -% \begin{macrocode} - \ifdim\d@mX\p@=\z@\ifdim\d@mY\p@=\z@\@badlinearg\fi\fi -% \end{macrocode} -% But we check only for the positive nature of the $l_x$ component; if it -% is negative, we simply change sign instead of blocking the typesetting -% process. This is useful also for macros |\Vector|, |\VECTOR|, and -% |\VVECTOR| to be defined in a while. -% \begin{macrocode} - \ifdim\@linelen<\z@ \@linelen=-\@linelen\fi -% \end{macrocode} -% We now make a vector with the given slope coefficients even if one or -% the other is zero and we determine its direction; the real and -% imaginary parts of the direction vector are also the values we need for -% the subsequent rotation. -% \begin{macrocode} - \MakeVectorFrom\d@mX\d@mY to\@Vect - \DirOfVect\@Vect to\Dir@Vect -% \end{macrocode} -% In order to be compatible with the original \texttt{pict2e} we need to -% transform the components of the vector direction into lengths with the -% specific names |\@xdim| and |\@ydim|^^A--------! Really necessary? -% \begin{macrocode} - \YpartOfVect\Dir@Vect to\@ynum \@ydim=\@ynum\p@ - \XpartOfVect\Dir@Vect to\@xnum \@xdim=\@xnum\p@ -% \end{macrocode} -% If the vector is really sloping we need to scale the $l_x$ component in -% order to get the vector total length; we have to divide by the cosine -% of the vector inclination which is the real part of the vector -% direction. -% We use the floating point division function; since it yields a -% “factor” that we directly use to scale the length of the vector. -% We finally memorise the true vector length in the internal dimension -% |@tdB| -% \begin{macrocode} - \ifdim\d@mX\p@=\z@ - \else\ifdim\d@mY\p@=\z@ - \else - \edef\sc@lelen{\fpeval{1 / abs(\@xnum)}}\relax - \@linelen=\sc@lelen\@linelen - \fi - \fi - \@tdB=\@linelen -% \end{macrocode} -% The remaining code is definitely similar to that of |pict2e|; -% the real difference consists in the fact that the arrow is designed by -% itself without the stem; but it is placed at the vector end; therefore -% the first statement is just the transformation matrix used by the -% output driver to rotate the arrow tip and to displace it the right -% amount. But in order to draw only the arrow tip we have to set the -% |\@linelen| length to zero. -% \begin{macrocode} -\pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim{\@xnum\@linelen}{\@ynum\@linelen}% - \@linelen\z@ - \pIIe@vector - \fillpath -% \end{macrocode} -% Now we can restore the stem length that must be shortened by the -% dimension of the arrow; by examining the documentation of -% |pict2e| we discover that we have to shorten it by an -% approximate amount of $AL$ (with the notations of \texttt{pict2e}, -% figs~10 and~11); the arrow tip parameters are stored in certain -% variables with which we can determine the amount of the stem -% shortening; if the stem was too short and the new length is negative, -% we avoid designing such a stem. -% \begin{macrocode} - \@linelen=\@tdB - \@tdA=\pIIe@FAW\@wholewidth - \@tdA=\pIIe@FAL\@tdA - \advance\@linelen-\@tdA - \ifdim\@linelen>\z@ - \moveto(0,0) - \pIIe@lineto{\@xnum\@linelen}{\@ynum\@linelen}% - \strokepath\fi - \endgroup} +% for vectors (as complex numbers) we used for |\line|. The actual point +% is to let |\vector| accept the slope parameters also in polar form. +% Therefore it suffices to save the original definition of |\vector| +% as defined in |pict2e| and and use it as a fallback after redefining +% |\vector| in a “vector” format.\footnote{The previous version 2.2.9 +% of this package contained a glitch that was visible only with line +% widths larger than 1.5\.pt. I thank very much Ashish Kumar Das who +% spotted this glitch and kindly informed me.} +% \begin{macrocode} +\let\original@vector\vector +\def\vector(#1)#2{% + \begingroup + \GetCoord(#1)\d@mX\d@mY + \original@vector(\d@mX,\d@mY){\fpeval{round(abs(#2),6)}}% + \endgroup}% % \end{macrocode} % % We define the macro that does not require the specification of the @@ -1229,7 +1161,7 @@ README.txt and curve2e-v161.sty. %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % We now define the polygonal line macro; its syntax is very simple: % \begin{flushleft}\ttfamily -% \cs{polygonal}\oarg{join}\parg{$P_0$}\parg{$P_1$}\parg{$P_2$}...^^A +% \cs{polyline}\oarg{join}\parg{$P_0$}\parg{$P_1$}\parg{$P_2$}...^^A %\parg{$P_n$} % \end{flushleft} % Remember: |\polyline| has been incorporated into |pict2e| 2009, but we @@ -3153,8 +3085,9 @@ curve2e.pdf curve2e-manual.pdf README.txt +If you install curve2e without using your TeX system package handler, Compile curve2e.dtx and curve2e-manual.tex two or three times until -all labels and citation keys are completely resolved. +all labels and citation keys are completely resolved. Then move the primary and derived files as follows: Move curve2e.dtx and curve2e-manual.tex to ROOT/source/latex/curve2e/ Move curve2e.pdf and curve2e-manual.pdf to ROOT/doc/latex/curve2e/ @@ -3162,21 +3095,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, it 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. @@ -3185,15 +3120,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 @@ -3221,7 +3156,7 @@ If you specify the package pict2e is automatically invoked with the specified options. The -almost fully compatible- phrase is necessary to explain that this -version of curve2e uses some `functions' of the LaTeX3 language that were +version of curve2e uses some "functions" of the LaTeX3 language that were made available to the LaTeX developers by mid October 2018. Should the user have an older or a basic/incomplete installation of the TeX system, such L3 functions might not be available. This is why this diff --git a/Master/texmf-dist/tex/latex/curve2e/curve2e.sty b/Master/texmf-dist/tex/latex/curve2e/curve2e.sty index ae0e7bcea1d..0d7ccaa42da 100644 --- a/Master/texmf-dist/tex/latex/curve2e/curve2e.sty +++ b/Master/texmf-dist/tex/latex/curve2e/curve2e.sty @@ -11,7 +11,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2019/01/01] \ProvidesPackage{curve2e}% - [2020-05-03 v.2.2.8 Extension package for pict2e] + [2020-10-03 v.2.2.10 Extension package for pict2e] \IfFileExists{xfp.sty}{% \RequirePackage{color} \RequirePackageWithOptions{pict2e}[2014/01/01] @@ -199,37 +199,12 @@ } }}\ignorespaces } - \def\vector(#1)#2{% - \begingroup - \GetCoord(#1)\d@mX\d@mY - \@linelen#2\unitlength - \ifdim\d@mX\p@=\z@\ifdim\d@mY\p@=\z@\@badlinearg\fi\fi - \ifdim\@linelen<\z@ \@linelen=-\@linelen\fi - \MakeVectorFrom\d@mX\d@mY to\@Vect - \DirOfVect\@Vect to\Dir@Vect - \YpartOfVect\Dir@Vect to\@ynum \@ydim=\@ynum\p@ - \XpartOfVect\Dir@Vect to\@xnum \@xdim=\@xnum\p@ - \ifdim\d@mX\p@=\z@ - \else\ifdim\d@mY\p@=\z@ - \else - \edef\sc@lelen{\fpeval{1 / abs(\@xnum)}}\relax - \@linelen=\sc@lelen\@linelen - \fi - \fi - \@tdB=\@linelen -\pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim{\@xnum\@linelen}{\@ynum\@linelen}% - \@linelen\z@ - \pIIe@vector - \fillpath - \@linelen=\@tdB - \@tdA=\pIIe@FAW\@wholewidth - \@tdA=\pIIe@FAL\@tdA - \advance\@linelen-\@tdA - \ifdim\@linelen>\z@ - \moveto(0,0) - \pIIe@lineto{\@xnum\@linelen}{\@ynum\@linelen}% - \strokepath\fi - \endgroup} +\let\original@vector\vector +\def\vector(#1)#2{% + \begingroup + \GetCoord(#1)\d@mX\d@mY + \original@vector(\d@mX,\d@mY){\fpeval{round(abs(#2),6)}}% + \endgroup}% \def\Vector(#1){{% \GetCoord(#1)\@tX\@tY \ifdim\@tX\p@=\z@ |