summaryrefslogtreecommitdiff
path: root/graphics/pgf
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf')
-rw-r--r--graphics/pgf/contrib/tzplot/tzplot-doc-A-v2.1.tex (renamed from graphics/pgf/contrib/tzplot/tzplot-doc-A-v2.0.tex)68
-rw-r--r--graphics/pgf/contrib/tzplot/tzplot-doc-B-v2.1.tex (renamed from graphics/pgf/contrib/tzplot/tzplot-doc-B-v2.0.tex)92
-rw-r--r--graphics/pgf/contrib/tzplot/tzplot-doc-C-v2.1.tex (renamed from graphics/pgf/contrib/tzplot/tzplot-doc-C-v2.0.tex)158
-rw-r--r--graphics/pgf/contrib/tzplot/tzplot-doc-C1-v2.1.tex (renamed from graphics/pgf/contrib/tzplot/tzplot-doc-C1-v2.0.tex)80
-rw-r--r--graphics/pgf/contrib/tzplot/tzplot-doc-C2-v2.1.tex (renamed from graphics/pgf/contrib/tzplot/tzplot-doc-C2-v2.0.tex)156
-rw-r--r--graphics/pgf/contrib/tzplot/tzplot-doc-D-v2.1.tex (renamed from graphics/pgf/contrib/tzplot/tzplot-doc-D-v2.0.tex)731
-rw-r--r--graphics/pgf/contrib/tzplot/tzplot-doc-E-v2.1.tex (renamed from graphics/pgf/contrib/tzplot/tzplot-doc-E-v2.0.tex)27
-rw-r--r--graphics/pgf/contrib/tzplot/tzplot-doc.pdfbin1263240 -> 1203945 bytes
-rw-r--r--graphics/pgf/contrib/tzplot/tzplot-doc.tex159
-rw-r--r--graphics/pgf/contrib/tzplot/tzplot.sty800
10 files changed, 1717 insertions, 554 deletions
diff --git a/graphics/pgf/contrib/tzplot/tzplot-doc-A-v2.0.tex b/graphics/pgf/contrib/tzplot/tzplot-doc-A-v2.1.tex
index 6f7f1d3850..27bb86e5af 100644
--- a/graphics/pgf/contrib/tzplot/tzplot-doc-A-v2.0.tex
+++ b/graphics/pgf/contrib/tzplot/tzplot-doc-A-v2.1.tex
@@ -19,12 +19,12 @@ The |tzplot| package is just a collection of macros based on \TikZ\ to save you
In |pstricks|, a line connecting two points |(A)| and |(B)| is drawn by |\psline(A)(B)|.
With the package |tzplot|, you can do it by |\tzline(A)(B)|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzline(A)(B) % is an abbreviation of:
\draw (A) -- (B);
\end{tztikz}
%
-\begin{tztikz}{}
+\begin{tztikz}
\tzline[blue](A)(B){my line}[r] % is an abbreviation of:
\draw [blue] (A) -- (B) node [right] {my line};
\end{tztikz}
@@ -90,7 +90,7 @@ Those are as follows:
Following the manual of \Tikz, this package also predefines \iisw{abbreviations} (or aliases) of \Tikz's basic placement options for main nodes as follows:
\label{abbreviations}
-\begin{tzsty}{}
+\begin{tzsty}
% preoccupied (alias) styles for main node options
\tikzset{%
a/.style={above=#1},
@@ -107,14 +107,14 @@ Following the manual of \Tikz, this package also predefines \iisw{abbreviations}
By these abbreviations (or aliases), we mean that, with the |\tzplot| package, we can use these alias styles in the |\tikzpicture| environment as follows:
-\begin{tztikz}{}
+\begin{tztikz}
\draw (0,0) -- (1,0) node [ar] {line}; % [ar] = [above right]
\end{tztikz}
\paragraph{Layers}
The |tzplot| package also defines graphic layers as follows:
-\begin{tzsty}{}
+\begin{tzsty}
\pgfdeclarelayer{background}
\pgfdeclarelayer{behind}
\pgfdeclarelayer{above}
@@ -125,14 +125,13 @@ The |tzplot| package also defines graphic layers as follows:
Therefore, you can select the graphic layers in sequence: |background|, |behind|, |main|, |above|, and |foreground|.
For example, you can change the layer of a straight line from |main| (default) to |background| as follows:
-\begin{tzcode}[listing only]{1}
+\begin{tzcode}[listing only]
\begin{tikzpicture}
-\tzhelplines(4,3)
<tzplot macros>
<tikz macros>
-\begin{pgfonlayer}{background}
- \tzline[blue](0,0)(3,1)
-\end{pgfonlayer}
+ \begin{pgfonlayer}{background}
+ \tzline[blue](0,0)(3,1)
+ \end{pgfonlayer}
\end{tikzpicture}
\end{tzcode}
@@ -160,7 +159,41 @@ Unless you are an experienced user of \Tikz, it is recommended to move on to Par
\chapter{Changes}
%%------------------------------------------------------------
-\section{What's New}
+\section{What's New in version 2.1}
+
+\paragraph{New macros}
+
+\begin{itemize}
+\item |\tzdistance|: distance between two points, $\Delta x$, and $\Delta y$
+%
+\listdivider
+\item |\tzslopeat'|: opposite direction of |\tzslopeat|
+\item |\tzslope'|: opposite direction of |\tzslope|
+%
+\listdivider
+\item |\tznormalat|: a normal line from a point on a path
+\item |\tznormalat'|: opposite direction of |\tznormalat|
+\item |\tznormalat*|: works like |\tzslopeat|, but rotated |90| degrees
+\item |\tznormalat*'|: works like |\tzslopeat|, but rotated |-90| degrees
+\item |\tznormal|: a normal line from a point on a path
+\item |\tznormal'|: opposite direction of |\tznormal|
+\item |\tznormal*|: works like |\tzslope|, but rotated |90| degrees
+\item |\tznormal*'|: works like |\tzslope|, but rotated |-90| degrees
+\item |\settznormallayer|: controls the layer of |\tznormalat| and its variants
+\item |\settznormalepsilon|
+\end{itemize}
+
+\paragraph{Redesigned macros}
+
+\begin{itemize}
+\item |\tzaxisx|: added the option |"<name path>"| to find the intercepts easily (by default, |axisx|)
+\item |\tzaxisy|: added the option |"<name path>"| to find the intercepts easily (by default, |axisy|)
+\item |\tzaxes|: added the option |"<path name>"| with the default |"axes"|
+\item |\tzaxesL|: added the option |"<path name>"| with the default |"axesL"|
+\end{itemize}
+
+%%------------------------------------------------------------
+\section{What's New in version 2.0}
\subsection{New macros}
@@ -169,8 +202,7 @@ New macros have been added.
\begin{itemize}\tightlist
\item |\tzfn'|: (swap version) inverse function of |\tzfn|
\item |\tzfnofy|, |\tzfnofy'|: function of |\y|
-\item |\tzdeffn|, |\tzdeffnofy|: to define functions
-\item |\tzdefLFn|, |\tzdefLFnofy|: define linear functions
+\item |\tzdefLFn|, |\tzdefLFnofy|: to define linear functions
\item |\tzLFn(')|, |\tzLFnofy(')|: linear functions
\item |\tzLFnXpoint(*)|: linear function intersection points
\item |\tzfnmin(')|, |\tzfnmax(')|: envelope curves
@@ -178,7 +210,7 @@ New macros have been added.
\listdivider
\item |\tzfnarea(*)|, |\settzfnarealayer|, |\tzfnarealine(')|: to fill the area under graphs
\item |\settzfnarealinestyle|
-\item |\tzpdfZ|, |\tzpdfN(*)|: probability density functions of a normal distribution
+\item |\tzpdfZ|, |\tzpdfN(*)|: (predefined) probability density functions of a normal distribution
\item |\tzprojs(*)|, |\tzprojsx(*)|, |\tzprojsy(*)|: multiple projection lines
\item |\settzpathlayer|: |main| layer by default
%
@@ -215,7 +247,7 @@ New macros have been added.
\end{itemize}
-\subsection{Extending paths: \texttt{\bs tz<...>AtBegin} and \texttt{\bs<...>AtEnd}}
+\subsection{Extending paths: \texttt{\bs tz<...>AtBegin} and \texttt{\bs tz<...>AtEnd}}
\begin{itemize}\tightlist
\item |\tztoAtBegin|, |\tztoAtEnd|, |\tztosAtBegin|, |\tztosAtEnd| (version 1)
@@ -272,7 +304,7 @@ In \Tikz, The position of labels is specified by \xem{angles}. The positioning w
The macros related to this issue are as follows:
-\begin{itemize}\tightlist
+\begin{itemize}%\tightlist
\item dots: |\tzdot(s)|, |\tzcdots(s)|, |\tznodedot(s)|
\item coordinates: |\tzcoor(s)|, |\tzcoorsquick|
\item intersection points: |\tzXpoint|, |\tzvXpoint|, |\tzhXpoint|, |\tzLFnXpoint|
@@ -283,7 +315,7 @@ The macros related to this issue are as follows:
\subsection{New styles for middle arrow tips}
Some styles for drawing the the \iisw{middle arrow tip}\xem{s} on a path are predefined.
-\begin{itemize}\tightlist
+\begin{itemize}%\tightlist
\item |-->--|: (controllable) middle arrow tip
\begin{itemize}
\item \icmd{\settzmidarrow} controls the positions and styles of middle arrow tips
@@ -295,7 +327,7 @@ Some styles for drawing the the \iisw{middle arrow tip}\xem{s} on a path are pre
You can use these styles to draw middle arrow tips as follows:
-\begin{tztikz}{}
+\begin{tztikz}
\tzlines[-->--,red](0,0)(1,0)(3,1); % default=0.5
\tzlines[-->--=0.7](0,0)(1,0)(3,3); % work like
\draw [-->--,red](0,0) -- (1,0) -- (3,1);
diff --git a/graphics/pgf/contrib/tzplot/tzplot-doc-B-v2.0.tex b/graphics/pgf/contrib/tzplot/tzplot-doc-B-v2.1.tex
index 4dbb93b4e5..a780c828fe 100644
--- a/graphics/pgf/contrib/tzplot/tzplot-doc-B-v2.0.tex
+++ b/graphics/pgf/contrib/tzplot/tzplot-doc-B-v2.1.tex
@@ -38,7 +38,7 @@ You can use \Tikz\ options to change the style of a line.
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzline[dashed](0,1)(3,2) % works like:
\draw [dashed] (0,1) -- (3,2);
\end{tztikz}
@@ -66,7 +66,7 @@ You can use \Tikz\ options to change the style of a line.
You can change of the size of a dot by specifying the \xem{radius} of the circle, like, for example, |\tzcdot(0,0)(3pt)|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzcdot*[green](3,2)(3pt) % is an abbreviation for:
\draw [fill,green] (3,2) circle (3pt);
\end{tztikz}
@@ -116,7 +116,7 @@ The size (\xem{diameter} or |minimum size|) of a node dot can be changed by the
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzdot[green](0,0)(6pt) % works like:
\draw [green] (0,0) node [tzdot,minimum size=6pt] {};
% tzdot style is predefined
@@ -165,7 +165,7 @@ Let us see what happens to circle dots, especially when |xscale| and |yscale| ar
To define a coordinate, use \icmd{\tzcoor} with a coordinate followed by its name in parentheses.
-\begin{tztikz}{}
+\begin{tztikz}
\tzcoor(0,0)(A) % works like:
\path (0,0) coordinate (A);
% or
@@ -214,7 +214,7 @@ The starred version \icmd{\tzcoor*} prints a filled node dot at a specified coor
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzto[bend right](0,1)(3,2) % works like:
\draw [bend right] (0,1) to (3,2);
\end{tztikz}
@@ -233,7 +233,7 @@ The style |tzshowcontrols| predefined in the package reveals the control point(s
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzbezier[blue](0,0)(2,0)(4,2) % works like:
\draw [blue] (0,0) .. controls (2,0) .. (4,2);
\tzbezier(0,2)(1,3)(3,0)(4,1) % works like:
@@ -246,7 +246,7 @@ The style |tzshowcontrols| predefined in the package reveals the control point(s
\icmd{\tzparabola} draws a parabola controlled by several options of \Tikz's |parabola| operation.
The macro \icmd{\tzparabola} accepts \xem{two or three} coordinate arguments to draw a parabola and the parabola bends at the second coordinate if it exists.
-\begin{tztikz}{}
+\begin{tztikz}
\tzparabola(0,0)(2,4) % works like:
\draw (0,0) parabola (2,4);
\tzparabola(2,0)(3,3)(4,1) % works like:
@@ -289,7 +289,7 @@ The starred version \icmd{\tznode*} draws the node perimeter, which is a |rectan
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tznode(0,0){A} % works like:
\node at (0,0) {A};
\tznode(2,2){Text}[above right,blue] % works like:
@@ -364,7 +364,7 @@ To change the size of a dot, you need to specify the last option |(<dimension>)|
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzcdot*(1,2){C}[180](2pt) % works like:
\draw[fill] (1,2) circle (2pt) node [label={180:C}] {};
\end{tztikz}
@@ -377,7 +377,7 @@ To change the size of a dot, you need to specify the last option |(<dimension>)|
\remark
\textsc{Remember} the order of arguments is |(<coor>)(<name>){<label>}[<angle>]|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: simplified
\tzcoor(<coor>)(<coor name>){<label>}[[<label opt>]<angle>]
% defaults
@@ -395,7 +395,7 @@ You can see the full syntax of |\tzcoor| in Section \ref{s:tzcoor} on page \page
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzcoor(1,1)(B){B}[0] % works like:
\draw (1,1) coordinate (B) node [label={0:B}] {};
\tzcoor(1,1)(B){B}[[red]0] % works like:
@@ -407,7 +407,7 @@ You can see the full syntax of |\tzcoor| in Section \ref{s:tzcoor} on page \page
The starred version \icmd{\tzcoor*} designates a coordinate and prints a node dot with a label around the designated point like |\tzdot*| does.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: simflified
\tzcoor*[<dot opt>](<coor>)(<coor name>){<label>}[[<label opt>]<angle>](<dot size>)
\end{tzdef}
@@ -423,7 +423,7 @@ The starred version \icmd{\tzcoor*} designates a coordinate and prints a node do
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzcoor*(1,2)(C){C}[180](4pt) % works as follows:
\tzcoor(1,2)(C)
\tzdot*(C){C}[180](4pt)
@@ -475,7 +475,7 @@ To add text to a line or a curve drawn by \icmd{\tzto}, just specify the optiona
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzto(0,0){route A}(3,0) % works like:
\draw (0,3) to node [above] {route A} (3,0);
\end{tztikz}
@@ -546,7 +546,7 @@ Let us call this kind of macro a \iisw{semicolon version} macro.
! Package tzplot Error: You may have forgotten a semicolon here or above!
\end{verbatim}
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzlines[<opt>](<coor>)(<coor>)..repeated..(<coor>);
% syntax: simplified
@@ -665,8 +665,10 @@ You can fill the interior of a path formed by |\tzpath| (after being closed) wit
\begin{tikzpicture}
\tzhelplines(4,3)
\tzline[blue](0,3)(4,0)
-\tzpath[fill,green](1,3)(0,2)(2,0)(3,1)(4,2)(2,3);
-\tzpath[fill](0,0) (1,2) (3,0) (4,1);
+\tzpath[fill,green]
+ (1,3)(0,2)(2,0)(3,1)(4,2)(2,3);
+\tzpath[fill]
+ (0,0) (1,2) (3,0) (4,1);
\end{tikzpicture}
\end{tzcode}
@@ -674,7 +676,7 @@ You can fill the interior of a path formed by |\tzpath| (after being closed) wit
The starred version \icmd{\tzpath*} takes the default options |fill=black!50|, |fill opacity=.3|, and |text opacity=1| to fill the area.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: simplified
\tzpath*[<opt>](<coor>){<label>}[<angle>]..repeated..(<coor>){<label>}[<angle>];
% defaults
@@ -747,7 +749,7 @@ Each coordinate can be labeled by specifying the optional argument |{<label>}| f
\icmd{\tzdots} accepts an arbitrary number of coordinates to print circle node dots, but the repetition must be ended by |;| (semicolon version).
\icmd{\tzdots*} prints filled circle node dots.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzdots*(<coor>)(<coor>)..repeated..(<coor>);
% syntax: simplified
@@ -889,7 +891,7 @@ The starred version \icmd{\tzcoorsquick*} prints node dots and automatically put
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzplot*(0,0)(1,1)(2,1); % works like:
\draw [mark=*] plot coordinates {(0,0)(1,1)(2,1)};
\end{tztikz}
@@ -924,7 +926,7 @@ Each coordinate can be labeled by specifying the optional argument |{<text>}| fo
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzplot(0,0)(1,1)(2,1); % works like:
\draw plot coordinates {(0,0)(1,1)(2,1)};
\end{tztikz}
@@ -963,7 +965,7 @@ The repetition of coordinates must be ended by |;| (semicolon version).
\end{tikzpicture}
\end{tzcode}
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: simplified
\tzplotcurve[<opt>]{<tension>}"<path name>"
(<coor>){<label>}[<angle>]..repeated..(<coor>){<label>}[<angle>];
@@ -972,7 +974,7 @@ The repetition of coordinates must be ended by |;| (semicolon version).
% <m> means mandatory
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzplotcurve(0,0)(1,1)(2,1); % works like:
\draw [smooth,tension=1] plot coordinates {(0,0)(1,1)(2,1)};
\end{tztikz}
@@ -1005,7 +1007,7 @@ You can change the tension value by specifying the optional argument |{<tension>
\subsection{\protect\cmd{\tzaxes}}
\label{ssi:tzaxes}
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: simplified
\tzaxes[<opt>]<x-shift,y-shift>(<x1,y1>)(<x2,y2>)
{<x-text>}[<x-opt>]{<y-text>}[<y-opt>]
@@ -1100,7 +1102,7 @@ Notice that, in the previous example, the two axes intersect at |(7,4)| by the s
\icmd{\tzaxisx} draws an x-axis from |<x1>| to |<x2>|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: simplified
\tzaxisx[<opt>]<y-shift>{<x1>}{<x2>}{<text>}[<node opt>]
% defaults
@@ -1273,7 +1275,7 @@ And \icmd{\tzproj*} combines |\tzprojx*| and |\tzprojy*|.
\icmd{\tzfn}|{<fn of \x>}[<a:b>]| plots a function of $x$ over the specified domain $[a:b]$, which means that $a\leq x \leq b$.
Optionally, you can add |{<text>}| with |[<node opt>]| as shown in the following example.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: simplified
\tzfn[<opt>]"<path name>"{<fn of \x>}[<a:b>]{<text>}[<node dot>]
% defaults
@@ -1292,7 +1294,7 @@ Optionally, you can add |{<text>}| with |[<node opt>]| as shown in the following
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzfn[dashed]{(\x-2)^2+1}[1:4]{$g(x)$}[r] % works like:
\draw [dashed] plot [domain=1:4] (\x,{(\x-2)^2+1}) node [right] {$g(x)$};
\end{tztikz}
@@ -1321,7 +1323,7 @@ If the curly brace mandatory argument consists of \xem{only a macro name} like |
\icmd{\tzhfnat} accepts a value of $y$ and draws a horizontal line (the graph of a constant function) at $y$ from left to right of the \ixxw{current bounding box}, by default, unless you specify the optional argument |[<from:to>]|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzhfnat[<opt>]"<path name>"{<y-val>}[<from:to>]{<text>}[<node opt>]
% defaults
@@ -1347,7 +1349,7 @@ If the curly brace mandatory argument consists of \xem{only a macro name} like |
\icmd{\tzvfnat} draws a vertical line at $x$ from bottom to top of the |current bounding box| by default.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: simplified
\tzvfnat[<opt>]"<path name>"{<x-vale>}[<from:to>]{<text>}[<pos>]
% defaults
@@ -1409,7 +1411,7 @@ In this package, all macros (with a few exceptions) related to lines and curves
and more...
\end{verbatim}
-\begin{tztikz}{}
+\begin{tztikz}
\tzline[dashed]"foo"(1,1)(3,3) % works like
\draw [dashed,name path=foo](1,1) -- (3,3);
\end{tztikz}
@@ -1512,7 +1514,7 @@ You can see more details on |\tzXpoint| and its friends in Chapter \ref{c:inters
\icmd{\tztangentat}|{<path>}{<x>}[<a:b>]| draws a tangent line to |<path>| at $x=\texttt{<x>}$ over $x\in [a,b]$.
The domain is a mandatory argument and should be of the form |[<from:to>]|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: simplified
\tztangentat{<path>}{<x>}[<domain>]{<text>}[<node opt>]
% defaults
@@ -1547,7 +1549,7 @@ You can also add some text next to the tangent line by specifying the optional a
|\tztangent{<path>}(<coor>)| draws a tangent line to |<path>| at the $x$ coordinate of |(<coor>)|. Here, the $y$ coordinate of |(<coor>)| is ignored. The line is drawn on the |behind| layer, by default.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: simplified
\tztangent{<path>}(<coor>)[<from:to>]{<text>}[<node opt>]
% defaults
@@ -1672,6 +1674,8 @@ Here, we are using |\tzto|.
\end{tikzpicture}
\end{tzcode}
+\tmpclearpage
+
\paragraph{Step 4} If necessary, use |\tzproj| to draw projection lines with text around the projection points.
\begin{tzcode}{.3}
@@ -1700,14 +1704,6 @@ Here, we are using |\tzto|.
\end{tikzpicture}
\end{tzcode}
-\begin{enumerate}\addtocounter{enumi}{1}\renewcommand{\labelenumi}{{Step} \theenumi{:}}\firmlist
-\item Define functions and plot them. And then, find an intersection point.
-\item Draw the shifted supply curve and find new equilibrium point. And then, project the point on each axis.
-\item To illustrate the social welfare loss (SWL), find a vertical intersection point of the original supply curve using new equilibrium point.
-\item Project both of the old equilibrium point and the vertical intersection point onto the $y$ axis and add text.
-\item Fill the area of the social welfare loss with color.
-\item Add text `SWL' at the appropriate place.
-\end{enumerate}
\begin{tzcode}{.3}
\begin{tikzpicture}[scale=.035,font=\scriptsize]
@@ -1736,6 +1732,16 @@ Here, we are using |\tzto|.
\end{tzcode}
+\begin{enumerate}\addtocounter{enumi}{1}\renewcommand{\labelenumi}{{Step} \theenumi{:}}\firmlist
+\item Define functions and plot them. And then, find an intersection point.
+\item Draw the shifted supply curve and find new equilibrium point. And then, project the point on each axis.
+\item To illustrate the social welfare loss (SWL), find a vertical intersection point of the original supply curve using new equilibrium point.
+\item Project both of the old equilibrium point and the vertical intersection point onto the $y$ axis and add text.
+\item Fill the area of the social welfare loss with color.
+\item Add text `SWL' at the appropriate place.
+\end{enumerate}
+
+
%%------------------------------------------------------------
\section{Firms}
\label{si:firms}
@@ -1886,9 +1892,9 @@ Here, we are using |\tzto|.
\def\Fk{3*(\x)^(1/3)}
\def\sFk{2*(\x)^(1/3)}
\def\ndk{7/9*\x}
-\tzfn\Fk[0:9]{$y=f(k)$}[r] % path name=Fk
-\tzfn\sFk[0:9]{$sf(k)$}[r] % path name=sFk
-\tzfn\ndk[0:9]{$(n+\delta)k$}[r] % path name=ndk
+\tzfn\Fk[0:9]{$y=f(k)$}[r] % name path=Fk
+\tzfn\sFk[0:9]{$sf(k)$}[r] % name path=sFk
+\tzfn\ndk[0:9]{$(n+\delta)k$}[r] % name path=ndk
\tzXpoint*{sFk}{ndk}(E)[2]{$E$}[135] % (E)=(E-2)
\tzvXpoint*{Fk}(E)(YE) % 2nd X point
\tzproj(YE){$k^*$}{$y^*$}
diff --git a/graphics/pgf/contrib/tzplot/tzplot-doc-C-v2.0.tex b/graphics/pgf/contrib/tzplot/tzplot-doc-C-v2.1.tex
index 9afc4fc668..e717bd68c2 100644
--- a/graphics/pgf/contrib/tzplot/tzplot-doc-C-v2.0.tex
+++ b/graphics/pgf/contrib/tzplot/tzplot-doc-C-v2.1.tex
@@ -17,7 +17,7 @@
The styles \ixttw{tzdotted}, \ixttw{tzdashed}, and \ixttw{tzhelplines} are defined as follows:
-\begin{tzsty}{}
+\begin{tzsty}
% styles: tzdotted, tzdashed, tzhelplines
\tikzset{%
tzdotted/.style={line cap=round,dash pattern=on 0pt off 1cm/(#1)},
@@ -45,7 +45,7 @@ If only one coordinate is specified, then the first coordinate is regarded as |(
The starred version \icmd{\tzhelplines*} uses the grid as a \iisw{bounding box}.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzhelplines(<coor>)
% syntax: full
@@ -57,7 +57,7 @@ The starred version \icmd{\tzhelplines*} uses the grid as a \iisw{bounding box}.
Here, |(|\ixxw{<m>}|)| stands for a \xem{mandatory} argument.
-\begin{tztikz}{}
+\begin{tztikz}
\tzhelplines(4,3) % works similarly to:
\draw [help lines] (0,0) grid (4,3);
@@ -123,7 +123,7 @@ Similarly for |tzdashed|.
\icmd{\tzbbox} sets a bounding box.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzbbox(<coor1>)(<coor2>)
% defaults
@@ -131,7 +131,7 @@ Similarly for |tzdashed|.
% <m>: mandatory
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzbbox(-1,-1)(4,3) % is an abbreviation of:
\path [ use as bounding box ] (-1,-1) rectangle (4,3);
\end{tztikz}
@@ -152,7 +152,7 @@ A dot is usually expressed by a small circle.
The starred version \icmd{\tzcdot*} prints a filled circle dot \tikz \tzcdot*(0,0);.
The \xem{radius} of the circle is |1.2pt|, by default.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzcdot(<coor>)
% syntax: medium
@@ -173,12 +173,12 @@ There are \textsc{Three Ways} to change the \xem{radius} of a circle dot drawn b
\begin{enumerate}
\item The simplest way is to use the \xem{last parenthesis option}, like |\tzcdot(0,0)(3pt)|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzcdot(0,0) % is an abbreviation of:
\draw (0,0) circle (1.2pt); % default radius=1.2pt
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzcdot*(0,0)(3pt) % is an abbreviation of:
\draw [fill] (0,0) circle (3pt);
\end{tztikz}
@@ -187,12 +187,12 @@ There are \textsc{Three Ways} to change the \xem{radius} of a circle dot drawn b
You can use the key-value option |[tzcdot=<dim>]|, like |\tzcdot[tzcdot=3pt](0,0)|, to change the \xem{radius} of a circle dot. The |tzcdot| key is defined in the package.
If both the |tzcdot| key-value and the last parenthesis option are used, the former wins.
-\begin{tztikz}{}
+\begin{tztikz}
\tzcdot*(1,1) % works like:
\draw [fill] (1,1) circle [radius=1.2pt]; % default radius=1.2pt
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzcdot*[tzcdot=3pt] % works like:
\draw [fill] (0,0) circle [radius=3pt];
\end{tztikz}
@@ -226,7 +226,7 @@ It is effective within the |tizpicture| environment unless changed by \icmd{\set
\paragraph{How to label}
You can add a label to a specified coordinate by adding the optional argument |{<label>}| immediately after |(<coor>)|. You can also change the |{<label>}| position by the option |[<angle>]|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzcdot(0,0){A} % is an abbreviation of:
\draw (0,0) circle (1.2pt) node [label={:A}] {};
@@ -314,7 +314,7 @@ Let us call this kind of macro a \iisw{semicolon version} macro.
The starred version |\tzcdots*| prints multiple filled dots.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzcdots*(<coor>)(<coor>)..repeated..(<coor>) ;
% syntax: full
@@ -415,7 +415,7 @@ The macro \icmd{\tzdot} prints a small circle node \tikz \tzdot(0,0);, as a dot,
The starred version \icmd{\tzdot*} prints a filled dot \tikz \tzdot*(0,0);.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzdot(coor)
% syntax: medium
@@ -432,7 +432,7 @@ The starred version \icmd{\tzdot*} prints a filled dot \tikz \tzdot*(0,0);.
The style \ixxw{tzdot} is predefined in this package as follows:
-\begin{tzsty}{}
+\begin{tzsty}
% style: tzdot
\tikzset{
tzdot/.style={draw,circle,solid,thin,inner sep=0pt,minimum size=#1},
@@ -449,7 +449,7 @@ There are \iscw{Three Ways} to change the \xem{diameter} (or |minimum size|) of
\begin{enumerate}
\item Use the predefined style |tzdot| in the first optional agrument, like |\tzdot[tzdot=5pt](0,0)|, which gives the same result as |\tzdot[minimum size=5pt](0,0)|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzdot(0,0) % works like:
\path (0,0) node [tzdot=2.4pt] {}; % default size
% or equivalently
@@ -488,7 +488,7 @@ If both options are used, the |tzdot| (or |minimum size|) option overwrites the
You can add a label to a specified coordinate by specifying the optional argument |{<label>}| immediately after the coordinate |(<coor>)|.
You can also change the label position by the option |[<angle>]| or |[<[label opt]angle>]| following |{<label>}|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzdot(0,0){A}(3pt) % works like:
\path (0,0) node [tzdot=3pt,label={:A}] {};
@@ -610,7 +610,7 @@ This is critical when |xscale| is not equal to |yscale|.
The following table further shows the differences between them.
%Everything else is the same for end-users.
-\begin{tzcode}[listing only,colback=green!10!white]{.3}
+\begin{tzcode}{.3}[listing only,colback=green!10!white]
% concept % single % multi % size control % [key=default size]
node [circle] \tzdot \tzdots \settzdotsize [tzdot=2.4pt] % diameter
circle \tzcdot \tzcdots \settzcdotradius [tzcdot=1.2pt] % radius
@@ -650,7 +650,7 @@ This is a \iisw{semicolon version} macro, with the repeating pattern |(<coor>){<
The starred version \icmd{\tzdots*} prints multiple filled node dots.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzdots*(<coor>)(<coor>)..repeated..(<coor>) ;
% syntax: full
@@ -797,14 +797,14 @@ The \xem{empty} shift option |<>| is \xem{not allowed}.
For example, \icmd{\tzcoor}|(0,0)(A)| means that the coordinate |(0,0)| is named |(A)|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzcoor(0,0)(A) % is an abbreviation of:
\path (0,0) coordinate (A);
% or
\coordinate (A) at (0,0);
\end{tztikz}
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzcoor(<coor>)(<name>)
% syntax: medium
@@ -820,7 +820,7 @@ Here, |<m>| stands for `mandatory.' |\tzcoor| takes two mandatory arguments in p
\paragraph{How to label}
You can put a label to a coordinate by specifying the optional arguments |{<label>}| and |[<angle>]| immediately after |(<name>)|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzcoor(0,0)(A){$A$}[0] % works like:
\path (0,0) coordinate [label={0:$A$}] (A);
\end{tztikz}
@@ -855,7 +855,7 @@ The \xem{empty} shift option |<>| is \xem{not allowed}.
The starred version \icmd{\tzcoor*} works like |\tzcoor| with one exception. It prints a `node dot' of the size |2.4pt|, by default, at a specified coordinate.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzcoor*(<coor>)(<coor name>)
% syntax: medium
@@ -868,13 +868,13 @@ The starred version \icmd{\tzcoor*} works like |\tzcoor| with one exception. It
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzcoor*(0,0)(A) % works like:
\path (0,0) coordinate (A);
\tzdot*(0,0)
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzcoor(0,0)(A){$A$}[right] % works like:
\path (0,0) coordinate (A);
\tzdot*(0,0){$A$}[right]
@@ -930,7 +930,7 @@ The \xem{empty} shift option |<>| is \xem{not allowed}.
The macro \icmd{\tzcoors} takes an \xem{arbitrary number of pairs} of coordinates and their names as arguments.
For example, |\tzcoors(0,0)(A) (1,1)(B) (2,2)(C);| means that the coordinate |(0,0)| is represented by the name |(A)|, |(1,1)| by |(B)|, and |(2,2)| by |(C)|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzcoors(<coor>)(<name>..repeated..(<coor>)(<name>) ;
% syntax: full
@@ -944,7 +944,7 @@ This is a \xem{semicolon version} macro. The quadruple |(<coor>)(<name>){<label>
It is required to type a \xem{semicolon} `|;|' to indicate when the coordinate repetition ends.
-\begin{tztikz}{}
+\begin{tztikz}
\tzcoors (0,0)(A) (1,1)(B) (2,1)(C) (3,0)(D) ; % works like:
\path (0,0) coordinate (A)
(1,1) coordinate (B)
@@ -952,7 +952,7 @@ It is required to type a \xem{semicolon} `|;|' to indicate when the coordinate r
(3,0) coordinate (D);
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzcoors (0,0)(A) (1,1)(B) (2,1)(C){C}[0] (3,0)(D){D}[90]; % works like:
\path (0,0) coordinate (A)
(1,1) coordinate (B)
@@ -996,7 +996,7 @@ The starred version \icmd{\tzcoors*} takes an \xem{arbitrary number of pairs} of
The full repeating pattern is |(<coor>)(<name>){<label>}[<angle>]|.
It is required to type a \xem{semicolon} `|;|' to indicate when the iteration of coordinates ends.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzcoors*(<coor>)(<name>)..repeated..(<coor>)(<name>) ;
% syntax: full
@@ -1057,7 +1057,7 @@ The \xem{empty} shift option |<>| is \xem{not allowed}.
You can see the coordinate array at a glance using \icmd{\tzcoorsquick}, which displays specified names as text at the |center| (by default) of the coordinates.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzcoorsquick(<coor>)(<name>)..repeated..(<coor>)(<name>) ;
% syntax: full
@@ -1099,14 +1099,14 @@ You can move the coordinates by specifying |<shift coor>| immediately before the
The starred version \icmd{\tzcoorsquick*} prints node dots on the coordinates and displays the names |above| (or |90| degree from) the dots, by default.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzcoorsquick*(<coor>)(<name>)..repeated..(<coor>)(<name>) ;
% syntax: full
\tzcoorsquick*[<dot opt>]<shift coor>(<coor>)(<name>){<label>}[<[label opt]angle>]
- ..repeated.. ()(){}[] ;
+ ..repeated.. ()(){}[] ; (<dot size>)
% defaults
- *[ tzdot=1.2pt ]<> (<m>)(<m>){}[] ..repeated.. ()(){}[] ;
+ *[ tzdot=1.2pt ]<> (<m>)(<m>){}[] ..repeated.. ()(){}[] ; (2.4pt)
\end{tzdef}
\begin{tzcode}{.3}
@@ -1157,7 +1157,7 @@ You can also control each labels using |[<label opt>]| for each coordinate.
\icmd{\tzgetxyval} extracts the values of x-coordinate and the y-coordinate \xem{in the unit of centimeter} from a specified coordinate and saves the values in the user-defined macros, so that you can use them later.
For example, |\tzgetxyval(3,2){\xval}{\yval}| results in |\xval=3| and |\yval=2|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzgetxyval(<coor>){<\macroXval>}{<\macroYval>}
% default
@@ -1195,7 +1195,7 @@ Each |(<coor>)| can be followed by the optional arguments |{<label>}| and |[<ang
The macro |\tzplot| draws connected line segments that link specified coordinates.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzplot(<coor>)(<coor>)..repeated..(<coor>) ;
% syntax: medium
@@ -1216,7 +1216,7 @@ The starred version |\tzplot*| prints dot marks at specified coordinates, withou
|\tzplot*| is equivalent to |\tzplot[draw=none,mark=*]|.
The style \ixxw{tzmark} is defined as follows:
-\begin{tzsty}{}
+\begin{tzsty}
% style: tzmark
\tikzset{
tzmark/.style=
@@ -1238,7 +1238,7 @@ The value of |\tzmarksize| can be changed by the macro \icmd{\settzmarksize}, li
The starred version |\tzplot*| prints \Tikz\ marks (|*| by default) at specified coordinates.
You can change the mark color and mark style using the first bracket optional argument.
-\begin{tztikz}{}
+\begin{tztikz}
\tzplot*(0,0)(1,2)(2,2)(3,3); % works like:
\draw [draw=none,mark=*] plot coordinates { (0,0)(1,1)(2,2)(3,3) } ;
\end{tztikz}
@@ -1257,7 +1257,7 @@ You can change the mark color and mark style using the first bracket optional ar
\paragraph{Labels, marks, and mark size}
You can also add labels to specified coordinates with the optional arguments |{<label>}| and |[<angle>]| immediately after each |(<coor>)|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzplot*(0,0){A}[90](1,2)(2,2)(3,3){D}[0]; % works like:
\draw [draw=none,mark=*] plot coordinates { (0,0)(1,1)(2,2)(3,3) }
(0,0) node [label={90:A}] {}
@@ -1361,7 +1361,7 @@ These work with |\tzplot*[draw]| and |\tzplot| to extend the paths at the beginn
\begin{tzcode}{.3}
\begin{tikzpicture}
\tzhelplines(4,3)
-\tzplotAtBegin{(0,2) to [bend right]}
+\tzplotAtBegin{(0,2) to [bend right]} % ERROR!!!
\tzplotAtEnd{arc (90:0:1cm) node [b] {here?}}
\tzplot*[draw,blue](0,0)(1,1)(2,2){C}(3,2){D};
<arc (-90:0:1cm) node [r] {ends here!}>
@@ -1379,7 +1379,7 @@ These work with |\tzplot*[draw]| and |\tzplot| to extend the paths at the beginn
(By default, |tension=0|.)
-\begin{tztikz}{}
+\begin{tztikz}
\tzplot(0,0)(1,2)(2,2)(3,3); % works like:
\draw [tension=0] plot [smooth] coordinates { (0,0)(1,1)(2,2)(3,3) } ;
\end{tztikz}
@@ -1486,7 +1486,7 @@ You can also use \icmd{\tzplotAtBegin} and \icmd{\tzplotAtEnd} to extend the pat
With |\tzplot|, the default value of |tension| is |0|.
You can draw a curve with |\tzplot|, by specifying the optional argument |{<tension>}| before the coordinates or between the first and second bracket options (if they exist).
-\begin{tztikz}{}
+\begin{tztikz}
\tzplot[blue,smooth cycle]{1}(0,0)(1,2)(2,2)(3,3); % works like:
\draw [blue,tension=1] plot [smooth cycle] coordinates { (0,0)(1,1)(2,2)(3,3) } ;
\end{tztikz}
@@ -1594,7 +1594,7 @@ It can be a mess when using the \Tikz\ option |shift={(coor)}| with the type of
The starred version \icmd{\tzplotcurve*} draws a curve and displays marks |*|, by default.
Basically, this is equivalent to |\tzplot*[draw,tension=1]|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzplotcurve(<coor>)(<coor>)..repeated..(<coor>) ;
% syntax: full
@@ -1606,12 +1606,12 @@ Basically, this is equivalent to |\tzplot*[draw,tension=1]|.
*[tzmark=2pt]{1}[smooth] <>"" (<m>){}[] ..repeated.. (){}[] ; (2pt) <>
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzplotcurve(0,0)(1,2)(2,2)(3,3); % works like:
\draw [tension=1] plot [smooth] coordinates { (0,0)(1,1)(2,2)(3,3) } ;
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzplotcurve[blue,smooth cycle]{2}(0,0)(1,2)(2,2)(3,3); % works like:
\draw [blue,tension=2] plot [smooth cycle] coordinates { (0,0)(1,1)(2,2)(3,3) } ;
\end{tztikz}
@@ -1624,7 +1624,7 @@ For example, |(A){here}[above]| represents |(A) node [above] {here}| in \Tikz.
\paragraph{Options: lines, labels, colors, smooth cycle}
Use the first bracket option to control the colors of lines or labels.
-\begin{tztikz}{}
+\begin{tztikz}
\tzplotcurve(0,0)(1,2)(2,2){A}[below](3,3){B}[right]; % works like:
\draw [tension=1] plot [smooth] coordinates { (0,0)(1,1)(2,2)(3,3) }
(2,2) node [below] {A}
@@ -1735,7 +1735,7 @@ Specifying |<code.append>| extends the path after |\tzplotcurveAtEnd|.
\tzhelplines(4,3)
\tzplotcurve*[red,text=blue]
(0,0)(1,2){B}(2,2)(3,3)(4,1){E}[0];
-\tzplotcurveAtBegin{(0,2) |-}
+\tzplotcurveAtBegin{(0,2) |-} % ERROR!!!
\tzplotcurveAtEnd{arc (180:270:1cm) node {End!}}
\tzplotcurve(1,.5)(2,3)(3,2)(2,1)(3,1);
\end{tikzpicture}
@@ -1772,7 +1772,7 @@ You can also \xem{optionally} name a node so that you can refer to the \iisw{nod
The starred version \icmd{\tznode*} is equivalent to |\tznode[draw]|, which draws the perimeter of the specified node. The default node shape is a |rectangle|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tznode(<coor>){<text>}
% syntax: full
@@ -1781,21 +1781,21 @@ The starred version \icmd{\tznode*} is equivalent to |\tznode[draw]|, which draw
[]<>(<m>)(){<m>}[]<>
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tznode(0,0){text} % works like:
\path (0,0) node {text};
% or
\node at (0,0) {text};
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tznode[draw] (0,0)(A){text}[above right] % works like:
\node [draw] (A) at (0,0) [above right] {text};
\end{tztikz}
|\tznode*| prints the perimeter of a node, which is a |rectangle| by default.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tznode*(<coor>){<text>}
% syntax: full
@@ -1804,7 +1804,7 @@ The starred version \icmd{\tznode*} is equivalent to |\tznode[draw]|, which draw
*[draw]<>(<m>)(){}[]<>
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tznode* (0,0)(A){text}[above right] % works like:
\node [draw] (A) at (0,0) [above right] {text};
\end{tztikz}
@@ -1896,7 +1896,7 @@ The \xem{last} optional argument |<node.code>| can be used to iterate over to pl
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tznode(\x,0){\x}<foreach \x in {1,2,3}> % works like
\node foreach \x in {1,2,3} at (\x,0) {\x};
\end{tztikz}
@@ -1918,7 +1918,7 @@ The \xem{last} optional argument |<node.code>| can be used to iterate over to pl
\icmd{\tznodes} accepts any number of \xem{mandatory} pairs of coordinates and their names to defined node coordinates at specified coordinates.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tznodes(<coor>)(<node name>)..repeated..(<coor>)(<node name>) ;
% syntax: medimum
@@ -1951,7 +1951,7 @@ The starred version \icmd{\tznodes*} is equivalent to |\tznodes[draw]|. That is,
\end{tzcode}
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tznodes(<coor>)(<node name>)..repeated..(<coor>)(<node name>) ;
% syntax: medimum
@@ -2021,7 +2021,7 @@ The starred version \icmd{\tznodes*} is equivalent to |\tznodes[draw]|. That is,
The starred version \icmd{\tznodedot*} prints a filled circle node dot (of the size |2.4pt|, by default), just like |\tzdot*|. But it \xem{optionally} names a node.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: medium
\tznodedot(<coor>)(<node name>){<label>}[<angle>]
% syntax: full
@@ -2034,7 +2034,7 @@ The starred version \icmd{\tznodedot*} prints a filled circle node dot (of the s
Since |\tznodedot(*)| prints a node dot, its |<label>| is placed by |<angle>|.
-\begin{tztikz}{}
+\begin{tztikz}
\tznodedot*(1,1)(A){Ace}[180] % works like:
\path (1,1) node (A) [tzdot,fill,label={180:Ace}] {} ;
\end{tztikz}
@@ -2113,7 +2113,7 @@ Everything else is the same as in |\tzdots|.
The starred version \icmd{\tznodedots*} prints filled node circle dots.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tznodedots(<coor>)(<node name>)..repeated..(<coor>)(<node name>) ;
% syntax: full
@@ -2208,14 +2208,14 @@ the following example shows that |\tzlines| connects coordinates.
%\icmd{\tznoderectangle} and \icmd{\tznodebox} are aliases of |\tznodeframe|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\tznodeframe[<opt>](<coor>)(<node name>){<text>}[<node opt>]
% defaults
[draw]<>(<m>)(){}[text=black]
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tznodeframe(2,1)(A){Here}[a] % works like
\node [draw,rectangle] (A) at (2,1) [above] {Here} ;
\end{tztikz}
@@ -2250,7 +2250,7 @@ The starred version |\tznodeframe*| fills the rectangle with color (|black!50| b
%\icmd{\tznoderectangle*} and \icmd{\tznodebox*} are aliases of |\tznodeframe*|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\tznodeframe*[<opt>]<shift coor>
(<coor>)(<node name>){<text>}[<node opt>]{<fill opacity>}
@@ -2313,7 +2313,7 @@ The default fill color is |black!50|. You can use the macro \icmd{\settzfillcolo
\icmd{\tznodecircle} works just like |\tznodeframe| but with a circle node.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tznodecircle[<opt>]<shift coor>(<coor>)(<node name>){<text>}[<node opt>]
% defaults
@@ -2322,7 +2322,7 @@ The default fill color is |black!50|. You can use the macro \icmd{\settzfillcolo
\icmd{\tznodecircle*} works just like |\tznodeframe*| but with a circle node.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tznodecircle*[<opt>]<shift coor>
(<coor>)(<node name>){<text>}[<node opt>]{<fill opacity>}
@@ -2368,7 +2368,7 @@ The \xem{empty} shift coordinate option |<>| is \xem{not allowed}.
\icmd{\tznodeellipse} works just like |\tznodeframe| but with an ellipse node.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\tznodeellipse[<opt>]<shift coor>(<coor>)(<node name>){<text>}[<node opt>]
% defaults
@@ -2377,7 +2377,7 @@ The \xem{empty} shift coordinate option |<>| is \xem{not allowed}.
The starred version \icmd{\tznodeellipse*} works just like |\tznodeframe*| but with an ellipse node.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\tznodeellipse*[<opt>]<shift coor>
(<coor>)(<node name>){<text>}[<node opt>]{<fill opacity>}
@@ -2430,7 +2430,7 @@ The \xem{empty} shift option |<>| is \xem{not allowed}.
\icmd{\tzline} connects two points with a straight line.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: miminum
\tzline(<coor1>)(<coor2>)
% syntax: medium
@@ -2445,7 +2445,7 @@ The \xem{empty} shift option |<>| is \xem{not allowed}.
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzline(0,1)(2,1) % works like:
\draw (0,1) -- (2,1);
\end{tztikz}
@@ -2456,7 +2456,7 @@ The \xem{empty} shift option |<>| is \xem{not allowed}.
You can use the first optional argument |[<opt>]| to control the line styles.
-\begin{tztikz}{}
+\begin{tztikz}
\tzline[blue](0,1)(2,1) % works like:
\draw [blue] (0,1) -- (2,1);
\end{tztikz}
@@ -2480,7 +2480,7 @@ You can add text by specifying the optional arguments |{<text>}| and |[<node opt
\paragraph{Text next to the line}
With the options |{<text1>}[<node opt1>]| \xem{in-between} two coordinates, you can add text next to the line, with the option |[above,midway]| by default.
-\begin{tztikz}{}
+\begin{tztikz}
\tzline[blue](0,1){my line}[sloped](2,1) % works like:
\draw [blue] (0,1) -- node [above,sloped] {my line} (2,1) ;
\end{tztikz}
@@ -2502,7 +2502,7 @@ You can use the \xem{abbreviations} (or aliases) of \Tikz\ basic placement optio
You can also add text at (by default) or around the second coordinate by specifying |{<text2>}| and |[<node opt2>]| immediately \xem{after} the second coordinate.
-\begin{tztikz}{}
+\begin{tztikz}
\tzline[blue](0,1)(2,1){my line}[r] % works like:
\draw [blue] (0,1) -- (2,1) node [right] {my line};
\end{tztikz}
@@ -2525,7 +2525,7 @@ You can also add text at (by default) or around the second coordinate by specify
%You can make the second coordinate relative to the first.
%You can even select `|+| relative' or `|++| relative' by specifying the option |<+>| or |<++>| immediately before the second coordinate.
%
-%\begin{tztikz}{}
+%\begin{tztikz}
%\tzline+(0,0)<+>(2,1) % works like:
% \draw (1,1) -- + (2,1);
%\end{tztikz}
@@ -2625,7 +2625,7 @@ The \iisw{plus version} \icmd{\tzline+} takes the second coordinate |(<coor2>)|
\xem{Everything else is the same as in} |\tzline|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: full
\tzline+[<opt>]<shift coor>"<path name>"
(<coor1>){<text1>}[<node opt1>]
@@ -2635,12 +2635,12 @@ The \iisw{plus version} \icmd{\tzline+} takes the second coordinate |(<coor2>)|
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzline+(0,1)(2,1) % works like:
\draw (0,1) -- ++ (2,1);
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzline+[dashed]"AA"(0,1){A}[red](2,1){B}[right,blue] % works like:
\draw [dashed,name path=AA]
(0,1) -- node [red] {A} ++ (2,1) node [right,blue] {B};
@@ -2677,7 +2677,7 @@ The \iisw{plus version} \icmd{\tzline+} takes the second coordinate |(<coor2>)|
The styles \ixxw{tzshorten} and \ixxw{tzextend} are defined as follows:
-\begin{tzsty}{}
+\begin{tzsty}
% tzshorten
\tikzset{%
tzshorten/.style 2 args ={shorten <=#1, shorten >=#2},
@@ -2716,7 +2716,7 @@ The style |tzextend| is a negative |tzshorten|. For example, |tzextend{2mm}{1mm}
\icmd{\tzlines} connects two or more points with connected line segments.
Since |\tzlines| takes an arbitrary number of coordinates as arguments, it is a \xem{semicolon version}. So, you need to enter a semicolon `|;|' to indicate when the coordinate iteration ends.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzlines(<coor>)(<coor>)..repeated..(<coor>) ;
% syntax: medium
@@ -2730,7 +2730,7 @@ Since |\tzlines| takes an arbitrary number of coordinates as arguments, it is a
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzlines(1,1)(2,2)(3,1)(4,3); % works like:
\draw (1,1) -- (2,2) -- (3,1) -- (4,3);
\end{tztikz}
@@ -2738,7 +2738,7 @@ Since |\tzlines| takes an arbitrary number of coordinates as arguments, it is a
The whole repeating pattern in |\tzlines| is the triple |(<coor>){<text>}[<node opt>]|.
%Any |<+ or ++>| after the last coordinate, if any, is ignored.
-\begin{tztikz}{}
+\begin{tztikz}
\tzlines(1,1)(2,2)(3,1){C}(4,3){D}[r]; % works like:
\draw (1,1) -- (2,2) -- (3,1) -- node {C} (4,3) node [right] {D};
\end{tztikz}
@@ -2898,7 +2898,7 @@ The \iisw{plus version} \icmd{\tzlines+} connects two or more points with connec
It is also required to enter a \xem{semicolon} to indicate when the coordinate iteration ends.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzlines+ (<coor>)(<coor>) ..repeat.. (<coor>) ;
% syntax: full
@@ -2910,13 +2910,13 @@ It is also required to enter a \xem{semicolon} to indicate when the coordinate i
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzlines+(0,1)(1,1)(2,-1)(1,2); % works like:
\draw (0,1) -- ++(1,1) -- ++(2,-1) -- ++(1,2);
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzlines+[dashed]"AA"(0,1){A}(1,1){B}(2,-1){C}(1,2){D}[right]; % works like:
\draw [dashed,name path=AA]
(0,1) -- node {A} ++(1,1)
diff --git a/graphics/pgf/contrib/tzplot/tzplot-doc-C1-v2.0.tex b/graphics/pgf/contrib/tzplot/tzplot-doc-C1-v2.1.tex
index 4e61cbd695..811615ec1b 100644
--- a/graphics/pgf/contrib/tzplot/tzplot-doc-C1-v2.0.tex
+++ b/graphics/pgf/contrib/tzplot/tzplot-doc-C1-v2.1.tex
@@ -19,7 +19,7 @@
\icmd{\tzto} connects two points with a straight or curved line, using \Tikz's |to| operation.
So |\tzto| is more general than |\tzline|, which only connects points only with a straight line.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzto(<coor>)(<coor>)
% syntax: medium
@@ -33,7 +33,7 @@ So |\tzto| is more general than |\tzline|, which only connects points only with
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzto[dashed](1,1)(3,2) % works like:
\draw [dashed] (1,1) to (3,2);
\end{tztikz}
@@ -58,7 +58,7 @@ You can control line styles with the first optional argument |[<opt>]|.
You can add text \xem{next to the line} (|[midway,above]|, by default) by specifying the options |{<text>}| and |[<node opt>]| \xem{in-between} the two coordinates.
-\begin{tztikz}{}
+\begin{tztikz}
\tzto[->,bend right](1,1){A}[near start](3,2) % works like:
\draw [->,bend right] (1,1) to node [near start] {A} (3,2);
@@ -146,7 +146,7 @@ The \iisw{plus version} \icmd{\tzto+} uses the second coordinate relative to the
\xem{Everything else is the same as in} |\tzto|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzto+(1,1)(3,2) % works like:
\draw (1,1) to ++(3,2);
\end{tztikz}
@@ -194,7 +194,7 @@ The \iisw{plus version} \icmd{\tzto+} uses the second coordinate relative to the
\icmd{\tztos} takes an arbitrary number of coordinates as arguments to connect them by the \Tikz's |to| operation. |\tztos| is much more flexible than |\tzlines|. Since this is a \xem{semicolon version}, you need to enter a \xem{semicolon} to indicate when the coordinate iteration ends.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tztos[<opt>]<shift coor>"<path name>"
(<coor1>)[<to opt>]{<text>}[<node opt>]..repeated..()[]{}[] ; <code.append>
@@ -206,12 +206,12 @@ The quadruple |(<coor>)[<to opt>]{<text>}[<node opt>]| is
the whole repeating pattern.
Here, |[<to opt>]| is for the options of \Tikz's |to| operation such as |[bend right]|, |[bend left]|, |[bend left=<angle>]|, |[out=<angle>,in=<angle>]| and so on.
-\begin{tztikz}{}
+\begin{tztikz}
\tztos(0,0)(1,2)(3,1); % works like:
\draw (0,0) to (1,2) to (3,1);
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tztos[blue] (0,0) [bend right] (1,2) [out=-60,in=45] (3,1); % works like:
\draw[blue] (0,0) to [bend right] (1,2) to [out=-60,in=45] (3,1);
\end{tztikz}
@@ -369,7 +369,7 @@ The default link style is |to|, which can be changed with the \xem{second} optio
Another way is to use the \xem{first} curly brace option |{<link style>}|.
You can also change it by \icmd{\settzlinkstyle} like, for example, \verb+\settzlinkstyle{-|}+, which is effective until the end of the |tikzpicture| environment.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzlink(<coor1>)(<coor2>) % default: to
% syntax: medium
@@ -388,12 +388,12 @@ You can also change it by \icmd{\settzlinkstyle} like, for example, \verb+\settz
{to}[]<>""(<m>)[]{}[above]<>(<m>){}[]<>
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzlink(1,0)(3,1) % works like:
\draw (1,0) to (3,1);
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzlink(1,0)[-|]<++>(3,1) % works like:
\draw (1,0) -| ++ (3,1);
\end{tztikz}
@@ -428,7 +428,7 @@ The \iisw{plus version} \icmd{\tzlink+} uses the second coordinate relative (wit
Everything else is the same as in |\tzlink|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzlink (1,0)[to[bend right]]{A}[a]<++>(3,1) % or
\tzlink+(1,0)[to[bend right]]{A}[a] (3,1) % works like:
\draw (1,0) to[bend right] node [above] {A} ++ (3,1);
@@ -535,7 +535,7 @@ You can change how two adjacent points are connected.
|\tzlinks| is quite \xem{flexible} that you can think of it as a \xem{generalized version} of |\tzlines|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzlinks (<coor>)(<coor>) ..repeated.. (<coor>) ;
% syntax: full
@@ -565,7 +565,7 @@ There are three ways of changing link styles:
\item The effect of the macro |\settzlinkstyle| remains until the end of |tikzpicture| environment, unless changed again.
\end{itemize}
-\begin{tztikz}{}
+\begin{tztikz}
% standard version
\tzlinks(1,1)(2,2)(3,1)(4,3); % works like:
\draw (1,1) to (2,2) to (3,1) to (4,3);
@@ -642,7 +642,7 @@ So you need to be careful when you move the path or find intersection points.
The \iisw{plus version} \icmd{\tzlinks+} treats a coordinate as relative (with |++| by default) to the previous coordinate, except the first coordinate.
-\begin{tztikz}{}
+\begin{tztikz}
% plus (+) version
\tzlinks+(1,1)(2,2){--}(3,1)(4,3); % works like:
\draw (1,1) to ++(2,2) -- ++(3,1) to ++(4,3);
@@ -659,7 +659,7 @@ The \iisw{plus version} \icmd{\tzlinks+} treats a coordinate as relative (with |
The \xem{starred version} \icmd{\tzlinks*} is to fill the closed area formed by |\tzlinks| with color or pattern. The related default value is |[fill=black!50, fill opacity=.3, text opacity=1]|.
In fact, |\tzlinks*[draw=none]| is (almost) the same as |\tzpath*| (See Section \ref{s:tzpath*} on page \pageref{s:tzpath*} for more details).
-\begin{tztikz}{}
+\begin{tztikz}
% starred (*) version
\tzlinks*(1,1)(2,2)(3,1)(4,3); % works like:
\draw [fill=black!50,fill opacity=.3,text opacity=1]
@@ -712,7 +712,7 @@ The effect remains valid until the end of the |tikzpicture| environment, unless
\paragraph{Adding text}
You can add text next to connected line segment or around the last coordinate by specifying options |{<text>}[<node option>]|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzlinks+[dashed]"AA"(1,1){A}(2,2)[--]{B}[a]<+>(3,1){C}[b]; % works like
\draw [dashed,name path=AA]
(1,1) to node {A}
@@ -844,12 +844,12 @@ Specifying the option |<code.append>| extends the path after |\tzlinksAtEnd|.
\label{s:tzpath}
-\icmd{\tzpath} is the same as |\tzlinks[draw=none]|. In other words, |\tzpath| creates a path connecting an arbitrary number of coordinates, but it does not stroke the path. Since |\tzpath| is a \iisw{semicolon version} macro, you need to enter a \xem{semicolon} `|;|' to indicate where the coordinate iteration ends.
+The macro \icmd{\tzpath} is the same as |\tzlinks[draw=none]|. In other words, |\tzpath| creates a path connecting an arbitrary number of coordinates, but it does not stroke the path. Since |\tzpath| is a \iisw{semicolon version} macro, you need to enter a \xem{semicolon} `|;|' to indicate where the coordinate iteration ends.
You can visualize the path with |\tzpath[draw]|, which is the same as |\tzlinks|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzpath (<coor>)(<coor>) ..repeated.. (<coor>) ;
% syntax: full
@@ -868,7 +868,7 @@ You can visualize the path with |\tzpath[draw]|, which is the same as |\tzlinks|
\remark
\begin{itemize}
-\item The main purpose of |\tzpath| is to fill an enclosed area with color or pattern.
+\item The main purpose of |\tzpath| is to fill an enclosed area with colors or patterns.
You can use |\tzpath[fill]| or |\tzpath[pattern=<...>]| to do it.
\item Use \icmd{\settzpathlayer}, like |\settzpathlayre{behind}|, to change the layer of |\tzpath| (default: |main|).
\end{itemize}
@@ -950,7 +950,7 @@ The only difference between |\tzpath*| and |\tzlinks*[draw=none]| is that the la
|\tzpath*| works like |\tzpath[fill=black!50,fill opacity=.3,text opacity=1]|.
You can change the defaults by \icmd{\settzfillcolor} and \icmd{\settzfillopacity}.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzpath*(<coor>)(<coor>) ..repeated.. (<coor>) ; {<fill opacity>}
% syntax: full
@@ -1083,7 +1083,7 @@ There are many ways to draw curves.
\icmd{\tzbezier} accepts \xem{three or four} coordinates to draw a B\'{e}zier curve from the first coordinate to the last coordinate, with \xem{one or two} control points.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzbezier(<start-coor>)(cntl-coor>)(<last-coor>)
\tzbezier(<start-coor>)(cntl-coor>)(<cntl-coor>)(<last-coor>)
@@ -1099,13 +1099,13 @@ There are many ways to draw curves.
You can specify one or two control points, |(<cntl-coor>)|.
-\begin{tztikz}{}
+\begin{tztikz}
% three coordinates: one control point
\tzbezier(0,1)(1,0)(4,3) % works like:
\draw (0,0) ..controls (1,0).. (4,3);
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
% four coordinates: two control points
\tzbezier(0,1)(1,0)(2,4)(4,3) % works like:
\draw (0,0) ..controls (1,0) and (2,4).. (4,3);
@@ -1224,7 +1224,7 @@ Specifying the option |<code.append>| extends the path after |\tzbezierAtEnd|.
For the \iisw{plus version} \icmd{\tzbezier+}, the last coordinate is \xem{relative} to the first coordinate.
And the first control point is \xem{relative} to the first coordinate.
-\begin{tztikz}{}
+\begin{tztikz}
% three coordinates
\tzbezier+(0,1)(1,-1)(4,3) % works like:
\draw (0,1) ..controls +(1,-1).. ($(0,1)+(4,3)$);
@@ -1234,7 +1234,7 @@ In \Tikz, the second control point is \xem{relative} to the last coordinate.
Therefore, for |\tzbezier+(A)(B)(C)(D)|, |(B)| and |(D)| are \xem{relative} to |(A)|, and the second control point |(C)| is \xem{relative} to the last coordinate |(D)|.
-\begin{tztikz}{}
+\begin{tztikz}
% four coordinates
\tzbezier+(0,1)(1,-1)(-2,1)(4,3) % works like:
\draw (0,1) ..controls +(1,-1) and +(-2,1).. ($(0,1)+(4,3)$);
@@ -1278,20 +1278,20 @@ Therefore, for |\tzbezier+(A)(B)(C)(D)|, |(B)| and |(D)| are \xem{relative} to |
\icmd{\tzparabola} accepts \xem{two or three} coordinates to draw a parabola from the first coordinate to the last coordinate.
In the case of three coordinates, the parabola bends at the second coordinate.
-\begin{tztikz}{}
+\begin{tztikz}
% two coordinates
\tzparabola(0,0)(3,2) % works like:
\draw (0,0) parabola (3,2);
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
% three coordinates
\tzparabola(0,0)(1,1)(3,2) % works like:
\draw (0,0) parabola bend (1,1) (3,2);
\end{tztikz}
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzparabola(<coor>)(<coor>)
\tzparabola(<coor>)(<coor>)(<coor>)
@@ -1403,18 +1403,18 @@ Specifying the option |<code.append>| extends the path after |\tzparabolaAtEnd|.
\subsection{\protect\cmd{\tzparabola+}: Relative coordinates}
\label{ss:tzparabola+}
-The \iisw{plus version} \icmd{\tzparabola+} use the second and the third coordinates xem{relative} to the first coordinate.
+The \iisw{plus version} \icmd{\tzparabola+} uses the second and the third coordinates \xem{relative} to the first coordinate.
\xem{Everything else is the same as in} |\tzparabola|.
-\begin{tztikz}{}
+\begin{tztikz}
% two coordinates
-\tzparabola+(0,1)(3,2) % works like:
+\tzparabola+(0,1)(1,2) % works like:
\draw (0,1) parabola ($(0,1)+(1,2)$);
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
% three coordinates
\tzparabola+(0,1)(1,1)(3,-1) % works like:
\draw (0,1) parabola bend +(1,1) ($(0,1)+(3,-1)$);
@@ -1443,7 +1443,7 @@ The \iisw{plus version} \icmd{\tzparabola+} use the second and the third coordin
The macro \icmd{\tzedge} connects two coordinates with a straight or curved line, using the \Tikz\ |edge| operation.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzedge[<opt>]<shift coor>
(<coor>){<text>}[<opt>](<coor>){<text>}[<opt>]<code.append>
@@ -1454,12 +1454,12 @@ The macro \icmd{\tzedge} connects two coordinates with a straight or curved line
\remark In \Tikz, the |edge| operation works like the |to| operation, but it is independently drawn after a main path is drawn and does not form a main path. So the option |"<path name>"| (for finding intersections) is not provided in |\tzedge|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzedge(1,1)(3,2) % works like:
\draw (1,1) edge (3,2);
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzedge[->,bend right](1,1){A}[near start](3,2) % works like:
\draw (1,1) edge [->,bend right] node [near start] {A} (3,2);
\end{tztikz}
@@ -1477,12 +1477,12 @@ The macro \icmd{\tzedge} connects two coordinates with a straight or curved line
The \xem{plus version} \icmd{\tzedge+} use the second coordinate \xem{relative} to the first coordinate.
-\begin{tztikz}{}
+\begin{tztikz}
\tzedge+(1,1)(3,2) % works like:
\draw (1,1) edge ++(3,2);
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzedge+[->,bend right](1,1){A}[near start](3,2){B}[right] % works like:
\draw (1,1) edge [->,bend right] node [near start] {A} ++(3,2)
++(3,2) node [right] {B};
@@ -1523,7 +1523,7 @@ The macro \icmd{\tzedges} accepts any number of coordinates to draw edges from t
|\tzedges| is a semicolon version, so you need to type |;| to indicate when the coordinate iteration ends.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzedges(<coor>)(<coor>)..repeated..(<coor>);
% syntax: full
@@ -1553,7 +1553,7 @@ The macro \icmd{\tzedges} accepts any number of coordinates to draw edges from t
\end{tikzpicture}
\end{tzcode}
-\begin{tztikz}{}
+\begin{tztikz}
\tzedges(0,1){A}(1,2)[blue,thick]{edge}[a](3,1)(4,3); % works like
\draw (0,1) edge node {A} (1,2)
edge [blue,thick] node [above] {edge} (3,1)
@@ -1576,7 +1576,7 @@ The macro \icmd{\tzedges} accepts any number of coordinates to draw edges from t
The \xem{plus version} \icmd{\tzedges+} uses the second and next coordinates \xem{relative} to the first coordinate.
-\begin{tztikz}{}
+\begin{tztikz}
\tzedges+(0,1)(2,1)(3,0)(4,2); % works like
\draw (0,1) edge ++ (2,1)
edge ++ (3,0)
diff --git a/graphics/pgf/contrib/tzplot/tzplot-doc-C2-v2.0.tex b/graphics/pgf/contrib/tzplot/tzplot-doc-C2-v2.1.tex
index f7a05fca54..f29e86756b 100644
--- a/graphics/pgf/contrib/tzplot/tzplot-doc-C2-v2.0.tex
+++ b/graphics/pgf/contrib/tzplot/tzplot-doc-C2-v2.1.tex
@@ -22,7 +22,7 @@
\icmd{\tzpolygon} connects an arbitrary number of coordinates to draw a polygon, a closed figure. |\tzpolygon| is equivalent to a \xem{closed} |\tzlines|. Since |\tzpolygon| is a \xem{semicolon version}, you need to enter a \xem{semicolon} to indicate when the coordinate repetition ends.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzpolygon(<coor>)(<coor>)..repeated..(<coor>) ;
% syntax: medium
@@ -35,7 +35,7 @@
[]<>""(<m>){}[] ..repeated.. (){}[] ; <>
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzpolygon(1,1)(2,2)(3,1)(4,3); % works like:
\draw (1,1) -- (2,2) -- (3,1) -- (4,3) -- cycle;
\end{tztikz}
@@ -80,7 +80,7 @@ The \xem{empty} shift option |<>| is \xem{not allowed}.
The starred version \icmd{\tzpolygon*} paints the interior of the polygon with the default options |fill=black!50| with |fill opacity=.3| and |text opacity=1|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzpolygon*(<coor>)(<coor>)..repeated..(<coor>) ;
% syntax: medium
@@ -123,12 +123,12 @@ The plus version \icmd{\tzpolygon+} uses each coordinate (except the first one)
\icmd{\tzpolygon*+} is just a plus version of |\tzpolygon*|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzpolygon+(1,1)(2,2)(3,1)(4,3); % works like:
\draw (1,1) -- ++(2,2) -- ++(3,1) -- ++(4,3) -- cycle;
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzpolygon+[dashed]"AA"(1,1)(2,2){A}(3,1){B}[below]; % works like:
\draw [dashed,name path=AA] (1,1)
-- ++(2,2)
@@ -164,7 +164,7 @@ The plus version \icmd{\tzpolygon+} uses each coordinate (except the first one)
\icmd{\tzframe} accepts two coordinates draws a rectangle.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzframe(<coor>)(<coor>)
% syntax: full
@@ -175,7 +175,7 @@ The plus version \icmd{\tzpolygon+} uses each coordinate (except the first one)
\icmd{\tzrectangle} and \icmd{\tzbox} are aliases of |\tzframe|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzframe(0,1)(3,2) % works like:
\draw (0,1) rectangle (3,2);
\end{tztikz}
@@ -183,7 +183,7 @@ The plus version \icmd{\tzpolygon+} uses each coordinate (except the first one)
The plus version \icmd{\tzframe+} uses the second coordinate as the coordinate relative (with |++|) to the first. \icmd{\tzrectangle+} and \icmd{\tzbox+} are aliases of |\tzframe+|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzframe+(0,1)(3,2) % works like:
\draw (0,1) rectangle ++(3,2);
\end{tztikz}
@@ -204,7 +204,7 @@ with |black!50| with |fill opacity=.3| and |text opacity=1|, by default.
|\tzframe+| has also its starred version \icmd{\tzframe*+}.
(\icmd{\tzrectangle*+} and \icmd{\tzbox*+} are aliases of |\tzframe*+|.)
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzframe*[<opt>]<shift coor>"<path name>"
(<coor1>)(<coor2>){<fill opacity>}<code.append>
@@ -258,7 +258,7 @@ You can use the last option |<code.append>| to add more \Tikz\ code.
\icmd{\tzrectanglering*} draws two rectangles and draws a rectangle ring by filling the interior with the default options \ixxw{even odd rule}, |fill=black!50|, |fill opacity=.3|, and |text opacity=1|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzrectanglering*(<coorA1>)(<coorA2>)(<coorB1>)(<coorB2>)
% syntax: full
@@ -270,7 +270,7 @@ You can use the last option |<code.append>| to add more \Tikz\ code.
<>(<m>)(<m>)()(){.3}<>
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzrectanglering*(A1)(A2)(B1)(B2) % works like:
\draw [fill=black!50,fill opacity=.3,text opacity=1, even odd rule]
(A1) rectangle (A2)
@@ -300,7 +300,7 @@ You can use the last option |<code.append>| to add more \Tikz\ code.
\icmd{\tzrectanglering} draws two rectangles with the default option |even odd rule|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzrectanglering(<coorA1>)(<coorA2>)(<coorB1>)(<coorB2>)
% syntax: full
@@ -310,7 +310,7 @@ You can use the last option |<code.append>| to add more \Tikz\ code.
[even odd rule]<>(<m>)(<m>)()()<>
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzrectanglering(0,0)(2,2)(.5,.5)(1.5,1.5) % works like:
\draw (0,0) rectangle (2,2)
(.5,.5) rectangle (1.5 and 1.5);
@@ -374,14 +374,14 @@ With the last option |<code.append>| you can add some more \Tikz\ code.
\icmd{\tzcircle} draws a circle around a specified coordinate with a specified radius.
The coordinate and the radius are mandatory.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzcircle[<opt>]<shift coor>"<path name>"(<coor>)(<radius>)<code.append>
% defaults
[]<>""(<m>)(<m>)<>
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzcircle(0,0)(1cm) % works like:
\draw (0,0) circle (1cm);
\end{tztikz}
@@ -402,12 +402,12 @@ The starred version \icmd{\tzcircle*} fills the interior
with |fill=black!50| with |fill opacity=.3| and |text opacity=1|, by default.
You can change the fill opacity using the curly brace option |{<fill opacity>}| \xem{right after} the option |(<radius>)|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzcircle*[<opt>]<shift coor>"<path name>"
(<coor>)(<radius>){<fill opacity>}<code.append>
% defaults
- *[fill=black!50,fill opacity=.3]<>""(<m>)(<m>){.3}<>
+ *[fill=black!50,fill opacity=.3,text opacity=1]<>""(<m>)(<m>){.3}<>
\end{tzdef}
@@ -445,7 +445,7 @@ With the last option |<code.append>|, you can add some \Tikz\ code.
\icmd{\tzring*} draws two circles and draws a circle ring by filling the interior with the default options \ixxw{even odd rule}, |fill=black!50|, |fill opacity=.3|, and |text opacity=1|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzring*(<coor>)(<radius>)(<coor>)(<radius>)
% syntax: full
@@ -456,7 +456,7 @@ With the last option |<code.append>|, you can add some \Tikz\ code.
<>(<m>)(<m>)()(){.3}<>
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzring*(0,0)(1cm)(0,0)(1.5cm) % works like:
\draw [fill=black!50,fill opacity=.3,text opacity=1, even odd rule]
(0,0) circle (1cm) (0,0) circle (1.5cm);
@@ -503,7 +503,7 @@ With the last option |<code.append>|, you can add some \Tikz\ code.
\icmd{\tzring} draws two circles with the default option \ixxw{even odd rule}.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzring*(<coor>)(<radius>)(<coor>)(<radius>)
% syntax: full
@@ -570,7 +570,7 @@ with |fill=black!50| with |fill opacity=.3| and |text opacity=1|, by default.
|\tzellise(*)| is basically the same as |\tzcircle(*)|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzellipse*[<opt>]<shift coor>"<path name>"
(<coor>)(<x and y radius>){<fill opacity>}<code.append>
@@ -582,7 +582,7 @@ with |fill=black!50| with |fill opacity=.3| and |text opacity=1|, by default.
-\begin{tztikz}{}
+\begin{tztikz}
\tzellipse(0,0)(1 and .5) % works like:
\draw (0,0) ellipse (1 and .5);
\end{tztikz}
@@ -630,7 +630,7 @@ You can add some \Tikz\ code with the option |<code.append>|.
|\tzellipsering(*)| is basically the same as |\tzring(*)|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzellipse*(<coor>)(<x and y radius>)(<coor>)(<x and y radius>)
% syntax: full
@@ -644,7 +644,7 @@ You can add some \Tikz\ code with the option |<code.append>|.
*[even odd rule]<>(<m>)(<m>)()()<>
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzellipsering*(2,1)(1cm and 1.5cm)(2,2)(1.5cm and 1.5cm) % works like:
\draw [fill=black!50,fill opacity=.3,text opacity=1, even odd rule]
(2,1) ellipse (1cm and 1.5cm) (2,2) ellipse (1.5cm and 1.5cm);
@@ -705,7 +705,7 @@ You can add some \Tikz\ code with the option |<code.append>|.
\icmd{\tzarc} draws an arc around a specified \xem{center coordinate}.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzarc(<coor>)(<angA:angB:radius>)
% syntax: full
@@ -716,14 +716,14 @@ You can add some \Tikz\ code with the option |<code.append>|.
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzarc(1,1)(30:120:1) % works like:
\draw (1,1) ++(30:1) arc (30:120:1);
\end{tztikz}
The \iisw{swap version} \icmd{\tzarc'} switches its drawing direction from \ixxw{counterclockwise} to \ixxw{clockwise} and vice versa.
-\begin{tztikz}{}
+\begin{tztikz}
\tzarc'(1,1)(30:120:1) % works like:
\draw (1,1) ++(30:1) arc (30:120-360:1);
\end{tztikz}
@@ -825,7 +825,7 @@ You can also extend the path of |\tzarc| by specifying the last option |<code.ap
\icmd{\tzarcfrom} draws an arc starting from a specified point, like \Tikz\ does.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzarcfrom(<coor>)(<angA:angB:radius>)
% syntax: full
@@ -836,7 +836,7 @@ You can also extend the path of |\tzarc| by specifying the last option |<code.ap
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzarcfrom(1,1)(30:120:1) % works like:
\draw (1,1) arc (30:120:1);
\end{tztikz}
@@ -866,7 +866,7 @@ You can also extend the path of |\tzarc| by specifying the last option |<code.ap
The macro \icmd{\tzarcsfrom} (i.e. |\tzarcs + from|) accepts an arbitrary number of parenthesis arguments in the form of |(<angA:AngB:radius>)| following the start coordinate. Since |tzarcsfrom| is a semicolon version, you need to enter a \xem{semicolon} to indicate when the repetition ends.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzarcsfrom(<start coor>)
(<angA:angB:radius>)..repeated..(<angA:angB:radius>) ;
@@ -974,7 +974,7 @@ The macro \icmd{\tzarcsfrom} (i.e. |\tzarcs + from|) accepts an arbitrary number
|\tzwedge| works similarly to |\tzarc|, but it forms a closed path from the center coordinate. |\tzwedge| does not have the option |<code.append>|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzwedge[<opt>]<shift coor>"<path name>"
(<coor>)(<angA:angB:radius>){<text>}[<node opt>]
@@ -983,7 +983,7 @@ The macro \icmd{\tzarcsfrom} (i.e. |\tzarcs + from|) accepts an arbitrary number
\end{tzdef}
-\begin{tztikz}{}
+\begin{tztikz}
\tzwedge(1,1)(30:120:1) % works like:
\draw (1,1) -- ++(30:1) arc (30:120:1) -- cycle;
\end{tztikz}
@@ -992,7 +992,7 @@ The swap version \icmd{\tzwedge'} is the \iisw{swap version} of \icmd{\tzwedge}.
It switches the drawing direction from \ixxw{counterclockwise} to \ixxw{clockwise} and vice versa.
-\begin{tztikz}{}
+\begin{tztikz}
\tzwedge'(1,1)(30:120:1) % works like:
\draw (1,1) -- ++(30:1) arc (30:120-360:1) -- cycle;
\end{tztikz}
@@ -1034,7 +1034,7 @@ The starred version \icmd{\tzwedge*} fills the wedges with |fill=black!50| with
With |\settzfillcolor| and |\settzfillopacity|, you can change the default values.
You can also change the fill opacity by specifying the last optional argument |{<fill opacity>}|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\tzwedge*[<opt>]<shift coor>"<path name>"
(<coor>)(<angA:angB:radius>){<text>}[<node opt>]{<fill opacity>}
@@ -1093,7 +1093,7 @@ You can also change the fill opacity by specifying the last optional argument |{
\subsection{\protect\cmd{\tzpointangle}: Angles between points}
\label{ss:tzpointangle}
-\icmd{\tzpointangle}|(<coor1>)(<coor2>)(<\mymacro>)| computes between two points and allows you to use it.
+\icmd{\tzpointangle}|(<coor1>)(<coor2>)(<\mymacro>)| computes the angle between two points and allows you to use, where |(coor1)| serves as the coordinate of the center.
\begin{tzcode}{.3}
\begin{tikzpicture}[font=\scriptsize]
@@ -1152,7 +1152,7 @@ You can change the layer by \icmd{\settzanglelayer}. Its alias is |\settzanglema
The default line width of angle marks is |very thin|. You can change the default line with with \icmd{\settzAAlinestyle}.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzanglemark(<coorA>)(<coorB>)(<coorC>)
% syntax: full
@@ -1255,7 +1255,7 @@ The angle mark text is put on the line that goes through the middle point and \i
\tzhelplines(4,3)
\tzcoors*(4,2)(A){A}(1,1)(B){B}[180](2,3)(C){C} ;
\tzlines(A)(B)(C);
-\tzanglemark(C)(B)(A){$\theta$}[pos=.65](20pt) %
+\tzanglemark(C)(B)(A){$\theta$}[pos=.65](20pt) %%
\tzdot*(tzAAmid)
\tzline[red,dashed,tzextend={1cm}{2cm}](B)(tzAAmid)
\end{tikzpicture}
@@ -1275,7 +1275,7 @@ Using the macros such as |\settzfillcolor|, |\settzfillopacity|, and \icmd{\sett
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzanglemark*(<coorA>)(<coorB>)(<coorC>)
% syntax: full
@@ -1337,7 +1337,7 @@ Using the macros such as |\settzfillcolor|, |\settzfillopacity|, and \icmd{\sett
%%%\section{\protect\cmd{\tzpicangle}: angle marks}
%%%\label{s:tzpicangle}
%%%
-%%%\begin{tzdef}{}
+%%%\begin{tzdef}
%%%% syntax: angle ABC or angle CBA
%%%\tzpicangle(')[<angle pic opt>][<path/draw opt>](<coor1>)(<coor2>)(<coor3>)
%%% {<angle pic text>}[<text eccentricity>](<angle pic arc radius>)
@@ -1433,7 +1433,7 @@ The default line with is |very thin|, which can be changed by the option |[<opt>
The length of the side is |5pt| by default, and it can be changed by the last option |(<size>)|.
You can also change the size with \icmd{\settzRAsize}, which is valid until the end of the |tikzpicture| environment.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzrightanglemark(<coorA>)(<coorB>)(<coorC>)
% syntax: full
@@ -1485,7 +1485,7 @@ The angle text is placed on the line going through the second coordinate and |(t
The starred version \icmd{\tzrightanglemark*} fills the interior of right angle marks with |fill=black!50|, with |fill opacity=.3| and |text opacity=1|. It does not draw any line: |[draw=none]| by default. The filled mark is drawn on the |behind| layer by default, which can be changed by \icmd{\settzanglelayer}.
Its alias is \icmd{\settzanglemarklayer}.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzrightanglemark*(<coorA>)(<coorB>)(<coorC>)
% syntax: full
@@ -1530,4 +1530,78 @@ With \icmd{\settzfillcolor} and \icmd{\settzfillopacity}, you can also change th
\end{tzcode}
+\section{\protect\cmd{\tzdistance}: Distances and changes}
+\label{s:tzdistance}
+
+\icmd{\tzdistance}|(<coor1>)(<coor2>){<\mylength>}| calculates the Cartesian distance \xem{from} |(<coor1>)| \xem{to} |(<coor2>)| and stores the (absolute) value to the user-specified macro |\mylength| in centimeters.
+And |\tzdistance| also stores the changes in |x| and |y| to |{<\Deltax>}| and |{<\Deltay>}|, respectively.
+Note that the calculated distance is \xem{approximate}.
+
+\begin{tzdef}
+% syntax: minimum
+\tzdistance(<coorA>)(<coorB>){<\mylength>}
+% syntax: full
+\tzdistance(<coorA>)(<coorB>){<\mylength>}{<\Deltax>}{<\Deltay>}
+% defaults:
+ (<m>)(<m>){<m>}{}{}
+\end{tzdef}
+
+\begin{tzcode}{.3}
+% \tzdistance
+\begin{tikzpicture}
+\tzhelplines(4,3)
+\tzcoors*(0,0)(A)(4,0)(B)(0,3)(C);
+\tzdistance(A)(B){\lenA}
+\tzdistance(B)(C){\lenB}
+\tzpolygon(A){\lenA}[b](B){\lenB}[sloped,a](C);
+\end{tikzpicture}
+\end{tzcode}
+
+\begin{tzcode}{.3}
+% \tzdistance, \tzpointangle
+\begin{tikzpicture}
+\tzhelplines(4,3)
+\tzcoors*(1,0)(A){A}[180](3,1)(B){B}[0];
+\tzdistance(A)(B){\lenA}{\xdist}{\ydist}
+\tzpointangle(A)(B){\angA}
+\tzline[red](A)(B)
+\tzarc[blue](A)(\angA:90:\lenA)
+\tzline+[<->]<0,-.5>(A)(\xdist,0)
+\tzline+[<->]<1,0>(A-|B)(0,\ydist)
+\end{tikzpicture}
+\end{tzcode}
+
+\begin{tzcode}{.3}
+% \Deltax: (+), \Deltay: (-)
+\begin{tikzpicture}
+\tzhelplines(4,3)
+\tzcoors*(1,2)(A){A}[180](3,1)(B){B}[0];
+\tzdistance(A)(B){\lenA}{\xdist}{\ydist} % A to B
+\tzpointangle(A)(B){\angA}
+\tzline[red](A)(B)
+\tzarc[->,blue](A)(\angA:90:\lenA)
+\tzline+[|->|]<0,-.5>(A|-B)
+ {$\Delta\,x=\xdist$}[b]
+ (\xdist,0)
+\tzline+[|->|]<-1,0>(A)(0,\ydist)
+\end{tikzpicture}
+\end{tzcode}
+
+
+\begin{tzcode}{.3}
+% \Deltax: (-), \Deltay: (+)
+\begin{tikzpicture}
+\tzhelplines(4,3)
+\tzcoors*(1,2)(A){A}[180](3,1)(B){B}[0];
+\tzdistance(B)(A){\lenA}{\xdist}{\ydist} % B to A
+\tzpointangle(B)(A){\angA}
+\tzline[red](B)(A)
+\tzarc'[->,blue](A)(\angA-180:90:\lenA)
+\tzline+[|->|]<0,-.5>(B)
+ {$\Delta\,x=\xdist$}[b]
+ (\xdist,0)
+\tzline+[|->|]<-1,0>(B-|A)(0,\ydist)
+\end{tikzpicture}
+\end{tzcode}
+
diff --git a/graphics/pgf/contrib/tzplot/tzplot-doc-D-v2.0.tex b/graphics/pgf/contrib/tzplot/tzplot-doc-D-v2.1.tex
index 70148a3c9e..43915a10e3 100644
--- a/graphics/pgf/contrib/tzplot/tzplot-doc-D-v2.0.tex
+++ b/graphics/pgf/contrib/tzplot/tzplot-doc-D-v2.1.tex
@@ -26,23 +26,24 @@ The coordinate |(<x1,y1>)| represents the origin and |(<x2,y2>)| represents the
|\tzaxes| takes only one coordinate |(<x2,y2>)| as a mandatory argument, in which case the coordinate |(<x1,y1>)| is considered as |(0,0)|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
-\tzaxes(<x2,y2>){<x-axis name>}{<y-axis name>}
+\tzaxes(<x2,y2>){<x-axis label>}{<y-axis label>}
% syntax: full
-\tzaxes[<opt>]<x-shift,y-shift>(<x1,y1>)(<x2,y2>)
- {<x-axis name>}[<node opt>]{<y-axis name>}[<node opt>]
+\tzaxes[<opt>]<x-shift,y-shift>"<path name>"(<x1,y1>)(<x2,y2>)
+ {<x-axis label>}[<node opt>]{<y-axis label>}[<node opt>]
% defaults
- [->]<0,0>(0,0)(<m>){}[right]{}[above]
+ [->]<0,0>"axes"(0,0)(<m>){}[right]{}[above]
% arguments
[#1]: line style, arrow type (for x-axis & y-axis)
- <#2>: axes shift coor %% axes intersect at (#2)
- (#3): (x1,y1) %% origin: if omitted, regarded as (0,0)
- (#4): (x2,y2) %% opposite corner: mandatory
- {#5}: x-axis name
- [#6]: x-axis name option %% node option
- {#7}: y-axis name
- [#8]: y-axis name option %% node option
+ <#2>: axes shift coor %% axes intersect at (#2)
+ "#3": name path=#3 %% default: axes
+ (#4): (x1,y1) %% origin: if omitted, regarded as (0,0)
+ (#5): (x2,y2) %% opposite corner: mandatory
+ {#6}: x-axis label
+ [#7]: x-axis label option %% node option
+ {#8}: y-axis label
+ [#9]: y-axis label option %% node option
\end{tzdef}
Here, |(|\ixxw{<m>}|)| stands for a mandatory argument.
@@ -50,14 +51,23 @@ Here, |(|\ixxw{<m>}|)| stands for a mandatory argument.
\begin{tzcode}{.3}
% tzaxes
\begin{tikzpicture}[scale=.7]
-\tzhelplines(3,3)
-\tzaxes(3,3){$x$}{$y$}
+\tzhelplines(4,3)
+\tzaxes(4,3){$x$}{$y$}
\end{tikzpicture}
\end{tzcode}
+
\paragraph{Shift}
By default, the $x$ and $y$ axes intersect at $(0,0)$.
-Specifying the option |<x-shift,y-shift>| moves the axes to intersect at $(\text{\ttfamily<x-shift,y-shift>})$.
+Specifying the option |<x-shift,y-shift>| shifts the axes to intersect at $(\text{\ttfamily<x-shift,y-shift>})$.
+
+\begin{tzcode}{.3}
+% tzaxes: intersects at (1,.5)
+\begin{tikzpicture}[scale=.7]
+\tzhelplines(4,3)
+\tzaxes<1,.5>(4,3){$x$}{$y$}
+\end{tikzpicture}
+\end{tzcode}
\begin{tzcode}{.3}
@@ -65,12 +75,42 @@ Specifying the option |<x-shift,y-shift>| moves the axes to intersect at $(\text
\begin{tikzpicture}[scale=.5]
\tzhelplines(-1,-1)(7,7)
\tzshoworigin*
-\tzaxes[thick,blue]<1,2>(7,7){$x$}{$y$} %%
+\tzaxes[thick,blue]<1,2>(7,7){$x$}{$y$} %%
\tzaxes[-,dashed](7,7){$X$}[below]{$Y$}[left]
-\tzaxes<6,1>(6,1)(3,6){$a$}[left]{$b$} %%
+\tzaxes<6,1>(6,1)(3,6){$a$}[left]{$b$} %%
\end{tikzpicture}
\end{tzcode}
+\paragraph{name path}
+With the option |"<path name>"|, you can name the path of |\tzaxes| (by default, |axes|).
+This makes it easy to find \xem{x-intercepts} and \xem{y-intercepts} of a graph.
+
+\begin{tzcode}{.3}
+% tzaxes; name path=axes (by default)
+\begin{tikzpicture}
+\tzhelplines(-1,-1)(3,3)
+\tzaxes(-1,-1)(3,3){$x$}{$y$}
+\tzline"line"(-1,2)(3,-.5)
+\tzXpoint{axes}{line}(K) % default: axes
+\tzdot*(K)
+\tzdot(K-2)
+\end{tikzpicture}
+\end{tzcode}
+
+The x-intercepts are found first and then the y-intercepts are found, as in the following example.
+
+\begin{tzcode}{.3}
+\begin{tikzpicture}[scale=.7]
+% \tzaxes: name path
+\tzhelplines(-2,-2)(5,5)
+\tzaxes"myaxes"(-2,-2)(5,5) % name path = myaxes
+\tzparabola"curve"(-2,-2)(1,4)(5,-1)
+\tzXpoint{myaxes}{curve}(K) %%
+\tzdot*(K){$A$}
+\tzdot(K-2){$B$}
+\tzdot(K-3){$C$}
+\end{tikzpicture}
+\end{tzcode}
\subsection{\protect\cmd{\tzaxes*}}
\label{ss:tzaxes*}
@@ -79,7 +119,7 @@ The starred version \icmd{\tzaxes*} sets the current state to a \iisw{bounding b
\begin{tzcode}{.3}
\begin{tikzpicture}[scale=.5]
-\tzaxes*(8,5){$x$}{$f(x)$} % bounding box
+\tzaxes*(8,5){$x$}{$f(x)$} % bounding box
\tzhelplines(-2,-1)(10,8)
\tzto[out=90,in=-135,dashed](-2,8)(12,-2)
\tzbezier[blue](-1,-1)(3,-2)(7,12)(10,10)
@@ -93,34 +133,38 @@ The starred version \icmd{\tzaxes*} sets the current state to a \iisw{bounding b
\icmd{\tzaxisx} draws only the $x$ axis.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
-\tzaxisx[<opt>]<y-shift>{<from>}{<to>}{<x-axis name>}[<node opt>]
+\tzaxisx[<opt>]<y-shift>"<path name>"{<from>}{<to>}
+ {<x-axis label>}[<node opt>]
% defaults
- [->]<0>{<m>}{<m>}{}[right]
+ [->]<0>"axisx"{<m>}{<m>}{}[right]
% arguments:
[#1]: line style, arrow type (for x-axis)
<#2>: y-shift of x-axis
- {#3}: x-axis starts from %% mandatory
- {#4}: x-axis runs to %% mandatory
- {#5}: x-axis name
- [#6]: x-axis name option %% node option
+ "#3": name path = #3 %% default: axisx
+ {#4}: x-axis starts from %% <m>
+ {#5}: x-axis runs to %% <m>
+ {#6}: x-axis label
+ [#7]: x-axis label option %% node option
\end{tzdef}
\icmd{\tzaxisy} draws only the $y$ axis.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
-\tzaxisy[<opt>]<x-shift>{<from>}{<to>}{<y-axis name>}[<node opt>]
+\tzaxisx[<opt>]<x-shift>"<path name>"{<from>}{<to>}
+ {<y-axis label>}[<node opt>]
% defaults
- [->]<0>{<m>}{<m>}{}[above]
+ [->]<0>"axisy"{<m>}{<m>}{}[right]
% arguments:
[#1]: line style, arrow type (for y-axis)
<#2>: x-shift of y axis
- {#3}: y-axis starts from %% mandatory
- {#4}: y-axis runs to %% mandatory
- {#5}: y-axis name
- [#6]: y-axis name option %% node option
+ "#3": name path = #3 %% default: axisy
+ {#4}: y-axis starts from %% <m>
+ {#5}: y-axis runs to %% <m>
+ {#6}: y-axis label
+ [#7]: y-axis label option %% node option
\end{tzdef}
@@ -142,10 +186,42 @@ The starred version \icmd{\tzaxes*} sets the current state to a \iisw{bounding b
\begin{tikzpicture}[scale=.5]
\tzhelplines(7,7)
\tzshoworigin
-\tzaxisx{-1}{7}{$xx$}[near end,below]
+\tzaxisx{-1}{7}{$xx$}[very near end,below]
+\tzaxisy{-1}{7}{$yy$}[midway,sloped,auto]
+\tzaxisx[-,dashed,red]<2>{-1}{7}{$xx'$}[blue]
+\tzaxisy[-,dashed,blue]<3>{-1}{7}{$yy'$}
+\end{tikzpicture}
+\end{tzcode}
+
+With the option |"<path name>"|, you can name each path of |\tzaxisx| and |\tzaxisy| (by default, |axisx| and |axisy|, respectively).
+
+\begin{tzcode}{.3}
+% name path = axisx, axisy (defaults)
+\begin{tikzpicture}[scale=.5]
+\tzhelplines(7,7)
+\tzshoworigin
+\tzaxisx{-1}{7}{$xx$}[near start,below]
+\tzaxisy{-1}{7}{$yy$}[midway,sloped,auto]
+%\tzaxisx[-,dashed,red]<2>{-1}{7}{$xx'$}[blue]
+%\tzaxisy[-,dashed,blue]<3>{-1}{7}{$yy'$}
+\tzLFn"line"(1,3)(5,0)[-1:6]
+\tzXpoint*{line}{axisx}(A){$A$}
+\tzXpoint*{line}{axisy}(B){$B$}[0]
+\end{tikzpicture}
+\end{tzcode}
+
+\begin{tzcode}{.3}
+% name path = axisx, axisy (defaults)
+\begin{tikzpicture}[scale=.5]
+\tzhelplines(7,7)
+\tzshoworigin
+\tzaxisx{-1}{7}{$xx$}[near start,below]
\tzaxisy{-1}{7}{$yy$}[midway,sloped,auto]
\tzaxisx[-,dashed,red]<2>{-1}{7}{$xx'$}[blue]
\tzaxisy[-,dashed,blue]<3>{-1}{7}{$yy'$}
+\tzLFn"line"(1,3)(5,0)[-1:6]
+\tzXpoint*{line}{axisx}(A){$A$}
+\tzXpoint*{line}{axisy}(B){$B$}[0]
\end{tikzpicture}
\end{tzcode}
@@ -160,7 +236,7 @@ The starred version \icmd{\tzaxes*} sets the current state to a \iisw{bounding b
\icmd{\tzshoworigin} prints `0' (approximately) at the bottom left of the origin |(0,0)|, by default.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzshoworigin<shift coor>(<origin>){<text>}[<node opt>]
% default
@@ -202,7 +278,7 @@ Specifying the option |<shift coor>| also moves the origin.
\icmd{\tzshoworigin*} prints a node dot at the origin with no text by default.
Internally the dot is processed by |\tzdot*|. All arguments are optional.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzshoworigin*[<dot opt>]<shift coor>(<origin>){<text>}[<node opt>](<dot size>)
% default
@@ -257,21 +333,22 @@ For |\tzshoworigin*|, text for the origin and the dot are placed independently.
\icmd{\tzaxesL} is similar to |\tzaxes|, but it draws only the `L' type axes with |(<x1,y1>)| as the origin and |(<x2,y2>)| as the opposite corner of the rectangle.
Those two coordinates are mandatory.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
-\tzaxesL[<opt>]<shift coor>(<x1,y1>)(<x2,y2>)
- {<x-axis name>}[<node opt>]{<y-axis name>}[<node opt>]
+\tzaxesL[<opt>]<shift coor>"<path name>"(<x1,y1>)(<x2,y2>)
+ {<x-axis label>}[<node opt>]{<y-axis label>}[<node opt>]
% defaults
- []<>(<m>)(<m>){}[right]{}[above]
+ []<>"axesL"(<m>)(<m>){}[right]{}[above]
% arguments:
[#1]: line style, arrow type
<#2>: shift coordinate
- (#3): (x1,y1) %% mandatory
- (#4): (x2,y2) %% mandatory
- {#5}: x-axis name
- [#6]: x-axis name option %% node option
- {#7}: y-axis name
- [#8]: y-axis name option %% node option
+ "#3": name path=#3 %% default: axesL
+ (#4): (x1,y1) %% mandatory
+ (#5): (x2,y2) %% mandatory
+ {#6}: x-axis label
+ [#7]: x-axis label option %% node option
+ {#8}: y-axis label
+ [#9]: y-axis label option %% node option
\end{tzdef}
The \iisw{swap version} \icmd{\tzaxesL'} swaps |(<x1,y1>)| and |(<x2,y2>)|.
@@ -289,6 +366,8 @@ That is, |\tzaxesL'(A)(B)| is equivalent to |\tzaxesL(B)(A)|.
\end{tikzpicture}
\end{tzcode}
+\paragraph{Shift}
+
The option |<shift coor>| moves the whole L-type axes.
The empty option |<>| is not allowed.
@@ -306,6 +385,27 @@ The empty option |<>| is not allowed.
\end{tzcode}
+\paragraph{\texttt{name path}}
+
+With the option |"<path name>"|, you can name the path of |\tzaxesL| (by default, |axesL|). This makes it easy to find the intercepts.
+
+\begin{tzcode}{.3}
+% \tzaxesL: name path (by default, axesL)
+\begin{tikzpicture}[scale=.5]
+\tzhelplines(8,7)
+\tzshoworigin
+\tzaxes(8,7){$x$}{$y$}
+\tzaxesL[red,thick](2,2)(6,5){$a$}{$b$}
+\tzaxesL'[blue,dashed,->]<-1,-1>(2,2)(6,5){$c'$}{$d'$}
+\tzparabola"curve"(1,6)(3,1.5)(6,5)
+\tzXpoint{axesL}{curve}(K) % default: axesL
+\tzdot*(K)
+\tzdot(K-2)
+\end{tikzpicture}
+\end{tzcode}
+
+
+
%%==================================
\chapter{Ticks}
@@ -318,7 +418,7 @@ The empty option |<>| is not allowed.
By default, \icmd{\tzticks} prints tick labels and draws zero length tick marks, i.e. from |(0pt)| to |(0pt)|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzticks{<x-ticks pos>}{<y-ticks pos>}
% syntax: medium
@@ -390,7 +490,7 @@ You can change the position of tick labels using |[<node opt>]|.
\paragraph{Shift}
-You can move (or shift) tick marks and labels together by specifying the option |<x-shift,y-shift>|, where |<x-shift>| is for |y-ticks| and |<y-shift>| is for |x-ticks|.
+You can move (or shift) the tick marks and labels together by specifying the optional argument |<x-shift,y-shift>|, where |<x-shift>| is for |y-ticks| and |<y-shift>| is for |x-ticks|.
\begin{tzcode}{.3}
% \tzticks: shift
@@ -415,7 +515,7 @@ You can move (or shift) tick marks and labels together by specifying the option
The starred version \icmd{\tzticks*} always ignores all tick labels and draws tick marks from |0pt| to |3pt|, by default.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzticks*{<x-ticks pos>}{<y-ticks pos>}
% syntax: medium
@@ -435,8 +535,8 @@ The starred version \icmd{\tzticks*} always ignores all tick labels and draws ti
\tzshoworigin
\tzaxes(-1,-1)(10,10)
\tzticks*[draw=red,thick]
- {1,...,7,8/$\alpha$} % label ignored
- (0pt:3cm){2,...,6,7/$\beta$} % label ignored
+ {1,...,7,8/$\alpha$} % labels ignored
+ (0pt:3cm){2,...,6,7/$\beta$} % labels ignored
\end{tikzpicture}
\end{tzcode}
@@ -469,8 +569,8 @@ You can handle $x$ ticks and $y$ ticks independently.
\icmd{\tzticksx} only prints x-tick labels but not tick marks, by default.
To prints tick marks you need to specify |(<x-from>:<x-to>)|.
-\begin{tzdef}{}
-% syntax
+\begin{tzdef}
+% syntax:
\tzticksx[<opt>]<y-shift>(<from>:<to>){<x-tick pos/labels>}[<node opt>]
% defaults
[]<>(0pt:0pt){<m>}[text height=1.25ex,text depth=.25ex,below]
@@ -479,7 +579,7 @@ To prints tick marks you need to specify |(<x-from>:<x-to>)|.
\icmd{\tzticksx*} only prints x-tick marks from |0pt| to |3pt|, by default, suppressing tick labels.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\tzticksx*[<opt>]<y-shift>(<from>:<to>){<xtick pos>}
% defaults
@@ -495,15 +595,15 @@ To prints tick marks you need to specify |(<x-from>:<x-to>)|.
\icmd{\tzticksy*} only prints y-ticks from |0pt| to |3pt| by default, suppressing tick labels.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\tzticksy[<opt>]<x-shift>(<from:to>){<y-ticks pos/labels>}[<node opt>]
% defaults
[]<>(0pt:0pt){<m>}[]
\end{tzdef}
-\begin{tzdef}{}
-% syntax
+\begin{tzdef}
+% syntax:
\tzticksy*[<opt>]<x-shift>(<from:to>){<yticks pos>}
% defaults
[]<>(0pt:0pt){<m>}
@@ -554,12 +654,12 @@ The options |<y-shift>| and |<x-shift>| move x-ticks and y-ticks, respectively.
\icmd{\tzproj} accepts a mandatory coordinate and draws perpendicular lines onto each axis from the coordinate. The lines are |dotted|, by default.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzproj(<coor>)
% syntax: medium
\tzproj*(<coor>){<x-text>}[<node opt>]{<y-text>}[<node opt>]
-% syntax:
+% syntax: full
\tzproj*[<opt>]<x-shift,y-shift>(<coor>)
{<x-text>}[<node opt>]{<y-text>}[<node opt>](<dot size>)
% defaults
@@ -628,7 +728,7 @@ Specifying the option |<x-shift,y-shift>| moves the projection point and text on
\icmd{\tzprojx*} additionally prints a `black node dot' of the size |2.4pt|, by default.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\tzprojx[<opt>]<x-shift,y-shift>(<coor>){<x-text>}[<node opt>](<dot size>)
% defaults
@@ -640,7 +740,7 @@ Specifying the option |<x-shift,y-shift>| moves the projection point and text on
\icmd{\tzprojy*} additionally prints a `black node dot' of the size |2.4pt|, by default.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\tzprojy[<opt>]<x-shift,y-shift>(<coor>){<y-text>}[<node opt>](<dot size>)
% defaults
@@ -687,16 +787,16 @@ Specifying the option |<x-shift,y-shift>| with |\tzprojx(*)| and |\tzprojy(*)| m
\icmd{\tzprojs} accepts any number of coordinates and draws perpendicular lines onto each axis from the coordinates. The lines are |dotted|, by default.
|\tzprojs| is a semicolon version of |\tzproj|, so a semicolon is needed to indicate when the coordinate iteration ends. Its repeating pattern is |(<coor>){<x-text>}[<node opt>]{<y-text>}[<node opt>]|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
-\tzprojs(<coor>)(<coor>) ..repeated.. (<coor>);
+\tzprojs(<coor>)(<coor>) ..repeated.. (<coor>) ;
% syntax: medium
\tzprojs*(<coor>){<x-text>}[<node opt>]{<y-text>}[<node opt>]
..repeated.. (){}[]{}[]
-% syntax:
+% syntax: full
\tzprojs*[<opt>]<x-shift,y-shift>
(<coor>){<x-text>}[<node opt>]{<y-text>}[<node opt>]
- ..repeated.. (){}[]{}[];(<dot size>)
+ ..repeated.. (){}[]{}[] ; (<dot size>)
% defaults
*[dotted]<0,0>
(<m>){}[text height=1.25ex,text depth=.25ex,below]{}[left]
@@ -746,7 +846,7 @@ You can also change the dot size with the last option |(<dot size>)| \xem{after}
\icmd{\tzprojsx*} additionally prints |\tzdots*| of the size |2.4pt|, by default.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\tzprojsx*[<opt>]<x-shift,y-shift>
(<coor>){<x-text>}[<node opt>]..repeated..(){}[];(<dot size>)
@@ -758,7 +858,7 @@ You can also change the dot size with the last option |(<dot size>)| \xem{after}
\icmd{\tzprojsy} and \icmd{\tzprojsy*} work simililarly as |\tzprojsx| and |\tzprojsx*| do but to the y axis.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\tzprojsy*[<opt>]<x-shift,y-shift>
(<coor>){<y-text>}[<node opt>]..repeated..(){}[];(<dot size>)
@@ -806,12 +906,12 @@ Specifying the option |<x-shift,y-shift>| moves the projection points and text a
\section{\protect\cmd{\tzfn} and \protect\cmd{\tzfn'}: Plot functions and inverse functions}
\label{s:tzfn}
-\subsection{Syntax}
+\subsection{\protect\cmd{\tzfn}}
\label{ss:tzfn}
\icmd{\tzfn} plots a function of |\x|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzfn{<fn of \x>}[<domain>]
% syntax: medium
@@ -827,7 +927,7 @@ Specifying the option |<x-shift,y-shift>| moves the projection points and text a
|\tzfn| takes two mandatory arguments: |{<fn of \x>}| and |[<domain>]|.
The domain should be of the form |[<from num:to num>]|, like |[1:5]|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzfn{.5*(\x)^2-1}[1:5] % works like:
\draw [samples=201,domain=1:5] plot (\x,{.5*(\x)^2-1});
\end{tztikz}
@@ -848,7 +948,7 @@ The domain should be of the form |[<from num:to num>]|, like |[1:5]|.
The \iisw{swap version} \icmd{\tzfn'} draws the \iisw{inverse function} of |\tzfn|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzfn'{.5*(\x)^2-1}[1:5] % works like:
\draw [samples=201,domain=1:5] plot ({.5*(\x)^2-1},\x);
\end{tztikz}
@@ -913,9 +1013,9 @@ You can also use the predefined functions of \Tikz\ such as |sin|, |cos|, |ln|,
\subsection{Name paths: \texttt{name path}}
\label{ss:tzfn:namepath}
-You can name the path of |\tzfn| by specifying the option |"<path name>"| \xem{immediately before} the mandatory argument |{<fn of \x>}|. You can use the path name to find intersection points.
+You can name the path of |\tzfn| by specifying the option |"<path name>"| \xem{immediately before} the mandatory argument |{<fn of \x>}|. You can use the path names to find intersection points.
-\begin{tztikz}{}
+\begin{tztikz}
\tzfn"mypath"\Fx[1:5] % works like:
\draw [samples=201,,domain=1:5,name path=mypath] plot (\x,{\Fx});
\end{tztikz}
@@ -932,7 +1032,7 @@ Suppose that the function's expression |<fn of \x>| consists \xem{only of a macr
(\xem{You don't need to type the same thing twice}.)
\end{itemize}
-\begin{tztikz}{}
+\begin{tztikz}
\tzfn\Fx[1:5] % works like:
\draw [samples=201,domain=1:5,name path=Fx] plot (\x,{\Fx});
\end{tztikz}
@@ -1040,7 +1140,7 @@ You can use \icmd{\tzfnAtBegin} (immediately) \xem{before each} |\tzfn| to inser
\remark
\begin{itemize}\firmlist
\item |\tzfn| is based on the |plot| operation of \Tikz.
-\item Appending \Tikz\ code at the beginning of |\tzfn| may cause a problem when you use some operations (such as |to| or \verb+|-|+) that expect a coordinate to link.
+\item Appending \Tikz\ code at the beginning of |\tzfn| may cause a problem when you use some operations (such as |to| or \verb+-|+ or \verb+|-+) that expect a coordinate to link.
\item In the version 2 of the |tzplot| package, this issue is internally taken care of by using
|(|\ixxw{current subpath start}|)|, which is a special coordinate pre-defined in \Tikz. (See \Tikz\ manual for more details.)
\end{itemize}
@@ -1055,7 +1155,7 @@ Define a function with the (predefined) variable |\y|.
|\tzfnofy| works just like |\tzfn| but as a function of |\y|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzfnofy{<fn of \y>}[<domain>]
% syntax: medium
@@ -1070,14 +1170,14 @@ Define a function with the (predefined) variable |\y|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzfnofy{2*\y+1}[1:5] % works like:
\draw [samples=201,domain=1:5,variable=\y] plot ({2*\y+1},\y);
\end{tztikz}
The \iisw{swap version} \icmd{\tzfnofy'} plots the \iisw{inverse function} of |\tzfnofy|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzfnofy'{2*\y+1}[1:5] % works like:
\draw [samples=201,domain=1:5,variable=\y] plot (\y,{2*\y+1});
\end{tztikz}
@@ -1152,7 +1252,7 @@ You can also extend the path of |\tzfnofy| using the option |<code.append>| or t
\icmd{\tzhfnat} draws a horizontal line at a specified value of $y$.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzhfnat{<y-val>}[<domain>]
% syntax: full
@@ -1215,7 +1315,7 @@ For example, |\tzhfn(<x>,3)|, ignoring |<x>|, is equivalent to |\tzhfnat{3}|.
\xem{Everything else is the same as in} |\tzhfnat|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzhfn(<coor>)[<domain>]
% syntax: full
@@ -1252,7 +1352,7 @@ You can also use \icmd{\tzhfnAtBegin} and \icmd{\tzhfnAtEnd} to extend the path
\icmd{\tzvfnat} draws a vertical line at a specified value of $x$.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzvfnat{<x-val>}[<domain>]
% syntax: full
@@ -1308,7 +1408,7 @@ For example, |\tzvfn(3,<y>)|, ignoring |<y>|, is equivalent to |\tzvfnat{3}|.
\xem{Everything else is the same as in} |\tzvfnat|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzvfn(<coor>)[<domain>]
% syntax: full
@@ -1352,7 +1452,7 @@ You can also use \icmd{\tzvfnAtBegin} and \icmd{\tzvfnAtEnd} to extend the path
Knowing two coordinates or one coordinate with a slope, you can draw a linear function with the macro \icmd{\tzLFn}, \xem{without writing the explicit definition of a linear function}.
-\begin{itemize}\firmlist
+\begin{itemize}%\firmlist
\item
|\tzLFn(<coor1>)(<coor2>)| is prepared for when you know two coordinates on a line.
\begin{itemize}
@@ -1361,7 +1461,7 @@ Knowing two coordinates or one coordinate with a slope, you can draw a linear fu
\end{itemize}
\item
-|\tzLFn(<coor1>){<slope>}| is prepared for when you know one coordinate and the slope of a line.
+|\tzLFn(<coor1>){<slope>}| is used when you know one coordinate and the slope of a line.
\item
If you specify all the three arguments |(<coor1>)(<coor2>){<slope>}|, then the slope is ignored.
\end{itemize}
@@ -1370,15 +1470,15 @@ For example, |\tzLFn(1,1)(2,3)[0:4]| draws a line passing through two points: $(
|\tzLFn(1,1){.5}[0:4]| draws a line passing through a point $(1,1)$ with a slope |.5|, over $0\leq x\leq 4$.
|\tzLFn| accepts two mandatory arguments: |(<coor1>)| and |[<domain>]|.
-\begin{itemize}\firmlist
+\begin{itemize}%\firmlist
\item The \xem{domain} should be of the form |[<from num:to num>]|.
\item If just one coordinate is specified without a slope, the slope is regarded as |1|, by default.
\end{itemize}
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
-\tzLFn(<coor1>)(<coor2>)[<domain>]
-\tzLFn(<coor1>){<slope>)[<domain>]
+\tzLFn(<coor1>)(<coor2>)[<domain>] % two coordinates
+\tzLFn(<coor1>){<slope>)[<domain>] % one coordinate and slope
% syntax: full
\tzLFn[<opt>]<shift coor>"<path name>"
(<coor1>)(<coor2>){<slope>}[<domain>]{<text>}[<node opt>]<code.append>
@@ -1464,7 +1564,7 @@ If you provide two points $(x_1,y_1)$ and $(x_2,y_2)$, |\tzLFnofy(x1,x2)(y1,y2)|
Everything else is the same as |\tzLFn|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzLFnofy(<coor1>)(<coor2>)[<domain>]
\tzLFnofy(<coor1>){<slope>)[<domain>]
@@ -1514,7 +1614,7 @@ You can use \icmd{\tzLFnofyAtBegin} and \icmd{\tzLFnofyAtEnd} to extend the path
You can use |\tzdefLFn| together with |\tzfn| to graph a linear function, \xem{without writing an explicit definition} of a linear function.
(Of course, you can directly use |\tzLFn|.)
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzdefLFn{<fn csname>}(<coor1>)(<coor2>){<slope>}
% defaults
@@ -1530,7 +1630,7 @@ Knowing two coordinates, linear function |\Gx| passing through the two points ca
That is, it defines a function as $g(x)=\frac{1-2}{3-1}(x-1)+2$.
-\begin{tztikz}{}
+\begin{tztikz}
\tzdefLFn{\Fx}(1,2)(3,1) % works like
\def\Fx{-1/2*(\x-1)+2}
\end{tztikz}
@@ -1579,7 +1679,7 @@ So |\tzfn'(A)(B)| and |\tzfn'(A){.5}| do not guarantee passing through the coord
\icmd{\tzdefLFnofy} defines a function of |\y|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzdefLFnofy{<fn csname>}(<coor1>)(<coor2>){<slope>}
% defaults
@@ -1590,12 +1690,12 @@ If |(<coor2>)| is specified, |{<slope>}| is ignored.
If |(<coor2>)| is missing |<slope>| is considered as the slope of the line (by default 1).
-\begin{tztikz}{}
+\begin{tztikz}
\tzdefLFnofy\Fy(1,1){.5} % works like
\def\Fy{.5*(\y-1)+1}
\end{tztikz}
-\begin{tztikz}{}
+\begin{tztikz}
\tzdefLFnofy\Gy(1,2)(3,1) % works like
\def\Gy{-2*(\y-2)+1}
\end{tztikz}
@@ -1730,7 +1830,7 @@ With \icmd{\settzfnarealayer}, you can change the layer of |\tzfnarea|.
|\tzfnarea| accepts two mandatory arguments: |{<fn of \x>}| and |[<domain>]|, like |\tzfn|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzfnarea{<fn of \x>}[<domain>]
% syntax: full
@@ -1786,7 +1886,8 @@ The starred version \icmd{\tzfnarea*} fills the area with |fill=black!50| and |f
\tzaxes(0,-1)(4,2)
\def\Fx{.5*(\x-1)^2-1}
\tzfn\Fx[0:3.5]
-\tzfnarea*[red]\Fx[1:3]{.1}<(2,-1) node[black]{Area}>
+\tzfnarea*[red]\Fx[1:3]{.1}
+ <(2,-1) node[black]{Area}>
\end{tikzpicture}
\end{tzcode}
@@ -1817,11 +1918,11 @@ It takes two mandatory arguments: |{<path>}| and |{<x1>}|.
\end{itemize}
The first option |[<opt>]| controls both lines and is overwritten by each of |[<opt1>]| (for the line at |<x1>|) and |[<opt2>]| (for the line at |<x2>|).
-The line width is |very thin| by default, which can be changed by \icmd{\settzfnarealinewith}.
+The line width is |very thin| by default, which can be changed by \icmd{\settzfnarealinestyle}.
-You can change the length of lines by specifying |(<coor1>)| and |(<coor2>)|.
+You can also change the length of lines by specifying |(<coor1>)| and |(<coor2>)|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzfnarealine{<path>}{<x1>}
% syntax: minimal
@@ -1902,7 +2003,7 @@ The second mandatory argument |[<domain>]| should be colon separated.
The default line width of |\tzfnmax| is |thick|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzfnmax{<fn list>}[<domain>]
% syntax: full
@@ -1955,9 +2056,9 @@ You can also use \icmd{\tzfnmaxAtBegin} and \icmd{\tzfnmaxAtEnd} to extend the p
\label{ss:tzfnmin}
\icmd{\tzfnmin} plots the minimum of a list of functions.
-|\tzfnmin| works just like |\tzfnmax|, but it draws \xem{lower} a \iisw{envelope curve}.
+|\tzfnmin| works just like |\tzfnmax|, but it draws a \xem{lower} \iisw{envelope curve}.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzfnmin{<fn list>}[<domain>]
% syntax: full
@@ -2009,7 +2110,7 @@ To extend the path of |\tzfnmin|, you can use the option |<code.append>| or the
\icmd{\tzXpoint} finds \iisw{intersection} points of two paths and saves them as coordinate names for later use.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzXpoint{<path>}{<path>}(<coor name>)
% syntax: medium
@@ -2044,7 +2145,7 @@ You can label intersection points by specifying the option |{<label>}| and |[<an
\paragraph{\icmd{\tzXpoint*}} The starred version |\tzXpoint*| simply adds a node dot to |\tzXpoint|.
The default dot size is |2.4pt| and it can be changed by the last option |(<dot size>)| or the \threeways\ (on page \pageref{ss:threeways}).
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzXpoint*{<path>}{<path>}
% syntax: medium
@@ -2090,7 +2191,7 @@ So it takes |{<path>}| and |{<x-val>}| as mandatory arguments.
Internally, |\tzvXpointat| depends on the |current bounding box|, which generally does not cause a problem because it is used after paths to be intersected are formed.
In case of any problem of no intersection point, you may want to fix a bounding box using |\tzbbox| or |\tzaxes*| or \Tikz's |\useasboundingbox|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzvXpointat{<path>}{<x-val>}(<coor name>)
% syntax: medium
@@ -2104,7 +2205,7 @@ In case of any problem of no intersection point, you may want to fix a bounding
The starred version \icmd{\tzvXpointat*} additionally prints a node dot of the size |2.4pt|, by default, at the (first) intersection point.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzvXpointat*{<path>}{<x-val>}
% syntax: medium
@@ -2139,7 +2240,7 @@ For example, |\tzvXpoint{mypath}(3,<y>)|, ignoring |<y>|, is equivalent to |\tzv
\xem{Everything else is the same as in} |\tzvXpointat|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzvXpoint[<opt>]{<path>}(<coor>)(<coor name>)[<n>]
{<label>}[<[label opt]angle>]
@@ -2149,7 +2250,7 @@ For example, |\tzvXpoint{mypath}(3,<y>)|, ignoring |<y>|, is equivalent to |\tzv
The starred version \icmd{\tzvXpoint*} just adds a node dot to |\tzvXpoint|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzvXpoint*[<opt>]{<path>}(<coor>)(<coor name>)[<n>]
{<label>}[<[<opt>]angle>](<dot size>)
@@ -2185,7 +2286,7 @@ The starred version \icmd{\tzvXpoint*} just adds a node dot to |\tzvXpoint|.
\icmd{\tzhXpointat} determines \iisw{horizontal intersection} points of a path at a specified value of $y$.
So it takes |{<path>}| and |{<y-val>}| as mandatory arguments.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimal
\tzhXpointat{<path>}{<y-val>}(<coor name>)
% syntax: medium
@@ -2199,7 +2300,7 @@ So it takes |{<path>}| and |{<y-val>}| as mandatory arguments.
The starred version \icmd{\tzhXpointat*} additionally prints a node dot of the size 2.4pt, by default, at the intersection point.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzhXpointat*{<path>}{<y-val>}
% syntax: medium
@@ -2234,7 +2335,7 @@ For example, |\tzhXpoint{mypath}(<x>,3)|, ignoring |<x>|, is equivalent to |\tzh
\xem{Everything else is the same as in} |\tzhXpointat|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzhXpoint[<opt>]{<path>}(<coor>)(<coor name>)[<n>]{<label>}[<[label opt]angle>]
% defaults
@@ -2243,7 +2344,7 @@ For example, |\tzhXpoint{mypath}(<x>,3)|, ignoring |<x>|, is equivalent to |\tzh
The starred version \icmd{\tzhXpoint*} just adds a node dot to |\tzhXpoint|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzhXpoint*[<opt>]{<path>}(<coor>)(<coor name>)[<n>]
{<label>}[<[label opt]angle>](<dot size>)
@@ -2278,7 +2379,7 @@ Sometimes you may want to \xem{quickly} find intersection point of two linear fu
\icmd{\tzLFnXpoint} finds the solution of two linear functions without printing anything by default.
You can name it and use it.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzLFnXpoint{<\fn>}{<\fn>}
% syntax: medium
@@ -2292,6 +2393,7 @@ You can name it and use it.
\begin{tzcode}{.3}
+% \tzLFnXpoint
\begin{tikzpicture}[scale=.8]
\tzhelplines(4,3)
\tzfn[yellow]{\x}[0:3]
@@ -2301,21 +2403,22 @@ You can name it and use it.
\end{tikzpicture}
\end{tzcode}
-\icmd{\tzLFnXpoint*} additionally print a filled node dot at the solution of two linear equations.
+The starred version \icmd{\tzLFnXpoint*} additionally print a filled node dot at the solution of two linear functions of |\x|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
-\tzLFnXpoint{<\fn>}{<\fn>}
+\tzLFnXpoint*{<\fn>}{<\fn>}
% syntax: medium
-\tzLFnXpoint{<\fn>}{<\fn>}(<coor name>){<label>}[<[<label opt>]angle>]
+\tzLFnXpoint*{<\fn>}{<\fn>}(<coor name>){<label>}[<[<label opt>]angle>]
% syntax: full
-\tzLFnXpoint[<opt>]{<\fn>}{<\fn>}(<coor name>)
+\tzLFnXpoint*[<opt>]{<\fn>}{<\fn>}(<coor name>)
{<label>}[<[<label opt>]angle>](<dot size>)
% defaults
- [tzdot=2.4pt,fill]{<m>}{<m>}[0](){}[](2.4pt)
+ *[tzdot=2.4pt,fill]{<m>}{<m>}[0](){}[](2.4pt)
\end{tzdef}
\begin{tzcode}{.3}
+% \tzLFnXpoint*
\begin{tikzpicture}[scale=.8]
\tzhelplines(4,3)
\tzLFnXpoint*{\x}{3-\x}(A){A}[[red,draw]90] %%
@@ -2337,11 +2440,11 @@ You can name it and use it.
\label{ss:tzsecantat}
\icmd{\tzsecantat} draws a line segment or a \iisw{secant} line of a curve, on the |behind| layer by default.
-|\tzsecantat| accepts three mandatory arguments:
-Three mandatory arguments are a path name and two values of $x$: |{<path>}|, |{<from->x}|, and |{<to-x>}|.
+|\tzsecantat| accepts three mandatory arguments.
+Three mandatory arguments are a path name and two values of $x$: |{<path>}|, |{<from-x>}|, and |{<to-x>}|.
With \icmd{\settzsecantlayer}, you can change the layer, like |\settzsecantlayer{main}|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minium
\tzsecantat{<path>}{<from-x>}{<to-x>}
% syntax: medium
@@ -2353,6 +2456,7 @@ With \icmd{\settzsecantlayer}, you can change the layer, like |\settzsecantlayer
[]<>""{<m>}{<m>}{<m>}[]{}[]<>
\end{tzdef}
+
\paragraph{Domain}
The domain of the form |[<from num:to num>]| is optional.
Without specifying the optional domain, |\tzsecantat| draws a line segment connecting two points on the (curved) path.
@@ -2443,7 +2547,7 @@ You need to specify a path name and two coordinates, then |\tzsecant| uses the $
You can change the layer with \icmd{\settzsecantlayer}.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minium
\tzsecant{<path>}(<coor>)(<coor>)
% syntax: medium
@@ -2503,7 +2607,7 @@ By default, the tangent line is drawn on the |behind| layer, which can be change
To calculate the slope at $x$, $x$ varies over the interval $(x-\varepsilon_1,x+\varepsilon_2)$ and $\varepsilon_1=\varepsilon_2=0.01$, by default.
So the slope of tangent line is only \xem{approximate}.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tztangentat{<path>}{<x-val>}[<domain>]
% syntax: medium
@@ -2626,7 +2730,7 @@ For example, |\tztangent{curve}(4,|$y$|)| is equivalent to |\tztangentat{curve}{
\xem{Everything else is the same as in} |\tztangentat|.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tztangent{<path>}(<coor>)[<domain>]
% syntax: medium
@@ -2708,10 +2812,10 @@ You can change the layer, like \icmd{\settztslopelayer}|{main}|.
\remark The slope is \xem{approximate} and you can manipulate the slope by changing the variation interval with the option |(<epsilon1,epsilon2>)|. The default is $(\varepsilon_1,\varepsilon_2)=(0.01,0.01)$.
You can also use
-\icmd{\tzslopeepsilon}|{<epsilon1>}{<epsilon2>}| \xem{immediately after} the option |{<x-val>}|, which is valid until the end of the |tikzpicture| environment, unless changed again.
+\icmd{\settzslopeepsilon}|{<epsilon1>}{<epsilon2>}| \xem{before} the macro |\tzslopeat|, which is valid until the end of the |tikzpicture| environment, unless changed again.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzslopeat{<path>}{<x-val>}{<length>}
% syntax: minimum (for normal line)
@@ -2732,7 +2836,7 @@ You can also use
(B)[out=0,in=180]
(C)[out=0,in=255]
(D);
-\tzslopeat[red,thick]{AA}{1}{3cm}
+\tzslopeat[->,red,thick]{AA}{1}{3cm}
\tzslopeat[blue]{AA}{2}{2cm}
\tzslopeat{AA}{4}{2cm}{$f'(4)$}[r]
\end{tikzpicture}
@@ -2754,7 +2858,7 @@ You can also use
\paragraph{Normal lines}
-With the option |[<rotate>]| \xem{immediately after} the last mandatory option |{<length>}|, you can draw a \iisw{normal line} to a curve by rotating the slope lines |90|\textdegree or |-90|\textdegree.
+With the option |[<rotate>]| \xem{immediately after} the last mandatory argument |{<length>}|, you can draw a \iisw{normal line} to a curve by rotating the slope lines |90|\textdegree or |-90|\textdegree.
\begin{tzcode}{.3}
% \tzslopeat: slopes and normals
@@ -2768,14 +2872,42 @@ With the option |[<rotate>]| \xem{immediately after} the last mandatory option |
\tzslopeat[red]{AA}{1}{3cm}
\tzslopeat[blue]{AA}{2}{2cm}
\tzslopeat{AA}{4}{2cm}{$f'(4)$}[r]
-% normal lines: roatate: [90] or [-90]
-\tzslopeat[blue]{AA}{1}{1cm}[90]
-\tzslopeat[red]{AA}{2}{2cm}[90]
-\tzslopeat[red]{AA}{4}{1cm}[-90]{normal}[b]
+% normal lines: rotate: [90] or [-90]
+\tzslopeat[->,blue]{AA}{1}{1cm}[90]
+\tzslopeat[->,red]{AA}{2}{2cm}[90]
+\tzslopeat[->,red]{AA}{4}{1cm}[-90]{normal}[b]
+\end{tikzpicture}
+\end{tzcode}
+
+
+\subsection{\protect\cmd{\tzslopeat'}}
+\label{ss:tzslopeat'}
+
+The \iisw{swap version} \icmd{\tzslopeat'} draws a slope line with the opposite direction of |\tzslopeat|.
+
+\begin{tzcode}{.3}
+% \tzslopeat'
+\begin{tikzpicture}
+\tzhelplines*(5,4)
+\tzcoors*(0,0)(A)(2,2)(B){B}[b](3.5,1)(C)(5,3)(D);
+\tztos[thick]"AA"(A)[out=0,in=180]
+ (B)[out=0,in=180]
+ (C)[out=0,in=255]
+ (D);
+\tzslopeat'[->,red,thick]{AA}{1}{3cm} %%
+\tzslopeat[->,blue]{AA}{2}{2cm}
+\tzslopeat'[->]{AA}{4}{2cm}{$f'(4)$}[r] %%
\end{tikzpicture}
\end{tzcode}
+\remark
+|\tzslopeat{AA}{2}{2cm}[-180]| is equivalent to |\tzslopeat'{AA}{2}{2cm}|.
+\begin{itemize}
+\item Without the arrows, |\tzslopeat| and |\tzslopeat'| give the same result except where the labels are placed.
+\item
+The swap version |\tzslopeat'| does not change its direction with the option |[<rotate>]|.
+\end{itemize}
@@ -2786,7 +2918,7 @@ With the option |[<rotate>]| \xem{immediately after} the last mandatory option |
|\tzslope| uses a coordinate instead of a value of $x$ to draw slope lines.
So the mandatory arguments of |\tzslope| is |{<path>}|, |(<coor>)|, and |{<length>}|. The $y$ value of |(<x,y>)| is ignored.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax
\tzslope[<opt>]{<path>}(<x,y>)(<epsilon1>,<epsilon2>){<length>}[<angle>]
{<text>}[<pos,opt>]<code.append>
@@ -2805,15 +2937,14 @@ So the mandatory arguments of |\tzslope| is |{<path>}|, |(<coor>)|, and |{<lengt
(B)[out=0,in=180]
(C)[out=0,in=255]
(D);
-\coordinate (B) at (2,2);
\tzslope[red]{AA}(1,0){3cm}
\tzgetxyval(B){\Bx}{\By}
\tzslopeat[blue]{AA}{\Bx}{2cm}
\tzslope{AA}(4,0){2cm}{$f'(4)$}[r]
-% normal lines: roatate: [90] or [-90]
-\tzslope[blue]{AA}(1,0){1cm}[90]
-\tzslope[red]{AA}(\Bx,0){2cm}[90]
-\tzslope[red]{AA}(4,0){1cm}[-90]{normal}[b]
+% normal lines: rotate: [90] or [-90]
+\tzslope[->,blue]{AA}(1,0){1cm}[90]
+\tzslope[->,red]{AA}(B){2cm}[90]
+\tzslope[->,red]{AA}(4,0){1cm}[-90]{normal}[b]
\end{tikzpicture}
\end{tzcode}
@@ -2838,9 +2969,9 @@ You can add \Tikz\ code with the last option |<code.append>|.
\tzaxes(9,8)
\tzplotcurve"AA"(1,7)(3,3)(8,1);
\tzcoors(2,0)(K2)(4,0)(K4);
-\tzslope[red,tzextend={1cm}{2cm}]{AA}(2,0){1cm} %%
+\tzslope[red,tzextend={1cm}{2cm}]{AA}(K2){1cm} %%
\tztangent[blue]{AA}(K4)[1:7]{tangent}[red,b]
-\tzslope[->]{AA}(4,0){0.1pt}[90]
+\tzslope[->]{AA}(K4){0.1pt}[90]
<--([turn]0:2cm) node [r] {gradient} > %%
\tzvXpoint*{AA}(K4)
\tzticksx{1,7}
@@ -2848,3 +2979,323 @@ You can add \Tikz\ code with the last option |<code.append>|.
\end{tzcode}
+\subsection{\protect\cmd{\tzslope'}}
+\label{ss:tzslope'}
+
+The \iisw{swap version} \icmd{\tzslope'} draws a slope line with the opposite direction of |\tzslope|.
+
+\begin{tzcode}{.3}
+% \tzslope'
+\begin{tikzpicture}
+\tzhelplines*(5,4)
+\tzcoors*(0,0)(A)(2,2)(B){B}[b](3.5,1)(C)(5,3)(D);
+\tztos[thick]"AA"(A)[out=0,in=180]
+ (B)[out=0,in=180]
+ (C)[out=0,in=255]
+ (D);
+\tzslope'[->,red,thick]{AA}(1,0){3cm}
+\tzslope[->,blue]{AA}(B){2cm}
+\tzslope'[->]{AA}(4,0){2cm}{$f'(4)$}[r]
+\end{tikzpicture}
+\end{tzcode}
+
+\remark
+|\tzslope{AA}{2}{2cm}[-180]| is equivalent to |\tzslope'{AA}{2}{2cm}|.
+
+\begin{itemize}
+\item Without the arrows, |\tzslope| and |\tzslope'| give the same result except where the labels are placed.
+\item
+The swap version |\tzslope'| does not change its direction with the option |[<rotate>]|.
+\end{itemize}
+
+
+%%------------------------------------------------------------
+\section{Normal lines}
+\label{s:normals}
+
+\subsection{\protect\cmd{\tznormalat}}
+\label{ss:tznormalat}
+
+\icmd{\tznormalat} draws a normal line \xem{from a point} on a graph at $x=\mbox{\texttt{<x-val>}}$.
+The mandatory arguments are |{<path>}|, |{<x-val>}|, and |{<length>}|.
+
+By default, the normal lines are drawn on the |behind| layer.
+You can change the layer, like \icmd{\settztnormallayer}|{main}|.
+
+\remark The slope of a normal \xem{perpendicular to the slope line} is \xem{approximate} and can be changed by changing the variation interval with the option |(<epsilon1,epsilon2>)|. The default is $(\varepsilon_1,\varepsilon_2)=(0.01,0.01)$.
+You can also use
+\icmd{\settznormalepsilon}|{<epsilon1>}{<epsilon2>}| \xem{before} the macro |\tznormalat|, which is valid until the end of the |tikzpicture| environment, unless changed again.
+
+
+\begin{tzdef}
+% syntax: minimum
+\tznormalat{<path>}{<x-val>}{<length>}
+% syntax: full
+\tznormalat[<opt>]{<path>}{<x-val>}(<epsilon1>,<epsilon2>){<length>}[<rotate>]
+ {<text>}[<node opt>]<code.append>
+% defaults
+ []{<m>}{<m>}(.01,.01){<m>}[90]{}[]<>
+\end{tzdef}
+
+\begin{tzcode}{.3}
+% \tznormalat
+\begin{tikzpicture}
+\tzhelplines*(5,4)
+\tzcoors*(0,0)(A)(2,2)(B){B}[b](3.5,1)(C)(5,3)(D);
+\tztos[thick]"AA"(A)[out=0,in=180]
+ (B)[out=0,in=180]
+ (C)[out=0,in=255]
+ (D);
+\tzslopeat[red,thick]{AA}{1}{3cm}
+\tzslopeat[blue]{AA}{2}{2cm}
+\tzslopeat{AA}{4}{2cm}{$f'(4)$}[r]
+\tznormalat[->,red,thick]{AA}{1}{3cm}
+\tznormalat[->,blue]{AA}{2}{2cm}
+\tznormalat[->]{AA}{4}{2cm}{normal}[r]
+\end{tikzpicture}
+\end{tzcode}
+
+You can change its direction with the option |[<rotate>]| after the argument |{<length>}|.
+
+\begin{tzcode}{.3}
+% \tznormalat: rotated
+\begin{tikzpicture}
+\tzhelplines*(5,4)
+\tzcoors*(0,0)(A)(2,2)(B){B}[b](3.5,1)(C)(5,3)(D);
+\tztos[thick]"AA"(A)[out=0,in=180]
+ (B)[out=0,in=180]
+ (C)[out=0,in=255]
+ (D);
+\tzslopeat[red]{AA}{2}{3cm}
+\tznormalat[->,blue]{AA}{2}{2cm}
+\tznormalat[->,blue]{AA}{2}{2cm}[45]{45\textdegree}[ar]
+\tznormalat[->,blue]{AA}{2}{2cm}[135]
+\end{tikzpicture}
+\end{tzcode}
+
+
+\subsection{\protect\cmd{\tznormalat'}}
+\label{ss:tznormalat'}
+
+The \iisw{swap version} \icmd{\tznormalat'} draws a normal line with the opposite direction of |\tznormalat|.
+
+\begin{tzdef}
+% syntax: minimum
+\tznormalat'{<path>}{<x-val>}{<length>}
+% syntax: full
+\tznormalat'[<opt>]{<path>}{<x-val>}(<epsilon1>,<epsilon2>){<length>}[<rotate>]
+ {<text>}[<node opt>]<code.append>
+% defaults
+ []{<m>}{<m>}(.01,.01){<m>}[-90]{}[]<>
+\end{tzdef}
+
+\begin{tzcode}{.3}
+% \tznormalat' (swap version)
+\begin{tikzpicture}
+\tzhelplines*(5,4)
+\tzcoors*(0,0)(A)(2,2)(B){B}[b](3.5,1)(C)(5,3)(D);
+\tztos[thick]"AA"(A)[out=0,in=180]
+ (B)[out=0,in=180]
+ (C)[out=0,in=255]
+ (D);
+\tzslopeat[red,thick]{AA}{1}{3cm}
+\tzslopeat[blue]{AA}{2}{2cm}
+\tzslopeat{AA}{4}{2cm}{$f'(4)$}[r]
+\tznormalat'[->,red,thick]{AA}{1}{3cm} %%
+\tznormalat[->,blue]{AA}{2}{2cm}
+\tznormalat'[->]{AA}{4}{2cm}{normal}[r] %%
+\end{tikzpicture}
+\end{tzcode}
+
+\remark
+The swap version |\tznormalat'| has a fixed |[<rotate>]| value of |[-90]|.
+\begin{itemize}
+\item |\tznormalat{AA}{1}{3cm}[-90]| is equivalent to |\tznormalat'{AA}{1}{3cm}|.
+\item |\tznomralat'| does not change its direction with the option |[<rotate>]|.
+\end{itemize}
+
+
+\subsection{\protect\cmd{\tznormalat*(')}}
+\label{ss:tznormalat*}
+
+\begin{tzdef}
+% syntax: minimum
+\tznormalat*{<path>}{<x-val>}{<length>}
+% syntax: full
+\tznormalat*[<opt>]{<path>}{<x-val>}(<epsilon1>,<epsilon2>){<length>}[<rotate>]
+ {<text>}[<node opt>]<code.append>
+% defaults
+* []{<m>}{<m>}(.01,.01){<m>}[90]{}[]<>
+*'[]{<m>}{<m>}(.01,.01){<m>}[-90]{}[]<>
+\end{tzdef}
+
+The starred version \icmd{\tznormalat*} works like |\tzslopeat|, but rotated |[90]|.
+And the swap version \icmd{\tznormalat*'} works like |\tzslopeat|, but rotated |[-90]|.
+
+\remark
+The swap version |\tznormalat*'| has a fixed |[<rotate>]| value of |[-90]|.
+\begin{itemize}
+\item |\tznormalat*{AA}{1}{3cm}[-90]| is equivalent to |\tznormalat*'{AA}{1}{3cm}|.
+\item |\tznomralat*'| does not change its direction with the option |[<rotate>]|.
+\end{itemize}
+
+\begin{tzcode}{.3}
+% \tznormalat*(')
+\begin{tikzpicture}
+\tzhelplines*(5,4)
+\tzcoors*(0,0)(A)(2,2)(B){B}[b](3.5,1)(C)(5,3)(D);
+\tztos[thick]"AA"(A)[out=0,in=180]
+ (B)[out=0,in=180]
+ (C)[out=0,in=255]
+ (D);
+\tzslopeat[red,thick]{AA}{1}{3cm}
+\tzslopeat[blue]{AA}{2}{2cm}
+\tzslopeat{AA}{4}{2cm}{$f'(4)$}[r]
+\tznormalat*[->,red,thick]{AA}{1}{3cm}
+\tznormalat*[->,blue]{AA}{2}{2cm}
+\tznormalat*'[->]{AA}{4}{2cm}{normal}[r]
+\end{tikzpicture}
+\end{tzcode}
+
+
+\subsection{\protect\cmd{\tznormal}}
+\label{ss:tznormal}
+
+\icmd{\tznormal} is the same as |\tznormalat|, except for one thing.
+|\tznormal| uses a coordinate instead of a value of $x$ to draw normal lines.
+So the mandatory arguments of |\tznormal| is |{<path>}|, |(<coor>)|, and |{<length>}|. The $y$ value of |(<x,y>)| is ignored.
+
+\begin{tzdef}
+% syntax: minimum
+\tznormal{<path>}(<x,y>){<length>}
+% syntax: full
+\tznormal[<opt>]{<path>}(<x,y>)(<epsilon1>,<epsilon2>){<length>}[<angle>]
+ {<text>}[<pos,opt>]<code.append>
+% defaults
+ []{<m>}(<m>)(.01,.01){<m>}[90]{}[]<>
+\end{tzdef}
+
+
+
+\begin{tzcode}{.3}
+% \tznormal
+\begin{tikzpicture}
+\tzhelplines*(5,4)
+\tzcoors*(0,0)(A)(2,2)(B){B}[b](3.5,1)(C)(5,3)(D);
+\tztos[thick]"AA"(A)[out=0,in=180]
+ (B)[out=0,in=180]
+ (C)[out=0,in=255]
+ (D);
+\tzslope[red]{AA}(1,0){3cm}
+\tzgetxyval(B){\Bx}{\By}
+\tzslopeat[blue]{AA}{\Bx}{2cm}
+\tzslope{AA}(4,0){2cm}{$f'(4)$}[r]
+\tznormal[->,blue]{AA}(1,0){2cm}
+\tznormal[->,red]{AA}(B){2cm}
+\tznormal[->,red]{AA}(4,0){2cm}{normal}[a]
+\end{tikzpicture}
+\end{tzcode}
+
+You can change its direction with the option |[<rotate>]| after the argument |{<length>}|.
+
+\begin{tzcode}{.3}
+% \tznormal: rotated
+\begin{tikzpicture}
+\tzhelplines*(5,4)
+\tzcoors*(0,0)(A)(2,2)(B){B}[b](3.5,1)(C)(5,3)(D);
+\tztos[thick]"AA"(A)[out=0,in=180]
+ (B)[out=0,in=180]
+ (C)[out=0,in=255]
+ (D);
+\tzslope[red]{AA}(B){3cm}
+\tznormal[->,blue]{AA}(B){2cm}
+\tznormal[->,blue]{AA}(B){2cm}[45]{45\textdegree}[ar]
+\tznormal[->,blue]{AA}(B){2cm}[135]
+\end{tikzpicture}
+\end{tzcode}
+
+
+\subsection{\protect\cmd{\tznormal'}}
+\label{ss:tznormal'}
+
+The \iisw{swap version} \icmd{\tznormal'} draws a normal line with the opposite direction of |\tznormal|.
+
+\begin{tzdef}
+% syntax: minimim
+\tznormal'{<path>}(<x,y>){<length>}
+% syntax: full
+\tznormal'[<opt>]{<path>}(<x,y>)(<epsilon1>,<epsilon2>){<length>}[<angle>]
+ {<text>}[<pos,opt>]<code.append>
+% defaults
+ []{<m>}(<m>)(.01,.01){<m>}[-90]{}[]<>
+\end{tzdef}
+
+\remark
+The swap version |\tznormal'| has a fixed |[<rotate>]| value of |[-90]|.
+\begin{itemize}
+\item |\tznormal{AA}{1}{3cm}[-90]| is equivalent to |\tznormal'{AA}{1}{3cm}|.
+\item |\tznomral'| does not change its direction with the option |[<rotate>]|.
+\end{itemize}
+
+\begin{tzcode}{.3}
+% \tznormal' (swap version)
+\begin{tikzpicture}
+\tzhelplines*(5,4)
+\tzcoors*(0,0)(A)(2,2)(B){B}[b](3.5,1)(C)(5,3)(D);
+\tztos[thick]"AA"(A)[out=0,in=180]
+ (B)[out=0,in=180]
+ (C)[out=0,in=255]
+ (D);
+\tzslope[red]{AA}(1,0){3cm}
+\tzgetxyval(B){\Bx}{\By}
+\tzslopeat[blue]{AA}{\Bx}{2cm}
+\tzslope{AA}(4,0){2cm}{$f'(4)$}[r]
+\tznormal'[->,blue]{AA}(1,0){2cm} %%
+\tznormal[->,red]{AA}(B){2cm}
+\tznormal'[->,red]{AA}(4,0){2cm}{normal}[b] %%
+\end{tikzpicture}
+\end{tzcode}
+
+
+\subsection{\protect\cmd{\tznormal*(')}}
+\label{ss:tznormal*}
+
+The starred version \icmd{\tznormal*} works like |\tzslope|, but rotated |[90]|.
+And its swap version \icmd{\tznormal*'} works like |\tzslope|, but rotated |[-90]|.
+
+\begin{tzdef}
+% syntax
+\tznormal*[<opt>]{<path>}(<x,y>)(<epsilon1>,<epsilon2>){<length>}[<angle>]
+ {<text>}[<pos,opt>]<code.append>
+% defaults
+* []{<m>}(<m>)(.01,.01){<m>}[90]{}[]<>
+*'[]{<m>}(<m>)(.01,.01){<m>}[-90]{}[]<>
+\end{tzdef}
+
+
+\remark
+The swap version |\tznormal*'| has a fixed |[<rotate>]| value of |[-90]|.
+\begin{itemize}
+\item |\tznormal*{AA}{1}{3cm}[-90]| is equivalent to |\tznormal*'{AA}{1}{3cm}|.
+\item |\tznomral*'| does not change its direction with the option |[<rotate>]|.
+\end{itemize}
+
+
+\begin{tzcode}{.3}
+% \tznormal*(')
+\begin{tikzpicture}
+\tzhelplines*(5,4)
+\tzcoors*(0,0)(A)(2,2)(B){B}[b](3.5,1)(C)(5,3)(D);
+\tztos[thick]"AA"(A)[out=0,in=180]
+ (B)[out=0,in=180]
+ (C)[out=0,in=255]
+ (D);
+\tzslopeat[red,thick]{AA}{1}{3cm}
+\tzslopeat[blue]{AA}{2}{2cm}
+\tzslopeat{AA}{4}{2cm}{$f'(4)$}[r]
+\tznormal*[->,red,thick]{AA}(1,0){3cm}
+\tznormal*[->,blue]{AA}(B){2cm}
+\tznormal*'[->]{AA}(4,0){2cm}{normal}[r]
+\end{tikzpicture}
+\end{tzcode}
+
diff --git a/graphics/pgf/contrib/tzplot/tzplot-doc-E-v2.0.tex b/graphics/pgf/contrib/tzplot/tzplot-doc-E-v2.1.tex
index f3cc24f124..7ae97f306b 100644
--- a/graphics/pgf/contrib/tzplot/tzplot-doc-E-v2.0.tex
+++ b/graphics/pgf/contrib/tzplot/tzplot-doc-E-v2.1.tex
@@ -41,7 +41,7 @@ The default options for middle arrow tips are |-|, |thin|, |solid|, and |shorten
The macro \icmd{\settzmidarrow} controls the position, style, and other options of middle arrow tips. The effect is valid until the end of the |tikzpicture| environment, unless changed again.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax:
\settzmidarrow<position>{<arrow tip style>}[<opt>]
% all arguments are optional
@@ -98,7 +98,7 @@ The circle is drawn like this:
\draw [<opt>] (0,0) circle (1.2pt) ;
\end{verbatim}
-|\settzmidarrow| controls the circle with |<opt>|.
+|\settzmidarrow| controls the circle arrow tip with |<opt>|.
\begin{tzcode}{.3}
\begin{tikzpicture}
@@ -135,7 +135,7 @@ The cross mark is drawn like this:
\draw [<opt>] (-2pt,2pt) to (2pt,-2pt) ;
\end{verbatim}
-|\settzmidarrow| controls the circle with |<opt>|.
+|\settzmidarrow| controls the cross arrow tip with |<opt>|.
\begin{tzcode}{.3}
\begin{tikzpicture}
@@ -171,7 +171,7 @@ The diagonal line is drawn like this:
\draw [<opt>] (2pt,2pt) to (-2pt,-2pt) ;
\end{verbatim}
-|\settzmidarrow| controls the circle with |<opt>|.
+|\settzmidarrow| controls the diagonal arrow tip line with |[<opt>]|.
\begin{tzcode}{.3}
\begin{tikzpicture}
@@ -216,7 +216,7 @@ The diagonal line is drawn like this:
\icmd{\tzbrace} takes two coordinates as mandatory arguments to draw a \xem{calligraphic brace} connecting them.
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
\tzbrace(<coor>)(<coor>)
% syntax: medium
@@ -232,7 +232,7 @@ The |raise| value of a brace is |5pt| by default and the value can be changed by
The |amplitude| of a brace is |5pt| by default. You can control the amplitude by writing the option |amplitude=<dim>| in the second bracket option |[<decoration opt>]|.
-\begin{tztikz}{}
+\begin{tztikz}
\tzbrace[thick](0,0)(3,1) % works like:
\draw [thick,decorate,decoration={calligraphic brace, amplitude=5pt, raise=5pt}]
(0,0) to (3,1);
@@ -294,7 +294,7 @@ The empty shift option |<>| is not allowed.
\icmd{\tzsnake} connects two points with a snaked line, with many default values, using \Tikz's |to| operation.
-\begin{tztikz}{}
+\begin{tztikz}
\tzsnake(0,1)(3,2) % works like
\draw [ decorate , decoration={ %% many defaults
snake,
@@ -314,10 +314,9 @@ The empty shift option |<>| is not allowed.
\end{tikzpicture}
\end{tzcode}
-\begin{tzdef}{}
+\begin{tzdef}
% syntax: minimum
-\tzsnake[<opt>]{<segment length>}[<decoration opt>]<shift coor>
- (<coor>){<text>}[<node opt>](<coor>){<text>}[<node opt>]<code.append>
+\tzsnake(<coor>)(<coor>)
% syntax: full
\tzsnake[<opt>]{<segment length>}[<decoration opt>]<shift coor>
(<coor>){<text>}[<node opt>]
@@ -326,7 +325,7 @@ The empty shift option |<>| is not allowed.
[]{5pt}[many defaults above]<>(<m>){}[](<m>){}[]<>
\end{tzdef}
-The key |segment length| is controlled by the first curly brace option and you should write down all the other keys in the second bracket option |[<decoration opt>]| to change the values. Not specifying the option |{<segment length>}|, when the first bracket option is empty, you need empty brackets |[]|, like |\tzsnake[][<decoration op>]...|.
+The key |segment length| is controlled by the first curly brace option and you should write down all the other keys in the second bracket option |[<decoration opt>]| to change the values. Not specifying the option |{<segment length>}|, when the first bracket option is empty, you need empty brackets |[]|, like |\tzsnake[][<decoration opt>]...|.
\begin{tzcode}{.3}
% \tzsnake: {segment length} option
@@ -362,7 +361,7 @@ The plus version \icmd{\tzsnake+} uses the second mandatory coordinate as a rela
%%%%%\label{s:tzspy}
%%%%%
%%%%%
-%%%%%\begin{tzdef}{}
+%%%%%\begin{tzdef}
%%%%%% syntax: minimum
%%%%%\tzspy(<coor>)(<coor>)
%%%%%% syntax: full
@@ -381,7 +380,7 @@ The plus version \icmd{\tzsnake+} uses the second mandatory coordinate as a rela
%%%%% \end{tikzpicture}
%%%%%\end{verbatim}
%%%%%
-%%%%%\begin{tzcode}[text above listing]{1}
+%%%%%\begin{tzcode}[text above listing]
%%%%%\begin{tikzpicture}[scale=.1,font=\scriptsize,spy using outlines]
%%%%%\settzdotsize{1.2pt}
%%%%%\tzaxes(-15,0)(60,60){$Q$}{$P$}
@@ -414,7 +413,7 @@ The plus version \icmd{\tzsnake+} uses the second mandatory coordinate as a rela
%%%%%\end{tzcode}
%%%%%
%%%%%
-%%%%%\begin{tzcode}[text above listing]{1}
+%%%%%\begin{tzcode}[text above listing]
%%%%%\begin{tikzpicture}[scale=.1,font=\scriptsize,spy using overlays]
%%%%%\settzdotsize{1.2pt}
%%%%%\tzaxes(-15,0)(60,60){$Q$}{$P$}
diff --git a/graphics/pgf/contrib/tzplot/tzplot-doc.pdf b/graphics/pgf/contrib/tzplot/tzplot-doc.pdf
index db3e4926a4..fd3f874709 100644
--- a/graphics/pgf/contrib/tzplot/tzplot-doc.pdf
+++ b/graphics/pgf/contrib/tzplot/tzplot-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tzplot/tzplot-doc.tex b/graphics/pgf/contrib/tzplot/tzplot-doc.tex
index 1a5fbb62dc..b9bbb136ac 100644
--- a/graphics/pgf/contrib/tzplot/tzplot-doc.tex
+++ b/graphics/pgf/contrib/tzplot/tzplot-doc.tex
@@ -5,9 +5,9 @@
% arara: xelatex: {shell: yes, synctex: yes}
% arara: xelatex: {shell: yes, synctex: yes}
-%% 2022/02/28 v2.0
-\def\tmpdate{2022/02/28}
-\def\tmpversion{2.0}
+%% 2022/09/28 v2.1
+\def\tmpdate{\today}
+\def\tmpversion{2.1}
\def\printtodos{}
\def\printtmptest{}
@@ -27,7 +27,7 @@ tzplot-doc-C1-v\tmpversion, % connecting points -- Part III
tzplot-doc-C2-v\tmpversion, % polygons and angles -- Part III
tzplot-doc-D-v\tmpversion, % plotting graphs -- Part IV
tzplot-doc-E-v\tmpversion, % misc : final chapter : (-- Part V: not yet)
-%%%tzplot-eco-v\tmpversion, % economics
+%tzplot-eco-v\tmpversion, % economics
}}
%------------------------------------------------------
@@ -51,6 +51,11 @@ tzplot-doc-E-v\tmpversion, % misc : final chapter : (-- Part V: not yet)
%\settocdepth{subsubsection}
%\setlength\cftsubsubsectionindent{4.5em}
+%% us date
+\usepackage{datetime}
+\usdate \let\mytoday\today
+\AtBeginDocument{\let\today\mytoday}
+
\hypersetup{pdfborder={0 0 0}} % to suppress the hyperlink red box
%%====================================== (ndh)
@@ -100,11 +105,11 @@ tzplot-doc-E-v\tmpversion, % misc : final chapter : (-- Part V: not yet)
\usepackage[normalem]{ulem} % [normalem] to correct the pdf bookmark broken characters
\usepackage{idxlayout}
-\usepackage{tabu,tabu-fix}
+%\usepackage{tabu,tabu-fix}
\usepackage{tcolorbox}
-\tcbuselibrary{minted,listings,breakable}
+\tcbuselibrary{minted,xparse,listings,breakable}
\tcbset{%
listing engine=minted,breakable,
after={\par\vspace{.5\baselineskip}\noindent}
@@ -117,21 +122,31 @@ tzplot-doc-E-v\tmpversion, % misc : final chapter : (-- Part V: not yet)
center upper,
center lower,
sidebyside gap=5pt,
- listing options={%
- style=tcblatex,
- keywordstyle=\color{blue},
- commentstyle=\color{black!20!green},
- morekeyword={
- tzline,tzlines,tzdot,tzdots,
- tznode,tznodes
- },
- }
+ minted style=igor, %tango, **igor, xcode, ***manni, *autumn, colorful,
+% listing options={%
+% style=tcblatex,
+% keywordstyle=\color{blue},
+% commentstyle=\color{black!20!green},
+% morekeywords={
+% tzline,tzlines,tzdot,tzdots,
+% tznode,tznodes
+% },
+% }, % end of listing options
}
-\newtcblisting{tzdef}[1]{colback=blue!5!white,listing only,#1}
-\newtcblisting{tzsty}[1]{colback=green!5!white,listing only,#1}
-\newtcblisting{tztikz}[1]{colback=white,colframe=gray!15,listing only,#1}
-\newtcblisting{tzcode}[2][]{righthand width=\expandafter#2\linewidth,#1}
+%\newtcblisting{tzdef}[1]{colback=blue!5!white,listing only,#1}
+%\newtcblisting{tzsty}[1]{colback=green!5!white,listing only,#1}
+%\newtcblisting{tztikz}[1]{colback=white,colframe=gray!15,listing only,#1}
+%\newtcblisting{tzcode}[2][]{righthand width=\expandafter#2\linewidth,#1}
+
+\DeclareTCBListing{tzdef}{ !O{} }
+ {colback=blue!5!white,listing only,#1}
+\DeclareTCBListing{tzsty}{ !O{} }
+ {colback=green!5!white,listing only,#1}
+\DeclareTCBListing{tztikz}{ !O{} }
+ {colback=white,colframe=gray!15,listing only,#1}
+\DeclareTCBListing{tzcode}{ !G{1} !O{} }
+ {righthand width=\expandafter#1\linewidth,#2}
\NewDocumentEnvironment{mytcblisting}{O{}}
{ \medskip
@@ -282,6 +297,8 @@ tzplot-doc-E-v\tmpversion, % misc : final chapter : (-- Part V: not yet)
\firmlists
+\renewcommand\cleardoublepage{\clearpage}
+
%=============================================================
\begin{document}
@@ -336,44 +353,64 @@ projection, ticks, intersections, tangent lines
\addcontentsline{toc}{chapter}{Version history}
\begin{itemize}
-%%%\item v\tmpversion (\tmpdate)
-%%% \begin{itemize}
-%%% \item
-%%% \item
-%%% \item
-%%% \end{itemize}
-\item v2.0 (2022/02/28)
+%\item v\tmpversion (\tmpdate)
+% \begin{itemize}
+% \item Uploaded to CTAN
+% \item document done
+% \end{itemize}
+\item v\tmpversion (2022/09/28)
\begin{itemize}
\item Uploaded to CTAN
\item document done
\end{itemize}
-\item v1.98 (2022/02/27)
+\item v2.1 (2022/09/24)
\begin{itemize}
- \item added |\tzpointangle|
- \item added |\tzfnarealine(')|, |\settzfnarealinestyle|
+% \item corrected typos in the document
+ \item fixed bugs: |\tzplot|, |\tzplotcurve|, |\tzslope|
+ \item redesigned |\tzaxes| to have one path with ``liftpen" for naming paths
+ \item redesigned |\tzaxesL| to have one path with ``liftpen" for naming paths
+ \item redisigned |\tzslopeat| and |\tzslope|
+ \item added the swap versions |\tzslopeat'| and |\tzslope'|
+ \item added |\tznormal(*)(')|, |\tznormalat(*)(')|, |\settznormalepsilon| and |\settznormallayer|
\end{itemize}
-\item v1.97 (2022/02/26)
+\item v2.1 (2022/04/15)
\begin{itemize}
- \item corrected |\tzpdfN|: bug fix
- \item redesigned |\tzfnarea| (renamed from |\tzfnArea|)
- \item added |\settzfnarearlayer|
+ \item modified |\tzaxisx| and |\tzaxisy| to add the option |"<path name>"|
+ \item added |\tzdistance| to calculate the distance between two coordinates
+ % (2022/04/23)
\end{itemize}
-\item v1.96 (2022/02/25)
- \begin{itemize}
- \item modified |\tzanglemark|, |\tzrightanglemark|
- \item added |\settzAAlinestyle| and |\settzRAlinestyle|
- \item added |\settzAAradius|, |\settzRAsize|
- \item predefined coordinates |(tzAAmid)|, |(tzRAvertext)|
- \item corrected |\tzdefLFn|, |\tzdefLFnofy|, |\tzLfn|, |\tzLFnofy|
- \item added |error message|: infinite slope error (for |LFn...| things)
- \end{itemize}
-\item v1.95 (2022/02/24)
+\item v2.0 (2022/02/28)
\begin{itemize}
- \item documented
- \item redefined |\tzedge(+)| and |\tzedges(+)| to make them consistent with \Tikz\ way
- \item added aliases: |\tzbox|, |\tzboxring|, |\tzcirclering|
- \item renamed |\tzangleONE|, |\tzangleTWO|, |\tzanglresult|
+ \item Uploaded to CTAN
+% \item document done
\end{itemize}
+%%%\item v1.98 (2022/02/27)
+%%% \begin{itemize}
+%%% \item added |\tzpointangle|
+%%% \item added |\tzfnarealine(')|, |\settzfnarealinestyle|
+%%% \end{itemize}
+%%%\item v1.97 (2022/02/26)
+%%% \begin{itemize}
+%%% \item corrected |\tzpdfN|: bug fix
+%%% \item redesigned |\tzfnarea| (renamed from |\tzfnArea|)
+%%% \item added |\settzfnarearlayer|
+%%% \end{itemize}
+%%%\item v1.96 (2022/02/25)
+%%% \begin{itemize}
+%%% \item modified |\tzanglemark|, |\tzrightanglemark|
+%%% \item added |\settzAAlinestyle| and |\settzRAlinestyle|
+%%% \item added |\settzAAradius|, |\settzRAsize|
+%%% \item predefined coordinates |(tzAAmid)|, |(tzRAvertex)|
+%%% \item corrected |\tzdefLFn|, |\tzdefLFnofy|, |\tzLfn|, |\tzLFnofy|
+%%% \item added |error message|: infinite slope error (for |LFn...| things)
+%%% \end{itemize}
+%%%\item v1.95 (2022/02/24)
+%%% \begin{itemize}
+%%% \item documented
+%%% \item redefined |\tzedge(+)| and |\tzedges(+)| to make them consistent with \Tikz\ way
+%%% \item added aliases: |\tzbox|, |\tzboxring|, |\tzcirclering|
+%%% \item renamed |\tzangleONE|, |\tzangleTWO|, |\tzanglresult|
+%%% \end{itemize}
%%%\item v1.94 (2022/02/22)
%%% \begin{itemize}
%%% \item added |\tzprojs(*)|, |\tzprojsx(*)|, |\tzprojsy(*)| (semicolon versions)
@@ -505,20 +542,20 @@ projection, ticks, intersections, tangent lines
\item added aliases: |\let\tzrectangle\tzframe| and |\let\tzoval\tzellipse|
\end{itemize}
\item v1.0 (2021/02/28) uploaded to CTAN
-\item v0.999a (2021/02/27)
- \begin{itemize}
- \item writing document
- \item some |\tz<...>AtBegin| and |\tz<...>AtEnd| not documented
- \end{itemize}
-\item v0.999 (2021/02/24)
- \begin{itemize}
- \item fixed the title. ``Plot Graphs with \Tikz\ Abbreviations"
- \item changed the default |\tzpathstyle| and |\tzlinkstyle| from `|--|' to `|to|' (no harm)
- \item added |\tzpathlayer| and |\settzpathlayer|, for later use. (currently not used)
- \item removed explanation of the option |<+or++>| in the document (considering to remove later)
- \item changed the delimiter |<path style>| to |[<path style>]| in |\tzpath| and |\tzlink(s)| (critical change)
- \item added |text opacity=1| everywhere |fill opacity=.3| is used
- \end{itemize}
+%%%\item v0.999a (2021/02/27)
+%%% \begin{itemize}
+%%% \item writing document
+%%% \item some |\tz<...>AtBegin| and |\tz<...>AtEnd| not documented
+%%% \end{itemize}
+%%%\item v0.999 (2021/02/24)
+%%% \begin{itemize}
+%%% \item fixed the title. ``Plot Graphs with \Tikz\ Abbreviations"
+%%% \item changed the default |\tzpathstyle| and |\tzlinkstyle| from `|--|' to `|to|' (no harm)
+%%% \item added |\tzpathlayer| and |\settzpathlayer|, for later use. (currently not used)
+%%% \item removed explanation of the option |<+or++>| in the document (considering to remove later)
+%%% \item changed the delimiter |<path style>| to |[<path style>]| in |\tzpath| and |\tzlink(s)| (critical change)
+%%% \item added |text opacity=1| everywhere |fill opacity=.3| is used
+%%% \end{itemize}
%%%\item v0.99j (2021/02/18)
%%% \begin{itemize}
%%% \item added |\tzplotcurve*| to show dots
diff --git a/graphics/pgf/contrib/tzplot/tzplot.sty b/graphics/pgf/contrib/tzplot/tzplot.sty
index 7b574bdc25..2016b6bbd0 100644
--- a/graphics/pgf/contrib/tzplot/tzplot.sty
+++ b/graphics/pgf/contrib/tzplot/tzplot.sty
@@ -11,7 +11,7 @@
%% http://www.latex-project.org/lppl.txt.
%%
%% -------------------------------------------------
-\ProvidesPackage{tzplot}[2022/02/28 v2.0 Plot Graphs with TikZ Abbreviations]
+\ProvidesPackage{tzplot}[2022/09/28 v2.1 Plot Graphs with TikZ Abbreviations]
% expl3,xparse: LPPL
% tikz: LPPL and/or GNU GPL
@@ -154,6 +154,26 @@ fpu, % for computation for \tzpicangle
\let\tzslopeatepsilonR\tzslopeepsilonR
+%% normal epsilon
+
+\def\tz@default@normal@epsilonL{.01}
+\def\tz@default@normal@epsilonR{.01}
+\def\tz@initial@normal@epsilonL{\tz@default@normal@epsilonL}
+\def\tz@initial@normal@epsilonR{\tz@default@normal@epsilonL}
+\NewDocumentCommand\settznormalepsilon{mg}
+{%
+ \renewcommand\tz@initial@normal@epsilonL{#1}
+ \IfNoValueTF {#2}
+ {\renewcommand\tz@initial@normal@epsilonR{#1}}
+ {\renewcommand\tz@initial@normal@epsilonR{#2}}
+}
+\newcommand\tznormalepsilonL{\tz@initial@normal@epsilonL}
+\newcommand\tznormalepsilonR{\tz@initial@normal@epsilonR}
+
+\let\tznormalatepsilonL\tznormalepsilonL
+\let\tznormalatepsilonR\tznormalepsilonR
+
+
%%%%% layers: defaults
%% tzpath layer %% default: main
@@ -209,6 +229,16 @@ fpu, % for computation for \tzpicangle
\let\tzslopeatlayer\tzslopelayer
\let\settzslopeatlayer\settzslopelayer
+%% normal layer
+\def\tz@default@normal@layer{behind} % fixed
+\def\tz@initial@normal@layer{\tz@default@normal@layer} % changeable
+\NewDocumentCommand\settznormallayer{m}
+ {\renewcommand\tz@initial@normal@layer{#1}}
+\newcommand\tznormallayer{\tz@initial@normal@layer}
+
+\let\tznormalatlayer\tznormallayer
+\let\settznormalatlayer\settznormallayer
+
%% angle layer
\def\tz@default@angle@layer{behind} % fixed
\def\tz@initial@angle@layer{\tz@default@angle@layer} % changeable
@@ -445,6 +475,21 @@ fpu, % for computation for \tzpicangle
\edef#3{\pgfmathresult}%
}
+%%%%% (ADDED 2022/04/23)
+%%%%% \tzpointlength
+\NewDocumentCommand\tzdistance{ r() r() m g g }
+{
+ \tikz@scan@one@point\pgfutil@firstofone($(#2)-(#1)$)\relax%
+ \pgfmathparse{veclen(\the\pgf@x,\the\pgf@y)/28.45274}% convert pt to cm
+ \edef#3{\pgfmathresult}%
+ \IfValueT { #4 } { \pgfmathparse{\the\pgf@x/28.45274}\edef#4{\pgfmathresult} }
+ \IfValueT { #5 } { \pgfmathparse{\the\pgf@y/28.45274}\edef#5{\pgfmathresult} }
+}
+
+%%% NOT working correctly
+% { \pgfmathparse{round(veclen(\the\pgf@x,\the\pgf@y)/28.45274}*1000)/1000 }% rounded
+
+
%%% --- end of \tzgetxyval
%%%%%% \tzgetxyval (experimental)
@@ -483,8 +528,6 @@ fpu, % for computation for \tzpicangle
-
-
%%%%% Dots
%%% Node Dots %%% (basic: using minimum size)
@@ -4630,7 +4673,7 @@ fpu, % for computation for \tzpicangle
%% final action cases:
\bool_if:NTF \g_tzplot_BEGIN_cmd_bool
{ %% if AtBegin_true
- % define (tzCPSS) by path (WITH \l_tzplot_TEMP_opt_tl )
+ % define (tzCSPS) by path (WITH \l_tzplot_TEMP_opt_tl )
\exp_last_unbraced:Nf
\path
\l_tzplot_TEMP_opt_tl
@@ -4639,6 +4682,7 @@ fpu, % for computation for \tzpicangle
;
\path (current~subpath~start) coordinate (tzCSPS) ;
% all together (important)
+ \tl_clear:N \l_tmpa_tl % (2022/08/31 ndh)
\tl_put_right:No \l_tmpa_tl { \g_tzplot_BEGIN_cmd_tl }
\tl_put_right:Nn \l_tmpa_tl { (tzCSPS) -- }
\tl_put_right:No \l_tmpa_tl { \l_tzplot_plot_coordinates_tl } % important
@@ -4865,7 +4909,7 @@ fpu, % for computation for \tzpicangle
%% final action cases:
\bool_if:NTF \g_tzplotcurve_BEGIN_cmd_bool
{ %% if AtBegin_true
- % define (tzCPSS) by path (WITH \l_tzplotcurve_TEMP_opt_tl )
+ % define (tzCSPS) by path (WITH \l_tzplotcurve_TEMP_opt_tl )
\exp_last_unbraced:Nf
\path
\l_tzplotcurve_TEMP_opt_tl
@@ -4874,6 +4918,7 @@ fpu, % for computation for \tzpicangle
;
\path (current~subpath~start) coordinate (tzCSPS) ;
% all together (important)
+ \tl_clear:N \l_tmpa_tl % (2022/08/31 ndh)
\tl_put_right:No \l_tmpa_tl { \g_tzplotcurve_BEGIN_cmd_tl }
\tl_put_right:Nn \l_tmpa_tl { (tzCSPS) -- }
\tl_put_right:No \l_tmpa_tl { \l_tzplotcurve_plot_coordinates_tl } % important
@@ -6575,22 +6620,83 @@ fpu, % for computation for \tzpicangle
%%% \tzaxes
-\NewDocumentCommand\tzaxes{ s O{} D<>{0,0} r() d() +G{} O{} +G{} O{} }
+\NewDocumentCommand\tzaxes{ s O{} D<>{0,0} D""{axes} }
{
- \IfNoValueTF { #5 }
+ \tl_clear:N \l_tzaxes_opt_tl
+ \tl_clear:N \l_tzaxes_x_cmd_tl
+ \tl_clear:N \l_tzaxes_y_cmd_tl
+ \tl_clear:N \l_tzaxes_path_cmd_tl
+ \tl_clear:N \l_tzaxes_name_path_tl
+ \tl_clear:N \l_tzaxes_shift_coor_tl
+
+ \IfBooleanTF { #1 }
+ { \bool_set_true:N \l_tmpa_bool }
+ { \bool_set_false:N \l_tmpa_bool }
+
+ \tl_set:Nn \l_tzaxes_opt_tl { [ -> , #2 ] }
+
+ \tl_set:Nn \l_tzaxes_name_path_tl { #4 }
+ \tl_set:Nn \l_tzaxes_shift_coor_tl { #3 }
+
+ \tzaxes_check_token:n
+}
+
+\cs_new:Npn \tzaxes_check_token:n #1
+{
+ \str_if_eq:nnT { #1 } { ( }
+ { \tzaxes_final_actions ( }
+}
+
+\NewDocumentCommand\tzaxes_final_actions{ r() d() +G{} O{} +G{} O{} }
+{
+ \IfNoValueTF { #2 }
{
- \draw [ -> , #2 ]
- ( 0,0 |- #3 ) -- ( #4 |- #3 ) node [ right , #7 ] { #6 } ;
- \draw [ -> , #2 ]
- ( #3 |- 0,0 ) -- ( #3 |- #4 ) node [ above , #9 ] { #8 } ;
+ \tl_set:Nx \l_tzaxes_x_cmd_tl
+ {
+ ( 0,0 |- {\l_tzaxes_shift_coor_tl} ) -- ( #1 |- {\l_tzaxes_shift_coor_tl} )
+ node [ right , \exp_not:n { #4 } ] { \exp_not:n { #3 } }
+ }
+ \tl_set:Nx \l_tzaxes_y_cmd_tl
+ {
+ ( {\l_tzaxes_shift_coor_tl} |- 0,0 ) -- ( {\l_tzaxes_shift_coor_tl} |- #1 )
+ node [ above , \exp_not:n { #6 } ] { \exp_not:n { #5 } }
+ }
+ \tl_set:Nx \l_tzaxes_path_cmd_tl
+ {
+ ( 0,0 |- {\l_tzaxes_shift_coor_tl} ) -- ( #1 |- {\l_tzaxes_shift_coor_tl} )
+ ( {\l_tzaxes_shift_coor_tl} |- 0,0 )
+ -- ( {\l_tzaxes_shift_coor_tl} |- \exp_not:n { #1 } )
+ }
}
{
- \draw [ -> , #2 ]
- ( #4 |- #3 ) -- ( #5 |- #3 ) node [ right , #7 ] { #6 } ;
- \draw [ -> , #2 ]
- ( #3 |- #4 ) -- ( #3 |- #5 ) node [ above , #9 ] { #8 } ;
+ \tl_set:Nx \l_tzaxes_x_cmd_tl
+ {
+ ( #1 |- {\l_tzaxes_shift_coor_tl} ) -- ( #2 |- {\l_tzaxes_shift_coor_tl} )
+ node [ right , \exp_not:n { #4 } ] { \exp_not:n { #3 } }
+ }
+ \tl_set:Nx \l_tzaxes_y_cmd_tl
+ {
+ ( {\l_tzaxes_shift_coor_tl} |- #1 ) -- ( {\l_tzaxes_shift_coor_tl} |- #2 )
+ node [ above , \exp_not:n { #6 } ] { \exp_not:n { #5 } }
+ }
+ \tl_set:Nx \l_tzaxes_path_cmd_tl
+ {
+ ( #1 |- {\l_tzaxes_shift_coor_tl} ) -- ( #2 |- {\l_tzaxes_shift_coor_tl} )
+ ( {\l_tzaxes_shift_coor_tl} |- #1 ) -- ( {\l_tzaxes_shift_coor_tl} |- #2 )
+ }
}
- \IfBooleanT { #1 }
+
+ \tl_put_left:No \l_tzaxes_x_cmd_tl { \l_tzaxes_opt_tl }
+ \tl_put_left:No \l_tzaxes_y_cmd_tl { \l_tzaxes_opt_tl }
+ \tl_put_left:No \l_tzaxes_path_cmd_tl
+ { [ name~path = \l_tzaxes_name_path_tl ] }
+
+ % final actions
+ \exp_last_unbraced:Nf \draw \l_tzaxes_x_cmd_tl ;
+ \exp_last_unbraced:Nf \draw \l_tzaxes_y_cmd_tl ;
+ \exp_last_unbraced:Nf \path \l_tzaxes_path_cmd_tl ;
+
+ \bool_if:NT \l_tmpa_bool
{
\coordinate (bbxOpposite) at (current~bounding~box.north~east) ;
\coordinate (bbxOrigin) at (current~bounding~box.south~west) ;
@@ -6598,72 +6704,190 @@ fpu, % for computation for \tzpicangle
}
}
+%%% -- end of \tzaxes
+
%%% \tzaxesL -- simpler version of \tzaxes
-\NewDocumentCommand\tzaxesL{ t' O{} d<> r() r() +G{} O{} +G{} O{} }
+\bool_new:N \l_tzaxesL_shift_coor_bool
+
+\NewDocumentCommand\tzaxesL{ t' O{} d<> D""{axesL}}
{
+ \tl_clear:N \l_tzaxesL_opt_tl
+ \tl_clear:N \l_tzaxesL_x_cmd_tl
+ \tl_clear:N \l_tzaxesL_y_cmd_tl
+ \tl_clear:N \l_tzaxesL_path_cmd_tl
+ \tl_clear:N \l_tzaxesL_name_path_tl
+ \tl_clear:N \l_tzaxesL_shift_coor_tl
+
\IfBooleanTF { #1 }
+ { \bool_set_true:N \l_tmpa_bool }
+ { \bool_set_false:N \l_tmpa_bool }
+
+ \tl_set:Nn \l_tzaxesL_opt_tl { [ #2 ] }
+
+ \tl_set:Nn \l_tzaxesL_name_path_tl { #4 }
+
+ \IfValueTF { #3 }
{
- \draw [ #2 ]
- \IfValueTF { #3 }
+ \tl_set:Nn \l_tzaxesL_shift_coor_tl { #3 }
+ \bool_set_true:N \l_tzaxesL_shift_coor_bool
+ }
+ {
+ \tl_clear:N \l_tzaxesL_shift_coor_tl
+ \bool_set_false:N \l_tzaxesL_shift_coor_bool
+ }
+
+ \tzaxesL_check_token:n
+}
+
+\cs_new:Npn \tzaxesL_check_token:n #1
+{
+ \str_if_eq:nnT { #1 } { ( }
+ { \tzaxesL_final_actions ( }
+}
+
+\NewDocumentCommand\tzaxesL_final_actions{ r() r() +G{} O{} +G{} O{} }
+{
+ \bool_if:NTF \l_tmpa_bool
+ { %% swap version
+ % x-axis
+ \bool_if:NTF \l_tzaxesL_shift_coor_bool
+ {
+ \tl_set:Nx \l_tzaxesL_x_cmd_tl
+ {
+ ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #2 )
+ -- ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #1 |- #2 )
+ node [ left , \exp_not:n { #4 } ] { \exp_not:n { #3 } }
+ }
+ }
+ {
+ \tl_set:Nn \l_tzaxesL_x_cmd_tl
{
- ( [shift={(#3)}]#5 ) -- ( [shift={(#3)}]#4 |- #5 )
+ ( #2 ) -- ( #1 |- #2 )
+ node [ left , #4 ] { #3 }
}
+ }
+ % y-axis
+ \bool_if:NTF \l_tzaxesL_shift_coor_bool
+ {
+ \tl_set:Nx \l_tzaxesL_y_cmd_tl
{
- ( #5 ) -- ( #4 |- #5 )
+ ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #2 )
+ -- ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #2 |- #1 )
+ node [ below , \exp_not:n { #6 } ] { \exp_not:n { #5 } }
}
- node [ left , #7 ] { #6 } ;
- \draw [ #2 ]
- \IfValueTF { #3 }
+ }
+ {
+ \tl_set:Nn \l_tzaxesL_y_cmd_tl
+ {
+ ( #2 ) -- ( #2 |- #1 )
+ node [ below , #6] { #5 }
+ }
+ }
+ % for path only
+ \bool_if:NTF \l_tzaxesL_shift_coor_bool
+ {
+ \tl_set:Nx \l_tzaxesL_path_cmd_tl
{
- ( [shift={(#3)}]#5 ) -- ( [shift={(#3)}]#5 |- #4 )
+ ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #2 )
+ -- ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #1 |- #2 )
+ ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #2 )
+ -- ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #2 |- #1 )
}
+ }
+ {
+ \tl_set:Nn \l_tzaxesL_path_cmd_tl
{
- ( #5 ) -- ( #5 |- #4 )
+ ( #2 ) -- ( #1 |- #2 )
+ ( #2 ) -- ( #2 |- #1 )
}
- node [ below , #9 ] { #8 } ;
+ }
}
- {
- \draw [ #2 ]
- \IfValueTF { #3 }
+ { %% standard version
+ % x-axis
+ \bool_if:NTF \l_tzaxesL_shift_coor_bool
+ {
+ \tl_set:Nx \l_tzaxesL_x_cmd_tl
{
- ( [shift={(#3)}]#4 ) -- ( [shift={(#3)}]#5 |- #4 )
+ ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #1 )
+ -- ( [shift = {(\l_tzaxesL_shift_coor_tl) } ] #2 |- #1 )
+ node [ right , \exp_not:n { #4 } ] { \exp_not:n { #3 } }
}
+ }
+ {
+ \tl_set:Nn \l_tzaxesL_x_cmd_tl
+ {
+ ( #1 ) -- ( #2 |- #1 )
+ node [ right , #4 ] { #3 }
+ }
+ }
+ % y-axis
+ \bool_if:NTF \l_tzaxesL_shift_coor_bool
+ {
+ \tl_set:Nx \l_tzaxesL_y_cmd_tl
{
- ( #4 ) -- ( #5 |- #4 )
+ ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #1 )
+ -- ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #1 |- #2 )
+ node [ above , \exp_not:n { #6 } ] { \exp_not:n { #5 } }
}
- node [ right , #7 ] { #6 } ;
- \draw [ #2 ]
- \IfValueTF { #3 }
+ }
+ {
+ \tl_set:Nn \l_tzaxesL_y_cmd_tl
+ {
+ ( #1 ) -- ( #1 |- #2 )
+ node [ above , #6 ] { #5 }
+ }
+ }
+ % path only
+ \bool_if:NTF \l_tzaxesL_shift_coor_bool
+ {
+ \tl_set:Nx \l_tzaxesL_path_cmd_tl
{
- ( [shift={(#3)}]#4 ) -- ( [shift={(#3)}]#4 |- #5 )
+ ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #1 )
+ -- ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #2 |- #1 )
+ ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #1 )
+ -- ( [ shift = { (\l_tzaxesL_shift_coor_tl) } ] #1 |- #2 )
}
+ }
+ {
+ \tl_set:Nn \l_tzaxesL_path_cmd_tl
{
- ( #4 ) -- ( #4 |- #5 )
+ ( #1 ) -- ( #2 |- #1 )
+ ( #1 ) -- ( #1 |- #2 )
}
- node [ above , #9 ] { #8 } ;
+ }
}
+ % combining options and command tokens
+ \tl_put_left:No \l_tzaxesL_x_cmd_tl { \l_tzaxesL_opt_tl }
+ \tl_put_left:No \l_tzaxesL_y_cmd_tl { \l_tzaxesL_opt_tl }
+ \tl_put_left:No \l_tzaxesL_path_cmd_tl
+ { [ name~path = \l_tzaxesL_name_path_tl ] }
+ % final actions
+ \exp_last_unbraced:Nf \draw \l_tzaxesL_x_cmd_tl ;
+ \exp_last_unbraced:Nf \draw \l_tzaxesL_y_cmd_tl ;
+ \exp_last_unbraced:Nf \path \l_tzaxesL_path_cmd_tl ;
}
%%% -- end of \tzaxesL
+
%%% \tzaxisx
-\NewDocumentCommand\tzaxisx{ s O{} D<>{0} m m G{} O{} }
+\NewDocumentCommand\tzaxisx{ s O{} D<>{0} D""{axisx} m m G{} O{} }
{
- \draw [ -> , #2 ]
- ( #4 , #3 ) -- ( #5 , #3 ) node [ right , #7 ] { #6 } ;
+ \draw [ -> , name~path = #4 , #2 ]
+ ( #5 , #3 ) -- ( #6 , #3 ) node [ right , #8 ] { #7 } ;
}
%%% \tzaxisy
-\NewDocumentCommand\tzaxisy{ s O{} D<>{0} m m G{} O{} }
+\NewDocumentCommand\tzaxisy{ s O{} D<>{0} D""{axisy} m m G{} O{} }
{
- \draw [ -> , #2 ]
- ( #3 , #4 ) -- ( #3 , #5 ) node [ above , #7 ] { #6 } ;
+ \draw [ -> , name~path = #4 , #2 ]
+ ( #3 , #5 ) -- ( #3 , #6 ) node [ above , #8 ] { #7 } ;
}
@@ -7392,8 +7616,6 @@ fpu, % for computation for \tzpicangle
-
-
%%% \tznodeframe
\NewDocumentCommand\tznodeframe
@@ -7554,7 +7776,8 @@ fpu, % for computation for \tzpicangle
}
}
- \tzsecantat_sub_fn:n
+% \tzsecantat_sub_fn:n
+ \tzsecantat_final_actions
}
\NewDocumentCommand\tzsecantat_domain_process{ m m }
@@ -7563,10 +7786,10 @@ fpu, % for computation for \tzpicangle
\def\tzsecantatToVal{#2}
}
-\cs_new:Npn \tzsecantat_sub_fn:n
-{
- \tzsecantat_final_actions
-}
+%\cs_new:Npn \tzsecantat_sub_fn:n
+%{
+% \tzsecantat_final_actions
+%}
\NewDocumentCommand\tzsecantat_final_actions { +G{} O{} D<>{} }
{
@@ -7652,7 +7875,8 @@ fpu, % for computation for \tzpicangle
}
}
- \tzsecant_sub_fn:n
+% \tzsecant_sub_fn:n
+ \tzsecant_final_actions
}
\NewDocumentCommand\tzsecant_domain_process{ m m }
@@ -7661,10 +7885,10 @@ fpu, % for computation for \tzpicangle
\def\tzsecantToVal{#2}
}
-\cs_new:Npn \tzsecant_sub_fn:n
-{
- \tzsecant_final_actions
-}
+%\cs_new:Npn \tzsecant_sub_fn:n
+%{
+% \tzsecant_final_actions
+%}
\NewDocumentCommand\tzsecant_final_actions { +G{} O{} D<>{} }
{
@@ -7719,31 +7943,31 @@ fpu, % for computation for \tzpicangle
%%% \tzslopeat (main)
\NewDocumentCommand\tzslopeat
- { O{} m m
+ { t' O{} m m
>{ \SplitArgument { 1 } { , } } d()
- m O{0} +G{} O{} D<>{}
+ m O{0} % +G{} O{} D<>{}
}
{
% to resolve discrepancy (due to bounding box), when repeated
\bool_if:nTF
{
- \str_if_eq_p:ee { \TANCurve } { #2 } &&
- \str_if_eq_p:ee { \TANWhere } { #3 }
+ \str_if_eq_p:ee { \TANCurve } { #3 } &&
+ \str_if_eq_p:ee { \TANWhere } { #4 }
}
{ \bool_set_true:N \l_tzslopeat_bbox_bool }
{ \bool_set_false:N \l_tzslopeat_bbox_bool }
% for local change of epsilon_1, epsilon_2
- \IfValueT { #4 }
+ \IfValueT { #5 }
{
- \tzslopeat_epsilon_process #4
+ \tzslopeat_epsilon_process #5
\renewcommand\tzslopeepsilonL{\tzslopeatEpsilonOne}
\renewcommand\tzslopeepsilonR{\tzslopeatEpsilonTwo}
}
% getting ready
- \coordinate (LXcoor) at ($(#3,0)-(\tzslopeepsilonL,0)$) ;
- \coordinate (RXcoor) at ($(#3,0)+(\tzslopeepsilonR,0)$) ;
+ \coordinate (LXcoor) at ($(#4,0)-(\tzslopeepsilonL,0)$) ;
+ \coordinate (RXcoor) at ($(#4,0)+(\tzslopeepsilonR,0)$) ;
\bool_if:NTF \l_tzslopeat_bbox_bool
{
@@ -7759,14 +7983,14 @@ fpu, % for computation for \tzpicangle
}
% find vertical X points
- \path [ name~path = C-vline ] (#3,0 |- bbxBottom) -- (#3,0 |- bbxTop) ;
- \path [ name~intersections = { of = #2 ~ and ~ C-vline , name = TANp } ] ;
+ \path [ name~path = C-vline ] (#4,0 |- bbxBottom) -- (#4,0 |- bbxTop) ;
+ \path [ name~intersections = { of = #3 ~ and ~ C-vline , name = TANp } ] ;
\path [ name~path = L-vline ] (LXcoor |- bbxBottom) -- (LXcoor |- bbxTop) ;
- \path [ name~intersections = { of = #2 ~ and ~ L-vline , name = LXcut } ] ;
+ \path [ name~intersections = { of = #3 ~ and ~ L-vline , name = LXcut } ] ;
\path [ name~path = R-vline ] (RXcoor |- bbxBottom) -- (RXcoor |- bbxTop) ;
- \path [ name~intersections = { of = #2 ~ and ~ R-vline , name = RXcut } ] ;
+ \path [ name~intersections = { of = #3 ~ and ~ R-vline , name = RXcut } ] ;
% move to tangent point
\coordinate (tzXproj)
@@ -7777,32 +8001,42 @@ fpu, % for computation for \tzpicangle
at ($(RXcut-1)+(TANp-1)-(tzXproj)$); % move
% determine final extended points
- \tl_set:Nx \l_label_pos_tl
+ \tl_set:Nx \l_tmpa_tl
{
- (RRpoint) -- (TANp-1) --
- ([turn]#6 \c_colon_str #5/2 ) coordinate (final-LL)
+ \IfBooleanTF { #1 }
+ {
+ (RRpoint) -- (TANp-1) --
+ ([turn]-180 \c_colon_str #6/2 ) coordinate (final-LL)
+ }
+ {
+ (RRpoint) -- (TANp-1) --
+ ([turn]#7 \c_colon_str #6/2 ) coordinate (final-LL)
+ }
}
\tl_set:Nx \l_tmpb_tl
{
- (LLpoint) -- (TANp-1) --
- ([turn]#6 \c_colon_str #5/2 ) coordinate (final-RR)
+ \IfBooleanTF { #1 }
+ {
+ (LLpoint) -- (TANp-1) --
+ ([turn]-180 \c_colon_str #6/2 ) coordinate (final-RR)
+ }
+ {
+ (LLpoint) -- (TANp-1) --
+ ([turn]#7 \c_colon_str #6/2 ) coordinate (final-RR)
+ }
}
- \exp_last_unbraced:Nf \path \l_label_pos_tl ;
+ \exp_last_unbraced:Nf \path \l_tmpa_tl ;
\exp_last_unbraced:Nf \path \l_tmpb_tl ;
\tl_set:Nn \l_tzslopeat_cmd_tl
{
- [ #1 ] (final-LL) -- (final-RR)
+ [ #2 ] (final-LL) -- (final-RR)
}
- \gdef\TANCurve{#2}\gdef\TANWhere{#3}
-
- \begin{pgfonlayer}{\tzslopelayer}
- \exp_last_unbraced:Nf \draw \l_tzslopeat_cmd_tl node [ #8 ] { #7 } #9 ;
- \end{pgfonlayer}
- % to resolve TikZ issue: unknown path name with layer group
- \exp_last_unbraced:Nf \path \l_tzslopeat_cmd_tl ;
+ \gdef\TANCurve{#3}\gdef\TANWhere{#4}
+
+ \tzslopeat_final_actions
}
\NewDocumentCommand\tzslopeat_epsilon_process{ m m }
@@ -7811,6 +8045,17 @@ fpu, % for computation for \tzpicangle
\def\tzslopeatEpsilonTwo{#2}
}
+\NewDocumentCommand\tzslopeat_final_actions{ +G{} O{} D<>{} }
+{
+ % final action
+ \begin{pgfonlayer}{\tzslopelayer}
+ \exp_last_unbraced:Nf \draw \l_tzslopeat_cmd_tl node [ #2 ] { #1 } #3 ;
+ \end{pgfonlayer}
+ % to resolve TikZ issue: unknown path name with layer group
+ \exp_last_unbraced:Nf \path \l_tzslopeat_cmd_tl ;
+
+}
+
%%% --- end of \tzslopeat
@@ -7820,31 +8065,31 @@ fpu, % for computation for \tzpicangle
%%% \tzslope (main)
\NewDocumentCommand\tzslope
- { O{} m r()
+ { t' O{} m r()
>{ \SplitArgument { 1 } { , } } d()
- m O{0} +G{} O{} D<>{}
+ m O{0} % +G{} O{} D<>{}
}
{
% to resolve discrepancy (due to bounding box), when repeated
\bool_if:nTF
{
- \str_if_eq_p:ee { \TANCurve } { #2 } &&
- \str_if_eq_p:ee { \TANWhere } { #3 }
+ \str_if_eq_p:ee { \TANCurve } { #3 } &&
+ \str_if_eq_p:ee { \TANWhere } { #4 }
}
{ \bool_set_true:N \l_tzslope_bbox_bool }
{ \bool_set_false:N \l_tzslope_bbox_bool }
% for local change of epsilon_1, epsilon_2
- \IfValueT { #4 }
+ \IfValueT { #5 }
{
- \tzslope_epsilon_process #4
+ \tzslope_epsilon_process #5
\renewcommand\tzslopeepsilonL{\tzslopeEpsilonOne}
\renewcommand\tzslopeepsilonR{\tzslopeEpsilonTwo}
}
% getting ready
- \coordinate (LXcoor) at ($(#3)-(\tzslopeepsilonL,0)$) ;
- \coordinate (RXcoor) at ($(#3)+(\tzslopeepsilonR,0)$) ;
+ \coordinate (LXcoor) at ($(#4)-(\tzslopeepsilonL,0)$) ;
+ \coordinate (RXcoor) at ($(#4)+(\tzslopeepsilonR,0)$) ;
\bool_if:NTF \l_tzslope_bbox_bool
{
@@ -7860,14 +8105,14 @@ fpu, % for computation for \tzpicangle
}
% find vertical X points
- \path [ name~path = C-vline ] (#3,0 |- bbxBottom) -- (#3,0 |- bbxTop) ;
- \path [ name~intersections = { of = #2 ~ and ~ C-vline , name = TANp } ] ;
+ \path [ name~path = C-vline ] (#4 |- bbxBottom) -- (#4 |- bbxTop) ;
+ \path [ name~intersections = { of = #3 ~ and ~ C-vline , name = TANp } ] ;
\path [ name~path = L-vline ] (LXcoor |- bbxBottom) -- (LXcoor |- bbxTop) ;
- \path [ name~intersections = { of = #2 ~ and ~ L-vline , name = LXcut } ] ;
+ \path [ name~intersections = { of = #3 ~ and ~ L-vline , name = LXcut } ] ;
\path [ name~path = R-vline ] (RXcoor |- bbxBottom) -- (RXcoor |- bbxTop) ;
- \path [ name~intersections = { of = #2 ~ and ~ R-vline , name = RXcut } ] ;
+ \path [ name~intersections = { of = #3 ~ and ~ R-vline , name = RXcut } ] ;
% move to tangent point
\coordinate (tzXproj)
@@ -7878,32 +8123,42 @@ fpu, % for computation for \tzpicangle
at ($(RXcut-1)+(TANp-1)-(tzXproj)$); % move
% determine final extended points
- \tl_set:Nx \l_label_pos_tl
+ \tl_set:Nx \l_tmpa_tl
{
- (RRpoint) -- (TANp-1) --
- ([turn]#6 \c_colon_str #5/2 ) coordinate (final-LL)
+ \IfBooleanTF { #1 }
+ {
+ (RRpoint) -- (TANp-1) --
+ ([turn]-180 \c_colon_str #6/2 ) coordinate (final-LL)
+ }
+ {
+ (RRpoint) -- (TANp-1) --
+ ([turn]#7 \c_colon_str #6/2 ) coordinate (final-LL)
+ }
}
\tl_set:Nx \l_tmpb_tl
{
- (LLpoint) -- (TANp-1) --
- ([turn]#6 \c_colon_str #5/2 ) coordinate (final-RR)
+ \IfBooleanTF { #1 }
+ {
+ (LLpoint) -- (TANp-1) --
+ ([turn]-180 \c_colon_str #6/2 ) coordinate (final-RR)
+ }
+ {
+ (LLpoint) -- (TANp-1) --
+ ([turn]#7 \c_colon_str #6/2 ) coordinate (final-RR)
+ }
}
- \exp_last_unbraced:Nf \path \l_label_pos_tl ;
+ \exp_last_unbraced:Nf \path \l_tmpa_tl ;
\exp_last_unbraced:Nf \path \l_tmpb_tl ;
\tl_set:Nn \l_tzslope_cmd_tl
{
- [ #1 ] (final-LL) -- (final-RR)
+ [ #2 ] (final-LL) -- (final-RR)
}
- \gdef\TANCurve{#2}\gdef\TANWhere{#3}
+ \gdef\TANCurve{#3}\gdef\TANWhere{#4}
- \begin{pgfonlayer}{\tzslopelayer}
- \exp_last_unbraced:Nf \draw \l_tzslope_cmd_tl node [ #8 ] { #7 } #9 ;
- \end{pgfonlayer}
- % to resolve TikZ issue: unknown path name with layer group
- \exp_last_unbraced:Nf \path \l_tzslope_cmd_tl ;
+ \tzslope_final_actions
}
\NewDocumentCommand\tzslope_epsilon_process{ m m }
@@ -7912,10 +8167,318 @@ fpu, % for computation for \tzpicangle
\def\tzslopeEpsilonTwo{#2}
}
+\NewDocumentCommand\tzslope_final_actions{ +G{} O{} D<>{} }
+{
+ % final action
+ \begin{pgfonlayer}{\tzslopelayer}
+ \exp_last_unbraced:Nf \draw \l_tzslope_cmd_tl node [ #2 ] { #1 } #3 ;
+ \end{pgfonlayer}
+ % to resolve TikZ issue: unknown path name with layer group
+ \exp_last_unbraced:Nf \path \l_tzslope_cmd_tl ;
+}
+
%%% --- end of \tzslope
+%%%%% Normal lines
+%% No <shift coor>
+%% No <shift coor>
+%% No <shift coor>
+
+%%% \tznormalat
+%% -- normal line at x
+
+\bool_new:N \l_tznormalat_bbox_bool
+
+%%% \tznormalat (main)
+\NewDocumentCommand\tznormalat
+ { s t' O{} m m
+ >{ \SplitArgument { 1 } { , } } d()
+ m O{90} % +G{} O{} D<>{}
+ }
+{
+ % to resolve discrepancy (due to bounding box), when repeated
+ \bool_if:nTF
+ {
+ \str_if_eq_p:ee { \TANCurve } { #4 } &&
+ \str_if_eq_p:ee { \TANWhere } { #5 }
+ }
+ { \bool_set_true:N \l_tznormalat_bbox_bool }
+ { \bool_set_false:N \l_tznormalat_bbox_bool }
+
+ % for local change of epsilon_1, epsilon_2
+ \IfValueT { #6 }
+ {
+ \tznormalat_epsilon_process #6
+ \renewcommand\tznormalepsilonL{\tznormalatEpsilonOne}
+ \renewcommand\tznormalepsilonR{\tznormalatEpsilonTwo}
+ }
+
+ % getting ready
+ \coordinate (LXcoor) at ($(#5,0)-(\tznormalepsilonL,0)$) ;
+ \coordinate (RXcoor) at ($(#5,0)+(\tznormalepsilonR,0)$) ;
+
+ \bool_if:NTF \l_tznormalat_bbox_bool
+ {
+ \IfNodeDefined{bbxBottom}{}
+ {
+ \coordinate (bbxTop) at (current~bounding~box.north) ;
+ \coordinate (bbxBottom) at (current~bounding~box.south) ;
+ }
+ }
+ {
+ \coordinate (bbxTop) at (current~bounding~box.north) ;
+ \coordinate (bbxBottom) at (current~bounding~box.south) ;
+ }
+
+ % find vertical X points
+ \path [ name~path = C-vline ] (#5,0 |- bbxBottom) -- (#5,0 |- bbxTop) ;
+ \path [ name~intersections = { of = #4 ~ and ~ C-vline , name = TANp } ] ;
+
+ \path [ name~path = L-vline ] (LXcoor |- bbxBottom) -- (LXcoor |- bbxTop) ;
+ \path [ name~intersections = { of = #4 ~ and ~ L-vline , name = LXcut } ] ;
+
+ \path [ name~path = R-vline ] (RXcoor |- bbxBottom) -- (RXcoor |- bbxTop) ;
+ \path [ name~intersections = { of = #4 ~ and ~ R-vline , name = RXcut } ] ;
+
+ % move to tangent point
+ \coordinate (tzXproj)
+ at ($(LXcut-1)!(TANp-1)!(RXcut-1)$); % projection
+ \coordinate (LLpoint)
+ at ($(LXcut-1)+(TANp-1)-(tzXproj)$); % move
+ \coordinate (RRpoint)
+ at ($(RXcut-1)+(TANp-1)-(tzXproj)$); % move
+
+ % determine final extended points
+ % from (final-LL)
+ \tl_set:Nx \l_tmpa_tl
+ {
+ \IfBooleanTF { #1 }
+ {
+ \IfBooleanTF { #2 }
+ {
+ (RRpoint) -- (TANp-1) --
+ ([turn]-90 \c_colon_str #7/2 ) coordinate (final-LL)
+ }
+ {
+ (RRpoint) -- (TANp-1) --
+ ([turn]#8 \c_colon_str #7/2 ) coordinate (final-LL)
+ }
+ }
+ {
+ (TANp-1) coordinate (final-LL)
+ }
+ }
+ % to (final-RR)
+ \tl_set:Nx \l_tmpb_tl
+ {
+ \IfBooleanTF { #1 }
+ { % starred : slope
+ \IfBooleanTF { #2 }
+ { % opposite direction (swap)
+ (LLpoint) -- (TANp-1) --
+ ([turn]-90 \c_colon_str #7/2 ) coordinate (final-RR)
+ }
+ {
+ (LLpoint) -- (TANp-1) --
+ ([turn]#8 \c_colon_str #7/2 ) coordinate (final-RR)
+ }
+ }
+ { % standard : normal
+ {
+ \IfBooleanTF { #2 }
+ { % opposite direction (swap)
+ (LLpoint) -- (TANp-1) --
+ ([turn]-90 \c_colon_str #7/2 ) coordinate (final-RR)
+ }
+ { % standard normal
+ (LLpoint) -- (TANp-1) --
+ ([turn]#8 \c_colon_str #7/2 ) coordinate (final-RR)
+ }
+ }
+ }
+ }
+
+ \exp_last_unbraced:Nf \path \l_tmpa_tl ;
+ \exp_last_unbraced:Nf \path \l_tmpb_tl ;
+
+ \tl_set:Nn \l_tznormalat_cmd_tl
+ {
+ [ #3 ] (final-LL) -- (final-RR)
+ }
+
+ \gdef\TANCurve{#4}\gdef\TANWhere{#5}
+
+ \tznormalat_final_actions
+}
+
+\NewDocumentCommand\tznormalat_epsilon_process{ m m }
+{
+ \def\tznormalatEpsilonOne{#1}
+ \def\tznormalatEpsilonTwo{#2}
+}
+
+\NewDocumentCommand\tznormalat_final_actions{ +G{} O{} D<>{} }
+{
+ % final action
+ \begin{pgfonlayer}{\tznormallayer}
+ \exp_last_unbraced:Nf \draw \l_tznormalat_cmd_tl node [ #2 ] { #1 } #3 ;
+ \end{pgfonlayer}
+ % to resolve TikZ issue: unknown path name with layer group
+ \exp_last_unbraced:Nf \path \l_tznormalat_cmd_tl ;
+}
+
+%%% --- end of \tznormalat
+
+
+%%% \tznormal (On) -- normal line at (x,y)
+
+\bool_new:N \l_tznormal_bbox_bool
+
+%%% \tznormal (main)
+\NewDocumentCommand\tznormal
+ { s t' O{} m r()
+ >{ \SplitArgument { 1 } { , } } d()
+ m O{90} % +G{} O{} D<>{}
+ }
+{
+ % to resolve discrepancy (due to bounding box), when repeated
+ \bool_if:nTF
+ {
+ \str_if_eq_p:ee { \TANCurve } { #4 } &&
+ \str_if_eq_p:ee { \TANWhere } { #5 }
+ }
+ { \bool_set_true:N \l_tznormal_bbox_bool }
+ { \bool_set_false:N \l_tznormal_bbox_bool }
+
+ % for local change of epsilon_1, epsilon_2
+ \IfValueT { #6 }
+ {
+ \tznormal_epsilon_process #6
+ \renewcommand\tznormalepsilonL{\tznormalEpsilonOne}
+ \renewcommand\tznormalepsilonR{\tznormalEpsilonTwo}
+ }
+
+ % getting ready
+ \coordinate (LXcoor) at ($(#5)-(\tznormalepsilonL,0)$) ;
+ \coordinate (RXcoor) at ($(#5)+(\tznormalepsilonR,0)$) ;
+
+ \bool_if:NTF \l_tznormal_bbox_bool
+ {
+ \IfNodeDefined{bbxBottom}{}
+ {
+ \coordinate (bbxTop) at (current~bounding~box.north) ;
+ \coordinate (bbxBottom) at (current~bounding~box.south) ;
+ }
+ }
+ {
+ \coordinate (bbxTop) at (current~bounding~box.north) ;
+ \coordinate (bbxBottom) at (current~bounding~box.south) ;
+ }
+
+ % find vertical X points
+ \path [ name~path = C-vline ] (#5 |- bbxBottom) -- (#5 |- bbxTop) ;
+ \path [ name~intersections = { of = #4 ~ and ~ C-vline , name = TANp } ] ;
+
+ \path [ name~path = L-vline ] (LXcoor |- bbxBottom) -- (LXcoor |- bbxTop) ;
+ \path [ name~intersections = { of = #4 ~ and ~ L-vline , name = LXcut } ] ;
+
+ \path [ name~path = R-vline ] (RXcoor |- bbxBottom) -- (RXcoor |- bbxTop) ;
+ \path [ name~intersections = { of = #4 ~ and ~ R-vline , name = RXcut } ] ;
+
+ % move to tangent point
+ \coordinate (tzXproj)
+ at ($(LXcut-1)!(TANp-1)!(RXcut-1)$); % projection
+ \coordinate (LLpoint)
+ at ($(LXcut-1)+(TANp-1)-(tzXproj)$); % move
+ \coordinate (RRpoint)
+ at ($(RXcut-1)+(TANp-1)-(tzXproj)$); % move
+
+ % determine final extended points
+ % from (final-LL)
+ \tl_set:Nx \l_tmpa_tl
+ {
+ \IfBooleanTF { #1 }
+ {
+ \IfBooleanTF { #2 }
+ {
+ (RRpoint) -- (TANp-1) --
+ ([turn]-90 \c_colon_str #7/2 ) coordinate (final-LL)
+ }
+ {
+ (RRpoint) -- (TANp-1) --
+ ([turn]#8 \c_colon_str #7/2 ) coordinate (final-LL)
+ }
+ }
+ {
+ (TANp-1) coordinate (final-LL)
+ }
+ }
+ % to (final-RR)
+ \tl_set:Nx \l_tmpb_tl
+ {
+ \IfBooleanTF { #1 }
+ { % starred : slope
+ \IfBooleanTF { #2 }
+ { % opposite direction (swap)
+ (LLpoint) -- (TANp-1) --
+ ([turn]-90 \c_colon_str #7/2 ) coordinate (final-RR)
+ }
+ {
+ (LLpoint) -- (TANp-1) --
+ ([turn]#8 \c_colon_str #7/2 ) coordinate (final-RR)
+ }
+ }
+ { % standard : normal
+ {
+ \IfBooleanTF { #2 }
+ { % opposite direction (swap)
+ (LLpoint) -- (TANp-1) --
+ ([turn]-90 \c_colon_str #7/2 ) coordinate (final-RR)
+ }
+ { % standard normal
+ (LLpoint) -- (TANp-1) --
+ ([turn]#8 \c_colon_str #7/2 ) coordinate (final-RR)
+ }
+ }
+ }
+ }
+
+ \exp_last_unbraced:Nf \path \l_tmpa_tl ;
+ \exp_last_unbraced:Nf \path \l_tmpb_tl ;
+
+ \tl_set:Nn \l_tznormal_cmd_tl
+ {
+ [ #3 ] (final-LL) -- (final-RR)
+ }
+
+ \gdef\TANCurve{#4}\gdef\TANWhere{#5}
+
+ \tznormal_final_actions
+}
+
+\NewDocumentCommand\tznormal_epsilon_process{ m m }
+{
+ \def\tznormalEpsilonOne{#1}
+ \def\tznormalEpsilonTwo{#2}
+}
+
+\NewDocumentCommand\tznormal_final_actions{ +G{} O{} D<>{} }
+{
+ % final action
+ \begin{pgfonlayer}{\tznormallayer}
+ \exp_last_unbraced:Nf \draw \l_tznormal_cmd_tl node [ #2 ] { #1 } #3 ;
+ \end{pgfonlayer}
+ % to resolve TikZ issue: unknown path name with layer group
+ \exp_last_unbraced:Nf \path \l_tznormal_cmd_tl ;
+}
+
+%%% --- end of \tznormal
+
+
+
+
%%%%% Tangent lines
%%% \tztangentat -- tangent to a path at x
@@ -8041,7 +8604,8 @@ fpu, % for computation for \tzpicangle
\gdef\TANCurve{#5}\gdef\TANWhere{#6}
- \tztangentat_sub_fn:n
+% \tztangentat_sub_fn:n
+ \tztangentat_final_actions
}
\NewDocumentCommand\tztangentat_epsilon_process{ m m }
@@ -8056,10 +8620,10 @@ fpu, % for computation for \tzpicangle
\def\tztangentatToVal{#2}
}
-\cs_new:Npn \tztangentat_sub_fn:n
-{
- \tztangentat_final_actions
-}
+%\cs_new:Npn \tztangentat_sub_fn:n
+%{
+% \tztangentat_final_actions
+%}
\NewDocumentCommand\tztangentat_final_actions { +G{} O{} D<>{} }
{
@@ -8192,7 +8756,8 @@ fpu, % for computation for \tzpicangle
\gdef\TANCurve{#5}\gdef\TANWhere{#6}
- \tztangent_sub_fn:n
+% \tztangent_sub_fn:n
+ \tztangent_final_actions
}
\NewDocumentCommand\tztangent_epsilon_process{ m m }
@@ -8207,10 +8772,10 @@ fpu, % for computation for \tzpicangle
\def\tztangentToVal{#2}
}
-\cs_new:Npn \tztangent_sub_fn:n
-{
- \tztangent_final_actions
-}
+%\cs_new:Npn \tztangent_sub_fn:n
+%{
+% \tztangent_final_actions
+%}
\NewDocumentCommand\tztangent_final_actions { +G{} O{} D<>{} }
{
@@ -8515,4 +9080,3 @@ fpu, % for computation for \tzpicangle
\endinput
-