texlive[57117] Master/texmf-dist: curve2e (12dec20)

commits+karl at tug.org commits+karl at tug.org
Sat Dec 12 23:12:29 CET 2020


Revision: 57117
          http://tug.org/svn/texlive?view=revision&revision=57117
Author:   karl
Date:     2020-12-12 23:12:29 +0100 (Sat, 12 Dec 2020)
Log Message:
-----------
curve2e (12dec20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/curve2e/README.txt
    trunk/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.pdf
    trunk/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.tex
    trunk/Master/texmf-dist/doc/latex/curve2e/curve2e.pdf
    trunk/Master/texmf-dist/source/latex/curve2e/curve2e.dtx
    trunk/Master/texmf-dist/tex/latex/curve2e/curve2e.sty

Modified: trunk/Master/texmf-dist/doc/latex/curve2e/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/curve2e/README.txt	2020-12-12 22:12:12 UTC (rev 57116)
+++ trunk/Master/texmf-dist/doc/latex/curve2e/README.txt	2020-12-12 22:12:29 UTC (rev 57117)
@@ -5,7 +5,7 @@
 %%   License information appended
 %% 
 File README.txt for package curve2e
-        [2020-10-03 v.2.2.10 Extension package for pict2e]
+        [2020-12-12 v.2.2.12 Extension package for pict2e]
 The package bundle curve2e is composed of the following files
 
 curve2e.dtx
@@ -79,7 +79,8 @@
 
 This version of curve2e is almost fully compatible with pict2e dated
 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.
+is version 0.4b dated 2020, and curve2e has been tested also with this 
+revision confirming that it performs as expected.
 
 If you specify:
 

Modified: trunk/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.tex	2020-12-12 22:12:12 UTC (rev 57116)
+++ trunk/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.tex	2020-12-12 22:12:29 UTC (rev 57117)
@@ -75,15 +75,6 @@
 
 \NewDocumentCommand\Pall{O{1.5} R(){0,0}}{\put(#2){\circle*{#1}}}
 
-\def\legenda(#1)#2{\put(#1){\setbox3333\hbox{$#2$}%
-   \dimen3333\dimexpr\wd3333*\p@/\unitlength +3\p@\relax
-   \edef\@tempA{\strip at pt\dimen3333}%
-   \framebox(\@tempA,7){\box3333}}}
-   
-\NewDocumentCommand\Zbox{R(){0,0} O{cc} m O{1}}{%
-\put(#1){\makebox(0,0)[#2]{\fboxrule=0pt\fboxsep=3pt\fbox{$#3$}}\makebox(0,0)[cc]{\circle*{#4}}}}
-
-
 \providecommand\setfontsize{}
 \DeclareRobustCommand\setfontsize[2][1.2]{%
 \linespread{#1}\fontsize{#2}{#2}\selectfont}
@@ -462,6 +453,14 @@
  \pack{pict2e} can receive. If the user wants to use the \pack{xcolor} 
  package, it has to load it \emph{before} \pack{curve2e}.
 %%
+\item Since they are used very much in the following examples, we recall some commands to label certain drawing elements, such as points, lines, arcs, and similar lines, ad to insert legends in some figures. They are \cs{legenda}, \cs{Zbox} and \cs{Pbox}; their syntax is the following:
+\begin{flushleft}\ttfamily\obeylines
+|\legenda|\parg{coordinates}\marg{formula}
+|\Zbox|\parg{coordinates}\oarg{position}\marg{formula}\oarg{dot diameter}
+|\Pbox|\parg{coordinates}\oarg{position}\marg{text}\oarg{dot diameter}\meta{\texttt{*}}\aarg{angle}
+\end{flushleft}
+They are described in any up to date documentation of package \pack{curve2e}.
+%%
  \item The user is offered new commands in order to control the line
  terminators and the line joins; specifically:
  \begin{itemize}
@@ -497,7 +496,7 @@
  follow the standard syntax:
  \begin{flushleft}
  |\linethickness|\marg{dimensioned value}\\
- |\defaultlinethicknes|\marg{dimensioned value}
+ |\defaultlinethickness|\marg{dimensioned value}
  \end{flushleft}
  where \meta{dimensioned value} means either a length specification
  complete of its units, or a dimensional expression.

Modified: trunk/Master/texmf-dist/doc/latex/curve2e/curve2e.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/curve2e/curve2e.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/curve2e/curve2e.dtx	2020-12-12 22:12:12 UTC (rev 57116)
+++ trunk/Master/texmf-dist/source/latex/curve2e/curve2e.dtx	2020-12-12 22:12:29 UTC (rev 57117)
@@ -46,7 +46,7 @@
 %<+package>\ProvidesPackage{curve2e}%
 %<+readme>File README.txt for package curve2e
 %<*package|readme>
-        [2020-10-03 v.2.2.10 Extension package for pict2e]
+        [2020-12-12 v.2.2.12 Extension package for pict2e]
 %</package|readme>
 %<*driver>
 \documentclass{ltxdoc}\errorcontextlines=9
@@ -79,6 +79,8 @@
 \renewcommand\Parg[1]{\texttt{(#1)}}
 \providecommand\eTeX{}
 \renewcommand\eTeX{\lower0.5ex\hbox{$\varepsilon\!$}\TeX}
+\providecommand\pack{}
+\renewcommand\pack[1]{{\normalfont\texttt{#1}}}
 
 \providecommand\Pbox{}
 \newlength\PbDim
@@ -119,15 +121,7 @@
 
 \NewDocumentCommand\Pall{O{1.5} R(){0,0}}{\put(#2){\circle*{#1}}}
 
-\def\legenda(#1)#2{\put(#1){\setbox3333\hbox{$#2$}%
-   \dimen3333\dimexpr\wd3333*\p@/\unitlength +3\p@\relax
-   \edef\@tempA{\strip at pt\dimen3333}%
-   \framebox(\@tempA,7){\box3333}}}
-   
-\NewDocumentCommand\Zbox{R(){0,0} O{cc} m O{1}}{%
-\put(#1){\makebox(0,0)[#2]{\fboxrule=0pt\fboxsep=3pt\fbox{$#3$}}\makebox(0,0)[cc]{\circle*{#4}}}}
 
-
 \providecommand\setfontsize{}
 \DeclareRobustCommand\setfontsize[2][1.2]{%
 \linespread{#1}\fontsize{#2}{#2}\selectfont}
@@ -183,7 +177,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{5510}
+% \CheckSum{5582}
 % \begin{abstract}
 % This file documents the |curve2e| extension package to  the |pict2e|
 % bundle implementation; the latter was described by Lamport
@@ -1376,6 +1370,119 @@
 %    \end{macrocode}
 %
 %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \section{Labelling the graphical elements}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% While drawing any thing with the \pack{curve2e} package, it might be
+% necessary to identify some graphical objects with some sort of “label”.
+%\footnote{Do not confuse this identifier label with the \cs{label}
+% command.}
+% 
+% Some commands such as \cs{legenda} (legend), \cs{Zbox}, and \cs{Pbox}
+% have been always usede in the documentation of this package and its
+% siblings; but we used them in many other documents; therefore we thought
+% it was useful to have them available with the general user of
+% \pack{curve2e}.
+%
+%Their commands follow the following syntax.
+%|\Pbox|\parg{coordinates}\oarg{position}\marg{text}\oarg{dot diameter}\meta{\texttt{*}}\aarg{angle}
+%\begin{flushleft}\ttfamily\obeylines
+%|\Zbox|\parg{coordinates}\oarg{position}\marg{formula}\oarg{dot diameter}
+%|\legenda|\parg{coordinates}\marg{formula}
+%\end{flushleft}
+%
+% These commands have similar but different functionalities; the most
+% general one si |\Pbox|, while the others are simplified versions that
+% have a simpler syntax, and a subset of the |\Pbox| functionalities.
+% While we describe the arguments of |\Pbox| we emphasise the small
+% differences with the other two commands.
+%\begin{description}
+%\item[\meta{coordinates}] are the coordinates (explicit, or in vector
+% form) of the reference point of the “label”; for |\legenda| it is the
+% lower left corner of the framed legend contents. They are delimited
+% with the usual matched parentheses, and their default value is
+% \texttt{(0,0)}, therefore either the user specifies other coordinates,
+% or uses the |\put| command to place the legend where he prefers.
+%%
+%\item[\meta{position}] is the optional position of the “label” contents
+% relative the the reference point; the default is \texttt{cc} so that
+% the “label” is vertically and horizontally centred at the reference
+% point; actually these position parameters should always specified if
+% the dot diameter is positive (therefore visible), otherwise the
+% “label” and the dot overwrite eachother.
+%%
+%\item[\meta{text} \textnormal{or} \meta{formula}] may be almost
+% anything; where the argument is called \meta{formula} math mode
+% is the default; otherwise it is plain \meta{text}; in any case
+% it can be replaced by a box or a parbox, so that actually this
+% mandatory argument may contain almost anything.
+%%
+%\item[\meta{dot diameter}] the dot diameter default value is positive;
+% for |\Zbox| it is |1\unitlength| and the user should be careful in
+% modifying this value; but if the dot diameter is set to zero, the
+% dot is absent and the |\Zbox| command behaves almost as an unframed
+% legend. The small difference is that |\Zbox| accepts a \meta{position}
+% parameter while the |\legend| command does not.
+%%
+%\item[\meta{\texttt{*}}] is an optional star; if specified the
+% “label” is framed with a visible border, otherwise it is framed
+% with an invisible border but with a blank separator that tries to
+% adjust the border so that the “label” is always at the same distance
+% from the reference point; if this reference point corresponds to
+% a box corner it is reduced by approximately a factor equal to
+% $\sqrt{0.5}$, in oder to take into account the diagonal of the
+% blank border angle. 
+%%
+%\item[\meta{angle}] is the rotation angle about the reference point
+% of the “label”; sometimes such “labels” have to be rotated 90°
+% anticlockwise; sometimes they need a positive or negative rotation
+% angle (in degrees) in order to match the general direction of the
+% “labelled” object, be it an oblique line, an axis, or whatever.
+% We found it very useful also to label the cartesian axes, but
+% also in other situations; for example to label the $x$ axis the
+% |\Pbox| command might have the arrow tip coordinates for the
+% reference point and  have  \texttt{tr} for the \meta{position};
+% for the $y$ axis, the reference point is again the arrow tip,
+% and again the position would be again \texttt{tr} if the “label”
+% sits on the left of the axis.
+%\end{description}
+%
+%    \begin{macrocode}
+\providecommand\Pbox{}
+\RenewDocumentCommand\Pbox{D(){0,0} O{cc} m O{0.5ex} s D<>{0}}{%
+\put(#1){\rotatebox{#6}{\makebox(0,0){%
+\settowidth\PbDim{#2}%
+\edef\Rapp{\fpeval{\PbDim/{1ex}}}%
+\fptest{\Rapp > 1.5}{\fboxsep=0.5ex}{\fboxsep=0.75ex}%
+\IfBooleanTF{#5}{\fboxrule=0.4pt}{\fboxrule=0pt}%
+\fptest{#4 = 0sp}%
+  {\makebox(0,0)[#2]{\fbox{$\relax#3\relax$}}}%
+  {\edef\Diam{\fpeval{(#4)/\unitlength}}%
+   \makebox(0,0){\circle*{\Diam}}%
+   \makebox(0,0)[#2]{\fbox{$\relax\mathsf#3\relax$}}%
+  }}}%
+}\ignorespaces}
+
+\providecommand\Zbox{}
+\RenewDocumentCommand\Zbox{R(){0,0} O{cc} m O{1}}{%
+\put(#1){\makebox(0,0)[#2]{\fboxrule=0pt\fboxsep=3pt\fbox{$#3$}}\makebox(0,0)[cc]{\circle*{#4}}}\ignorespaces}
+
+\providecommand\legenda{}
+\RenewDocumentCommand\legenda{ D(){0,0} m}{\put(#1){\setbox3333\hbox{$#2$}%
+   \dimen3333\dimexpr\wd3333*\p@/\unitlength +3\p@\relax
+   \edef\@tempA{\strip at pt\dimen3333}%
+   \framebox(\@tempA,7){\box3333}}\ignorespaces}
+   
+%    \end{macrocode}
+
+% With the above labelling facilities and with use of the \pack{xfp}
+% functionalities it is not difficult to create diagrams with linear
+% or logarithmic axes. In effects the \pack{graphpaper} class contains
+% those various and other labelling macros and uses them. We plan to
+% extract some general macros from that class and to create a stand
+% alone package, so as to use them whenever the user wants to draw 
+% some diagrams.
+
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \section{Math operations on fractional operands}
 %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % This is not the place to complain about the fact that all programs of

Modified: trunk/Master/texmf-dist/tex/latex/curve2e/curve2e.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/curve2e/curve2e.sty	2020-12-12 22:12:12 UTC (rev 57116)
+++ trunk/Master/texmf-dist/tex/latex/curve2e/curve2e.sty	2020-12-12 22:12:29 UTC (rev 57117)
@@ -11,7 +11,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2019/01/01]
 \ProvidesPackage{curve2e}%
-        [2020-10-03 v.2.2.10 Extension package for pict2e]
+        [2020-12-12 v.2.2.12 Extension package for pict2e]
 \IfFileExists{xfp.sty}{%
   \RequirePackage{color}
   \RequirePackageWithOptions{pict2e}[2014/01/01]
@@ -280,7 +280,39 @@
 
 \def\RoundUp#1modulo#2to#3{\edef#3{\fpeval{(ceil(#1/#2,0))*#2}}}%
 \def\Integer#1.#2??{#1}%
+%%
+%%
+%%
+%%
+%%
+\providecommand\Pbox{}
+\RenewDocumentCommand\Pbox{D(){0,0} O{cc} m O{0.5ex} s D<>{0}}{%
+\put(#1){\rotatebox{#6}{\makebox(0,0){%
+\settowidth\PbDim{#2}%
+\edef\Rapp{\fpeval{\PbDim/{1ex}}}%
+\fptest{\Rapp > 1.5}{\fboxsep=0.5ex}{\fboxsep=0.75ex}%
+\IfBooleanTF{#5}{\fboxrule=0.4pt}{\fboxrule=0pt}%
+\fptest{#4 = 0sp}%
+  {\makebox(0,0)[#2]{\fbox{$\relax#3\relax$}}}%
+  {\edef\Diam{\fpeval{(#4)/\unitlength}}%
+   \makebox(0,0){\circle*{\Diam}}%
+   \makebox(0,0)[#2]{\fbox{$\relax\mathsf#3\relax$}}%
+  }}}%
+}\ignorespaces}
 
+\providecommand\Zbox{}
+\RenewDocumentCommand\Zbox{R(){0,0} O{cc} m O{1}}{%
+\put(#1){\makebox(0,0)[#2]{\fboxrule=0pt\fboxsep=3pt\fbox{$#3$}}\makebox(0,0)[cc]{\circle*{#4}}}\ignorespaces}
+
+\providecommand\legenda{}
+\RenewDocumentCommand\legenda{ D(){0,0} m}{\put(#1){\setbox3333\hbox{$#2$}%
+   \dimen3333\dimexpr\wd3333*\p@/\unitlength +3\p@\relax
+   \edef\@tempA{\strip at pt\dimen3333}%
+   \framebox(\@tempA,7){\box3333}}\ignorespaces}
+
+
+
+
 \def\DividE#1by#2to#3{\edef#3{\fpeval{#1 / #2}}}
 \let\DivideFN\DividE
 \def\MultiplY#1by#2to#3{\edef#3{\fpeval{#1 * #2}}}\relax



More information about the tex-live-commits mailing list.