diff options
author | Karl Berry <karl@freefriends.org> | 2020-12-12 22:12:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-12-12 22:12:29 +0000 |
commit | 5c5f559b92567cd53a5d7e1b943bdef461879d96 (patch) | |
tree | 0f52343775188281ee5f4ee2b11d4766d268755d /Master | |
parent | 13d22f36fadd63fb15f2b114295a8a44b027113d (diff) |
curve2e (12dec20)
git-svn-id: svn://tug.org/texlive/trunk@57117 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/curve2e/README.txt | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/curve2e/curve2e-manual.pdf | bin | 568145 -> 571161 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/curve2e/curve2e-manual.tex | 19 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/curve2e/curve2e.pdf | bin | 641798 -> 647847 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/curve2e/curve2e.dtx | 127 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/curve2e/curve2e.sty | 34 |
6 files changed, 162 insertions, 23 deletions
diff --git a/Master/texmf-dist/doc/latex/curve2e/README.txt b/Master/texmf-dist/doc/latex/curve2e/README.txt index f8526c8a102..5a65cdd6301 100644 --- a/Master/texmf-dist/doc/latex/curve2e/README.txt +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.pdf b/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.pdf Binary files differindex 30b44a0841c..5e9bfb45d96 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 e7da6498523..614f853cbd7 100644 --- a/Master/texmf-dist/doc/latex/curve2e/curve2e-manual.tex +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/curve2e/curve2e.pdf b/Master/texmf-dist/doc/latex/curve2e/curve2e.pdf Binary files differindex a10b1b69d86..cedf676eba1 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 0367ab88e0b..8fc95e6fc3f 100644 --- a/Master/texmf-dist/source/latex/curve2e/curve2e.dtx +++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/tex/latex/curve2e/curve2e.sty b/Master/texmf-dist/tex/latex/curve2e/curve2e.sty index 0d7ccaa42da..41388dc37e7 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-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,6 +280,38 @@ \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@pt\dimen3333}% + \framebox(\@tempA,7){\box3333}}\ignorespaces} + + + \def\DividE#1by#2to#3{\edef#3{\fpeval{#1 / #2}}} \let\DivideFN\DividE |