summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.timer.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.timer.tex')
-rw-r--r--graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.timer.tex46
1 files changed, 10 insertions, 36 deletions
diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.timer.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.timer.tex
index d3670726d7..09049bf829 100644
--- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.timer.tex
+++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-paths.timer.tex
@@ -7,31 +7,11 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Free Documentation License.
%
-\makeatletter
-\newenvironment{pathoperation'}[3][]{
- \begin{pgfmanualentry}
- \def\pgfmanualtest{#1}%
- \pgfmanualentryheadline{%
- \ifx\pgfmanualtest\@empty%
- \pgfmanualpdflabel{#2}{}%
- \fi%
- %\textcolor{gray}{{\ttfamily\char`\\path}\ \ \dots}
- %\declare{\texttt{\noligs{#2}}}#3\ \textcolor{gray}{\dots\texttt{;}}
- }%
- \ifx\pgfmanualtest\@empty%
- \index{#2@\protect\texttt{#2} path operation}%
- \index{Path operations!#2@\protect\texttt{#2}}%
- \fi%
- \pgfmanualbody
-}
-{
- \end{pgfmanualentry}
-}
-\makeatother
+
\section{Extending the Path Timers}
\label{library:timer}
-\begin{tikzlibrary}{paths.timer}
+\begin{tikzlibrary}{ext.paths.timer}
This library adds timers to the path specifications |rectangle|, |parabola|, |sin| and |cos|.
\end{tikzlibrary}
@@ -43,15 +23,13 @@ the other paths, nodes, coordinates, pics, etc. are placed on the last coordinat
This library allows this.
\subsection{Rectangle}
-%\index{Path operations!\protect\texttt{rectangle}}%
-%\index{\texttt{rectangle} path operation}%
-\begin{pathoperation'}{rectangle}{}\end{pathoperation'}
+\indexPathOperationO{rectangle}
-For the |rectangle| path operator, the timer starts with |pos = 0| (= |at start|) from
+For the |rectangle| path operator, the timer starts with |pos = 0| (= |at start|) from\indexKeyO{pos}
the starting coordinate in a counter-clockwise direction along the rectangle.
The corners will be at positions 0.0, 0.25, 0.5, 0.75 and 1.0.
-\begin{codeexample}[width=10cm,preamble=\usetikzlibrary{paths.timer}]
+\begin{codeexample}[width=10cm,preamble=\usetikzlibrary{ext.paths.timer}]
\begin{tikzpicture}[scale=2, every pin edge/.style={latex-, gray}]
\coordinate [label=above right:Target] (A) at (0,0);
\coordinate [label=below left:Start] (B) at (1,2);
@@ -65,13 +43,12 @@ The corners will be at positions 0.0, 0.25, 0.5, 0.75 and 1.0.
\end{codeexample}
\subsection{Parabola}
-\index{Path operations!\protect\texttt{parabola}}%
-\index{\texttt{parabola} path operation}%
+\indexPathOperationO{parabola}%
For the |parabola| path operator the timer is similar to the |.. controls ..| operator.
The position 0.5 will lie at the |bend|.
-\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{paths.timer}]
+\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}]
\begin{tikzpicture}
\draw[help lines] (-2.25, -1.25) grid (2.25, 3.25);
\draw ( 2,-1) parabola bend (0,0) (-1,3);
@@ -86,7 +63,7 @@ The position 0.5 will lie at the |bend|.
If no |bend| is specified half the positions will collapse into one end of the curve.
-\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{paths.timer}]
+\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}]
\begin{tikzpicture}[every pin edge/.style={latex-, shorten <=1pt, gray}]
\draw (-2,-2) parabola (1,0)
foreach \pos in {0, 1, ..., 10} {
@@ -96,14 +73,11 @@ If no |bend| is specified half the positions will collapse into one end of the c
\end{codeexample}
\subsection{Sine/Cosine}
-\index{Path operations!\protect\texttt{sin}}%
-\index{Path operations!\protect\texttt{cos}}%
-\index{\texttt{sin} path operation}%
-\index{\texttt{cos} path operation}%
+\indexPathOperationO{sin}\indexPathOperationO{cos}%
The |sin| and |cos| path operators also allow placing of nodes along their paths.
-\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{paths.timer}]
+\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}]
\begin{tikzpicture}[mark nodes on line/.style={insert path={
foreach \pos in {1, ..., 9} {node[
sloped, fill=white, font=\small, inner sep=+0pt, pos=\pos/10] {\pos}}}}]