summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/curve2e/curve2e.dtx
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2006-11-25 01:18:43 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2006-11-25 01:18:43 +0000
commit1bd799706928befd9841f464f5a77628c0e1410f (patch)
tree28903d09f7e3ffb8b4520ca05dd8d7246be093d7 /Master/texmf-dist/source/latex/curve2e/curve2e.dtx
parent13498066deeb9fbb37c453e3e1bca4ebee464f4d (diff)
update active.conf and curve2e.
git-svn-id: svn://tug.org/texlive/trunk@2510 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/curve2e/curve2e.dtx')
-rw-r--r--Master/texmf-dist/source/latex/curve2e/curve2e.dtx79
1 files changed, 44 insertions, 35 deletions
diff --git a/Master/texmf-dist/source/latex/curve2e/curve2e.dtx b/Master/texmf-dist/source/latex/curve2e/curve2e.dtx
index 0bfb7205754..5b2aeb5e9ca 100644
--- a/Master/texmf-dist/source/latex/curve2e/curve2e.dtx
+++ b/Master/texmf-dist/source/latex/curve2e/curve2e.dtx
@@ -1,12 +1,12 @@
% \iffalse
%%
%% File `curve2e.dtx'.
-%% Copyright (C) 2005 Claudio Beccari all rights reserved.
+%% Copyright (C) 2005--2006 Claudio Beccari all rights reserved.
%%
% What follows is the usual trick that is not typeset in the documentation
-% dvi file that is produced by LaTeX; It is used to define the date, the version
-% and the short descriptio that characterizes both this file and the package;
-% the point is that |\ProvicesFile| is being read only by the driver, while
+% dvi file that is produced by LaTeX. It is used to define the date, the version
+% and the short description that characterizes both this file and the package;
+% the point is that |\ProvidesFile| is being read only by the driver, while
% |\ProvidePackage| goes to the stripped package file; It must be done before
% starting the documentation otherwise |\GetFileInfo| can't get the necessary
% information.
@@ -19,7 +19,7 @@
\ProvidesFile{curve2e.dtx}%
%</driver>
%<+package>\ProvidesPackage{curve2e}%
- [2005/08/15 v.0.10 Extension package for pict2e]
+ [2006/11/20 v.0.20 Extension package for pict2e]
%<*package>
% \end{macrocode}
%</package>
@@ -43,7 +43,7 @@
%</driver>
% \fi
%
-% \CheckSum{0}
+% \CheckSum{2214}
% \begin{abstract}
% This file documents the |curve2e| extension package to the recent
% implementation of the |pict2e| bundle that has been described by Lamport
@@ -93,11 +93,11 @@
% numbers; they need not be relatively prime;
% \item filled and unfilled circles can be of any size;
% \item ovals can be designed with any specified corner curvature and there is
-% virtually no limitation to such curvatures; of course corner radii should not
+% virtually no limitation to such curvatures; of course corner radii should not
% exceed half the lower value between the base and the hight of the oval;
% \item there are two shapes for the arrow tips; the triangular one traditional
% with \LaTeX\ vectors, or the arrow tip with PostScript style.
-% \item the |\linethicknes| command changes the thicknes of all lines, straight,
+% \item the |\linethickness| command changes the thickness of all lines, straight,
% curved, vertical, horizontal, arrow tipped, et cetera.
% \end{enumerate}
%
@@ -196,7 +196,7 @@
% Next we define some new dimension registers that will be used by the
% subsequent macros; should they be already defined, there will not be any
% redefinition; nevertheless the macros should be sufficiently protected so as
-% avoid overwriting register values loaded by other macro fpackages.
+% to avoid overwriting register values loaded by other macro packages.
% \begin{macrocode}
\ifx\undefined\@tdA \newdimen\@tdA \fi
\ifx\undefined\@tdB \newdimen\@tdB \fi
@@ -251,7 +251,7 @@
\@linelen #2\unitlength
\ifdim\@linelen<\z@\@badlinearg\else
% \end{macrocode}
-% but as soon as it is verified that the line length is not zero, things
+% but as soon as it is verified that the line length is not negative, things
% change remarkably; in facts the machinery for complex numbers is invoked:
% |\DirOfVect| takes the only macro argument (that actually contains a comma
% separated pair of fractional numbers) and copies it to |\Dir@line| (an
@@ -276,7 +276,7 @@
\fi
% \end{macrocode}
% Finally the \texttt{moveto}, \texttt{lineto} and \texttt{stroke} language
-% keywords are involed by means of the internal \texttt{pict2e} commands in
+% keywords are invoked by means of the internal \texttt{pict2e} commands in
% order to draw the line. Notice that even vertical lines are drawn with the
% ``PostScript'' commands instead of resorting to the dvi low level language
% that was used both in \texttt{pict2e} and in the original \texttt{picture}
@@ -304,7 +304,7 @@
% The redifinitions and the new definitions for vectors are a little more
% complicated than with segments, because each vector is drawn as a filled
% contour; the original \texttt{pict2e} macro checks if the slopes are
-% corrsponding to the limitations specified by Lamport (integer three digit
+% corresponding to the limitations specified by Lamport (integer three digit
% signed numbers) and sets up a transformation in order to make it possible to
% draw each vector as an horizontal left-to-right arrow and then to rotate it by
% its angle about its tail point; actually there are two macros for tracing the
@@ -357,7 +357,7 @@
% to get the vector total length; we have to divide by the cosine of the vector
% inclination wich is the real part of the vector direction. I use my division
% macro; since it yields a ``factor'' I directly use it to scale the lenght of
-% the vector. I finally memorize the true vector lenth in the internal
+% the vector. I finally memorize the true vector length in the internal
% dimension |@tdB|
% \begin{macrocode}
\ifdim\d@mX\p@=\z@
@@ -384,7 +384,7 @@
% Now we can restore the stem lenght that must be shortened by the dimension of
% the arrow; examinimng the documentation of \texttt{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 paramenters are stored in
+% \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
% refrain from designing such stem.
@@ -404,17 +404,21 @@
% or the $l_x$ lenght component; the way the new |\vector| macro works does not
% actually require this specification, because \TeX\ can compute the vector
% length, provided the two direction components are exacly the horizontal and
-% vertical vector components.
+% vertical vector components. If the horizontal component is zero, the actual lenght
+% must be specified as the vertical component.
% \begin{macrocode}
-\def\Vector(#1,#2){\vector(#1,#2){#1}}
+\def\Vector(#1,#2){%
+\ifdim#1\p@=\z@\vector(#1,#2){#2}
+\else
+\vector(#1,#2){#1}\fi}
% \end{macrocode}
%
% On the opposite the next macro specifies a vector by means of the coordinates
% of its end points; the first point is where the vector starts, and the second
-% point is the arrow side.
+% point is the arrow tip side. We need the difference as these two coordinates,because % it represents the actual vector.
% \begin{macrocode}
\def\VECTOR(#1)(#2){\begingroup
-\SubVect#1 from #2 to \@tempa
+\SubVect#1from#2to\@tempa
\expandafter\put\expandafter(#1){\expandafter\Vector\expandafter(\@tempa)}%
\endgroup\ignorespaces}
% \end{macrocode}
@@ -848,7 +852,7 @@
\@tempcnta=5\relax
\@whilenum\@tempcnta>\z@\do{\DividE\@tempdima by\@tempdimb to\@T
\advance\@tempdimb \@T\p@ \@tempdimb=.5\@tempdimb
- \advance\@tempcnta\m@ne}%\
+ \advance\@tempcnta\m@ne}%
\@tempdimc=\@T\@tempdimc
\fi
\Numero#2\@tempdimc
@@ -992,7 +996,9 @@
% \end{macrocode}
%
% \subsection{Arcs and curved vectors}
-% We are now in the position of really doing graphic work We start with tracing
+% We are now in the position of really doing graphic work.
+% \subsubsection{Arcs}
+% We start with tracing
% a circular arc of arbitrary center, arbitrary starting point and arbitrary
% aperture; The first macro checks the aperture; if this is not zero it
% actually proceeds with the necessary computations, otherwise it does
@@ -1052,7 +1058,7 @@
\def\@@Arc{%
\pIIe@moveto{\@pPunX\unitlength}{\@pPunY\unitlength}%
% \end{macrocode}
-% If the aperture is larger than $180^\circ$ it traces a semicircle in thr
+% If the aperture is larger than $180^\circ$ it traces a semicircle in the
% right direction and correspondingly reduces the overall aperture.
% \begin{macrocode}
\ifdim\@tdA>180\p@
@@ -1072,14 +1078,14 @@
\CopyVect\@sPun to\@pPun
\fi
% \end{macrocode}
-% If the remaining aperture is not zero it contiues tracing the rest of the arc.
+% If the remaining aperture is not zero it continues tracing the rest of the arc.
% Here we need the extrema of the arc and the coordinates of the control points
% of the Bézier cubic spline that traces the arc. The control points lay on the
-% perpendicular to the vectors that join the arc center to the stating
+% perpendicular to the vectors that join the arc center to the starting
% and end points respectively. Their distance $K$ from the adiacent nodes is
% determined with the formula
% \[
-% K= \frac{4}{3}(1-\cos\theta)R
+% K= \frac{4}{3}\,\frac{1-\cos\theta}{\sin\theta}R
% \]
% where $\theta$ is half the arc aperture and $R$ is its radius.
% \begin{macrocode}
@@ -1118,12 +1124,13 @@
\fi}
% \end{macrocode}
%
+% \subsubsection{Arc vectors}
% We exploit much of the above definitions for the |\Arc| macro for drawing
% circular arcs with an arrow at one or both ends; the first macro
% |\VerctorArc| draws an arrow at the ending point of the arc; the second macro
% |\VectorARC| draws arrows at both ends; the arrows have the same shape as
% those for vectors; actually they are drawn by putting a vector of zero
-% length at the proper arc end(s), thereore they are styled as traditional or
+% length at the proper arc end(s), therefore they are styled as traditional or
% PostScript arrows according to the option of the \texttt{pict2e} package.
%
% But the specific drawing done here shortens the arc so as not to overlap on
@@ -1139,8 +1146,8 @@
% attached;(d) tiltilng the arrow tip by half its angular amplitude; (e)
% determining the resulting position and direction of the arrow tip so as to
% draw a zero length vector; (f) possibly repeating the same procedure for the
-% other end of the arc; shortening the total arc angular amplitude by the
-% amount of the arrow tip(s) already set, and then drawing the final circular
+% other end of the arc; (g) shortening the total arc angular amplitude by the
+% amount of the arrow tip(s) already set, and (h) then drawing the final circular
% arc that joins the starting point to the final arrow or one arrow to the other
% one.
%
@@ -1161,13 +1168,17 @@
% \end{macrocode}
% The single arrowed arc is defined with the following long macro where all the
% described operations are performed more or less in the described succession;
-% probably the macro requires a little cleaning, but since it work fine I did
+% probably the macro requires a little cleaning, but since it works fine I did
% not try to optimize it for time or number of tokens. The final part of the
% macro is almost identical to that of the plain arc; the beginning also is
-% quite similar; The central part is dedicated to the positioning of the arrow
+% quite similar. The central part is dedicated to the positioning of the arrow
% tip and to the necessary calculations for determining the tip tilt and the
-% reduction of the total arc length. The already defined |\@@Arc| macro actually
-% draws the curved vector stem without stroking it.
+% reduction of the total arc length;pay attention that the arrow length, stored in
+% |\@tdE| is a real length, while the radius stored in |\@Raggio| is just a multiple
+% of the |\unitlength|, so that the division (that yields a good angular approximation
+% to the arrow length as seen from the center of the arc) must be done with real
+% lengths. The already defined |\@@Arc| macro actually draws the curved vector
+% stem without stroking it.
% \begin{macrocode}
\def\@VArc(#1)(#2){%
\ifdim\@tdA>\z@
@@ -1183,8 +1194,7 @@
\fi
\SubVect#1from#2to\@V \ModOfVect\@V to\@Raggio \CopyVect#2to\@pPun
\@tdE=\pIIe@FAW\@wholewidth \@tdE=\pIIe@FAL\@tdE
-\Numero\@Freccia\@tdE
-\DividE\@Freccia\p@ by \@Raggio\p@ to\DeltaGradi
+\DividE\@tdE by \@Raggio\unitlength to\DeltaGradi
\@tdD=\DeltaGradi\p@
\@tdD=57.29578\@tdD \Numero\DeltaGradi\@tdD
\@tdD=\ifx\Segno--\fi\@gradi\p@ \Numero\@tempa\@tdD
@@ -1226,8 +1236,7 @@
\fi
\SubVect#1from#2to\@V \ModOfVect\@V to\@Raggio \CopyVect#2to\@pPun
\@tdE=\pIIe@FAW\@wholewidth \@tdE=0.8\@tdE
-\Numero\@Freccia\@tdE
-\DividE\@Freccia\p@ by \@Raggio\p@ to\DeltaGradi
+\DividE\@tdE by \@Raggio\unitlength to\DeltaGradi
\@tdD=\DeltaGradi\p@ \@tdD=57.29578\@tdD \Numero\DeltaGradi\@tdD
\@tdD=\ifx\Segno--\fi\@gradi\p@ \Numero\@tempa\@tdD
\DirFromAngle\@tempa to\@Dir