summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/curve2e
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-12-13 03:01:25 +0000
committerNorbert Preining <norbert@preining.info>2020-12-13 03:01:25 +0000
commit11d158821540787f6352285f23d1ce695bd86138 (patch)
tree9fa5154395167bfc203faa0e67f974d02fd60b6d /macros/latex/contrib/curve2e
parentfec1a561ae284b99f6d333784919ecffa97ecdad (diff)
CTAN sync 202012130301
Diffstat (limited to 'macros/latex/contrib/curve2e')
-rw-r--r--macros/latex/contrib/curve2e/README.txt5
-rw-r--r--macros/latex/contrib/curve2e/curve2e-manual.pdfbin568145 -> 571161 bytes
-rw-r--r--macros/latex/contrib/curve2e/curve2e-manual.tex19
-rw-r--r--macros/latex/contrib/curve2e/curve2e.dtx127
-rw-r--r--macros/latex/contrib/curve2e/curve2e.pdfbin647249 -> 654000 bytes
5 files changed, 129 insertions, 22 deletions
diff --git a/macros/latex/contrib/curve2e/README.txt b/macros/latex/contrib/curve2e/README.txt
index f8526c8a10..5a65cdd630 100644
--- a/macros/latex/contrib/curve2e/README.txt
+++ b/macros/latex/contrib/curve2e/README.txt
@@ -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 @@ 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; 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:
diff --git a/macros/latex/contrib/curve2e/curve2e-manual.pdf b/macros/latex/contrib/curve2e/curve2e-manual.pdf
index 30b44a0841..5e9bfb45d9 100644
--- a/macros/latex/contrib/curve2e/curve2e-manual.pdf
+++ b/macros/latex/contrib/curve2e/curve2e-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/curve2e/curve2e-manual.tex b/macros/latex/contrib/curve2e/curve2e-manual.tex
index e7da649852..614f853cbd 100644
--- a/macros/latex/contrib/curve2e/curve2e-manual.tex
+++ b/macros/latex/contrib/curve2e/curve2e-manual.tex
@@ -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@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 @@ Remember to delete all these subfolders if you decide to install a complete upda
\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 @@ Remember to delete all these subfolders if you decide to install a complete upda
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.
diff --git a/macros/latex/contrib/curve2e/curve2e.dtx b/macros/latex/contrib/curve2e/curve2e.dtx
index 0367ab88e0..8fc95e6fc3 100644
--- a/macros/latex/contrib/curve2e/curve2e.dtx
+++ b/macros/latex/contrib/curve2e/curve2e.dtx
@@ -46,7 +46,7 @@ README.txt and curve2e-v161.sty.
%<+package>\ProvidesPackage{curve2e}%
%<+readme>File README.txt for package curve2e
%<*package|readme>
- [2020-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 @@ README.txt and curve2e-v161.sty.
\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,14 +121,6 @@ README.txt and curve2e-v161.sty.
\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@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]{%
@@ -183,7 +177,7 @@ README.txt and curve2e-v161.sty.
%</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 @@ README.txt and curve2e-v161.sty.
% \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@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
diff --git a/macros/latex/contrib/curve2e/curve2e.pdf b/macros/latex/contrib/curve2e/curve2e.pdf
index ad494af848..94f8117ecd 100644
--- a/macros/latex/contrib/curve2e/curve2e.pdf
+++ b/macros/latex/contrib/curve2e/curve2e.pdf
Binary files differ