summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgf/text-en
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-08-08 22:54:29 +0000
committerKarl Berry <karl@freefriends.org>2015-08-08 22:54:29 +0000
commit531d43fafa269c546d587eaca6cd14adcd11914f (patch)
tree1883933af984c60254e6d9d1bd955a76748cb827 /Master/texmf-dist/doc/generic/pgf/text-en
parent877e963d44f039783cb9227d90c911866c780961 (diff)
pgf (8aug15)
git-svn-id: svn://tug.org/texlive/trunk@38079 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en')
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transformations.tex84
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-algorithm-layer.tex18
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-algorithms-in-c.tex25
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-circular.tex2
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-edge-routing.tex29
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-ogdf.tex5
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-overview.tex1
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-automata.tex2
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-babel.tex106
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-circuits.tex4
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-decorations.tex2
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-external.tex29
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-mindmaps.tex4
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main-body.tex7
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main-preamble.tex5
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-algorithms.tex47
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-numberprinting.tex15
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-parsing.tex187
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfkeys.tex6
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-coordinates.tex4
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-graphs.tex24
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-pics.tex2
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-plots.tex4
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-shapes.tex106
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transformations.tex2
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex6
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-xxcolor.tex2
27 files changed, 600 insertions, 128 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transformations.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transformations.tex
index 145463b7ffb..77d63178955 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transformations.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transformations.tex
@@ -477,6 +477,8 @@ these commands only if you really know what you are doing.
\end{codeexample}
\end{command}
+
+
\subsubsection{Saving and Restoring the Coordinate Transformation
Matrix}
@@ -495,14 +497,84 @@ transformation matrices.
saved using |\pgfgettransform|.
\end{command}
-\begin{command}{\pgfgettransformentries\marg{macro for a}\marg{macro for b}\marg{macro for c}\marg{macro for d}\marg{macro for shift x}\marg{macro for shift y}}
- This command is similar to |\pgfgettransform| except that it stores the current coordinate transformation matrix in a set of six macros.
+\begin{command}{\pgfgettransformentries\marg{macro for a}\marg{macro
+ for b}\marg{macro for c}\marg{macro for d}\marg{macro for shift
+ x}\marg{macro for shift y}}
+ This command is similar to |\pgfgettransform| except that it stores
+ the current coordinate transformation matrix in a set of six
+ macros.
- The matrix can later on be reinstalled using |\pgfsettransformentries|. Furthermore, all these macros (or just a few of them) can be used as arguments for |\pgftransformcm|.
+ The matrix can later on be reinstalled using
+ |\pgfsettransformentries|. Furthermore, all these macros (or just a
+ few of them) can be used as arguments for |\pgftransformcm|.
\end{command}
\begin{command}{\pgfsettransformentries\marg{a}\marg{b}\marg{c}\marg{d}\marg{shiftx}\marg{shifty}}
- Reinstalls a coordinate transformation matrix that was previously saved using the storage command |\pgfgettransformentries|. This command can also be used to replace any previously existing coordinate transformation matrix (it is thus equivalent to |\pgftransformreset| followed by |\pgftransformcm|).
+ Reinstalls a coordinate transformation matrix that was previously
+ saved using the storage command |\pgfgettransformentries|. This
+ command can also be used to replace any previously existing
+ coordinate transformation matrix (it is thus equivalent to
+ |\pgftransformreset| followed by |\pgftransformcm|).
+\end{command}
+
+
+
+\subsubsection{Computing Adjustments for Coordinate Transformations}
+\label{section-adjustment-transformations}
+
+\begin{command}{\pgftransformationadjustments}
+ This command computes ``adjustments'' for the current transformation
+ matrix so that even when you install a transformation matrix that
+ scales everything by a certain factor, you can still draw
+ something of ``an absolute size.'' Suppose for instance that you
+ install a transformation matrix that scales everything by a factor
+ of 4 and you now wish to draw a horizontal line of length 1cm. Then,
+ if you do not reset the transformation matrix, you can draw a line
+ of logical length 2.5mm, which will then get scaled to a line of
+ 1cm. Things get more difficult in case you scale things only, say,
+ vertically. In this case, the adjustement necessary for horizontal
+ lines is different from the one needed for vertical lines.
+
+ This function computes two scaling factors, one for horizontal lines
+ and one for vertical lines, and stores them in the following macros:
+ \begin{command}{\pgfhorizontaltransformationadjustment}
+ When you scale the length of a horizontal line by this factor in
+ the current transformation, you compensate for the
+ scaling. Formally, it is $1/\|\mathit{transform}(1,0)\|_2$, where
+ $\mathit{transform}$ applies the current transformations matrix to
+ the given number.
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \draw [help lines] (0,0) grid (2,2);
+ \begin{scope}[xscale=2,thick]
+ \draw [red] (1,1) -- ++(1,0);
+
+ \pgftransformationadjustments
+ \draw [blue] (1,0) -- ++(\pgfhorizontaltransformationadjustment,0);
+ \end{scope}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \draw [help lines] (0,0) grid (2,2);
+ \begin{scope}[xscale=2,thick,rotate=90]
+ \draw [red] (1,1) -- ++(1,0);
+
+ \pgftransformationadjustments
+ \draw [blue] (1,0) -- ++(\pgfhorizontaltransformationadjustment,0);
+ \end{scope}
+\end{tikzpicture}
+\end{codeexample}
+ \end{command}
+ \begin{command}{\pgfverticaltransformationadjustment}
+ $1/\|\mathit{transform}(0,1)\|_2$.
+ \end{command}
+
+ Note that the ``right'' way to draw a line of absolute length 1cm in
+ a transformed coordinate system is to first compute the start point
+ and to then reset the transformation matrix. The transformation
+ adjustments computed here are important only in situations where you
+ cannot do this, for instance when an |outer xsep| must be set.
\end{command}
@@ -678,7 +750,7 @@ can become curved since \emph{everything} gets transformed.
\def\polartransformation{
% \pgf@x will contain the radius
% \pgf@y will contain the distance
- \pgfmathsincos@{\pgf@x}%
+ \pgfmathsincos@{\pgf@sys@tonumber\pgf@x}%
% pgfmathresultx is now the cosine of radius and
% pgfmathresulty is the sine of radius
\pgf@x=\pgfmathresultx\pgf@y%
@@ -704,7 +776,7 @@ can become curved since \emph{everything} gets transformed.
\def\polartransformation{%
% \pgf@x will contain the radius
% \pgf@y will contain the distance
- \pgfmathsincos@{\pgf@x}%
+ \pgfmathsincos@{\pgf@sys@tonumber\pgf@x}%
% pgfmathresultx is now the cosine of radius and
% pgfmathresulty is the sine of radius
\pgf@x=\pgfmathresultx\pgf@y%
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-algorithm-layer.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-algorithm-layer.tex
index b02a61319cb..38bf29e058f 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-algorithm-layer.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-algorithm-layer.tex
@@ -775,18 +775,27 @@ that is small in practice.
\includeluadocumentationof{pgf.gd.model.Collection}
-\subsubsection{Coordinates and Transformations}
+\subsubsection{Coordinates, Paths, and Transformations}
\includeluadocumentationof{pgf.gd.model.Coordinate}
+\includeluadocumentationof{pgf.gd.model.Path}
\includeluadocumentationof{pgf.gd.lib.Transform}
\subsubsection{Options and Data Storages for Vertices, Arcs, and Digraphs}
+Many objects in the graph drawing system have an |options| table
+attached to them. These tables will contain the different kinds
+options specified by the user for the object. For efficiency reasons,
+many objects may share the same options table (since, more often than
+not, almost all objects have exactly the same |options| table). For
+this reason, you cannot store anything in an options table, indeed,
+you should never attemp to write anything into an options
+table. Instead, you should use a |Storage|.
+
\includeluadocumentationof{pgf.gd.lib.Storage}
\subsubsection{Events}
-
\includeluadocumentationof{pgf.gd.lib.Event}
@@ -795,8 +804,13 @@ that is small in practice.
\label{section-gd-transformations}
+\subsubsection{The Layout Pipeline}
+
\includeluadocumentationof{pgf.gd.control.LayoutPipeline}
+\subsubsection{Hints For Edge Routing}
+
+\includeluadocumentationof{pgf.gd.routing.Hints}
\subsection{The Interface To Algorithms}
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-algorithms-in-c.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-algorithms-in-c.tex
index 09dfc3c4f09..85a879f80d6 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-algorithms-in-c.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-algorithms-in-c.tex
@@ -16,13 +16,26 @@
\bigskip
\ifluatex\else This section of the manual can only be typeset using Lua\TeX.\expandafter\endinput\fi
-\ifgdccodebasic\else
-In order to typeset this section, LuaTeX\ must be able to link C code
-at runtime and the graph drawing C libraries must be installed on your
-system. You will find the sources in the |c| subdirectory of the
-installation, where you will also find example Makefiles.
-\expandafter\endinput
+\def\pgfNEXT{}%
+\iffalse
+ % Try to compile WITH runtime support for the C backend.
+ \ifgdccodebasic\else
+ In order to typeset this section, LuaTeX\ must be able to link C code
+ at runtime and the graph drawing C libraries must be installed on your
+ system. You will find the sources in the |c| subdirectory of the
+ installation, where you will also find example Makefiles.
+ \def\pgfNEXT{\endinput}%
+ \fi
+\else
+ % OK, we compile WITHOUT actual examples of the C backend.
+ % This simplifies runtime dependencies considerably because we do
+ % not need to build the C object files.
+ %
+ % Simply ensure that the ~ 3 examples which do not already have
+ % 'code only' receive 'code only':
+ \pgfkeys{/codeexample/every codeexample/.append style={code only}}%
\fi
+\pgfNEXT
In the present section we have a look at how graph drawing
algorithms written in the C programming language (or in C++) can be
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-circular.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-circular.tex
index 85c27dd2c73..fefb7c4aff6 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-circular.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-circular.tex
@@ -11,8 +11,6 @@
{\noindent {\emph{by Till Tantau}}}
-\label{section-last-graphdrawing-library-in-manual}
-
\ifluatex\else This section of the manual can only be typeset using Lua\TeX.\expandafter\endinput\fi
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-edge-routing.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-edge-routing.tex
new file mode 100644
index 00000000000..170ff044a9c
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-edge-routing.tex
@@ -0,0 +1,29 @@
+% Copyright 2011 by Jannis Pohlmann
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Free Documentation License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\section{Graph Drawing Algorithms: Edge Routing}
+
+\label{section-last-graphdrawing-library-in-manual}
+
+{\noindent {\emph{by Till Tantau}}}
+
+\label{section-gd-edge-routing}
+
+\ifluatex\else This section of the manual can only be typeset using Lua\TeX.\expandafter\endinput\fi
+
+
+\includeluadocumentationof{pgf.gd.routing.library}
+\includeluadocumentationof{pgf.gd.routing.NecklaceRouting}
+
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "pgfmanual-pdftex-version"
+%%% End:
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-ogdf.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-ogdf.tex
index 83868fa380c..d2828108ba0 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-ogdf.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-ogdf.tex
@@ -9,6 +9,11 @@
\section[Graph Drawing Algorithms: The Open Graph Drawing Framework]{Graph Drawing Algorithms:\\ The Open Graph Drawing Framework}
+% ATTENTION: this label is ALSO present in the previous algorithm.
+% Please update the labels once this section is back in the manual
+\label{section-last-graphdrawing-library-in-manual}
+
+
{\emph{by Till Tantau (who copied much of the text from
the source documentation of \textsc{ogdf})}}
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-overview.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-overview.tex
index cae05728476..4c86aa0ed47 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-overview.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-gd-overview.tex
@@ -12,6 +12,7 @@
\section{Introduction to Algorithmic Graph Drawing}
+\label{section-intro-gd}
\emph{by Till Tantau}
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-automata.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-automata.tex
index 48afc09ca87..01441b39f13 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-automata.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-automata.tex
@@ -210,7 +210,7 @@ where accepting states get a double line around them.
Set the place where the text should be shown. Allowed values are
|above|, |below|, |left|, and |right|.
\end{key}
- \begin{key}{/tikz/intial distance=\meta{distance} (initially 3ex)}
+ \begin{key}{/tikz/initial distance=\meta{distance} (initially 3ex)}
Sets the length of the arrow leading from the text to the state
node.
\end{key}
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-babel.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-babel.tex
new file mode 100644
index 00000000000..6cd62e59530
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-babel.tex
@@ -0,0 +1,106 @@
+% Copyright 2008 by Mark Wibrow
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Free Documentation License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\section{Babel Library}
+\label{section-library-babel}
+
+
+\begin{pgflibrary}{babel}
+ A tiny library that make the interaction with the |babel| package
+ easier. Despite the name, it may also be useful in other contexts,
+ namely whenever the catcodes of important symbols are changed
+ globally. Normally, using this library is always a good idea; it is not
+ always loaded by default since in some rare cases it may break old
+ code.
+\end{pgflibrary}
+
+The problems this library tries to fix have to do with the so-called
+``catcodes'' of symbols used inside \tikzname. In normal \TeX\
+operation, symbols like |!| or |"| are ``normal'' characters and the
+\tikzname\ parser expects them to be. Some packages, most noticably
+the |babel| package, agressively change these character codes so that
+for instance a semicolon gets a little extra space in |french| mode or
+a quotation mark followed by a vertical bar breaks ligatures in
+|german| mode.
+
+Unfortunately, \tikzname\ expects the character codes of some symbols
+to be ``normal.'' In some important cases it will tolerate changed
+character codes, but when the changes made by |babel| (or some other
+package) are too ``aggressive,'' compilation of \tikzname\ code will
+fail.
+
+The |babel| library of \tikzname\ is intended to help out in this
+situation. All this library does is to set the following two keys to
+|true|. You can, however, also set these keys directly and also switch
+them off or on individually and independently of this library.
+
+
+\begin{key}{/tikz/handle active characters in code=\opt{\meta{true or false}} (initially false)}
+ When this key is set, at the beginning of every |\tikz| command and
+ every |{tikzpicture}|, the character codes of all symbols used by
+ \tikzname\ are reset to their normal values. Furthermore, at the
+ beginning of each node, the catcodes are restored to the values they
+ had prior to the current picture.
+
+ The net effect of this is that, in most cases, symbols having a
+ special character code can be used nicely both in \tikzname\ code
+ and also in node texts.
+
+ In the following, slightly silly, example we make the dot an active
+ character and define it in some strange way. Now, in the later
+ \tikzname\ command, the dot in |3.0cm| may no longer be active and
+ setting the |handle...| option achieves exactly this. However, as
+ can be seen, the dot is once more active inside the node.
+
+\begin{codeexample}[]
+\catcode`\.=\active
+\def.{\o}
+
+\tikz [handle active characters in code]
+ \node [draw, minimum width=3.0cm] {hall. pe.ple};
+\end{codeexample}
+\end{key}
+
+
+
+\begin{key}{/tikz/handle active characters in nodes=\opt{\meta{true or false}} (initially false)}
+ This key is needed for a special situation: As explained for the
+ |handle ... code| key, that key switches off all special meaning of
+ symbols and switches them back on again at the beginning of
+ nodes. However, there is one situation when this is not possible:
+ When some text has already been read by \TeX, the catcodes can no
+ longer change. Now, for normal nodes this is not a problem since
+ their contents has not been read at the moment the catcodes are
+ restored. In contrast for label nodes for edges, nodes produced by the
+ |graph| and |quotes| libraries, and some others nodes, their text
+ \emph{has} already been read when the catcodes get adjusted.
+
+ The present key may help in such situations: It causes the text of
+ all such ``indirectly created'' nodes to be surrounded by a call to
+ the |\scantokens| command. This command attempts to reread an
+ already read text, but allows catcodes to change. As users of this
+ command will know, it is not a perfect substitute for directly
+ reading the text by \TeX, but it normally has the desired effect.
+
+\begin{codeexample}[]
+\catcode`\.=\active
+\def.{\o}
+
+\tikz [handle active characters in code,
+ handle active characters in nodes]
+ \node [draw, label=f..] {hall. pe.ple};
+\end{codeexample}
+\end{key}
+
+
+
+\endinput
+
+
+
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-circuits.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-circuits.tex
index 9478ed33ad3..6290ee705d0 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-circuits.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-circuits.tex
@@ -1871,8 +1871,8 @@ directly.
rules: The width of the shape is set up so that the left border of
the shape is at the left end of the arrow tip and the right border
is at the right end of the arrow tip. These left and right
- ``ends'' of the arrow are the left and right extents specified by
- the arrow itself (see the documentation of the |\pgfarrowsdeclare|
+ ``ends'' of the arrow are the tip end and the back end specified
+ by the arrow itself (see Section~\ref{section-arrow-terminology}
for details). You usually need not worry about this width
setting.
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-decorations.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-decorations.tex
index 4496bc06f4d..277543a1951 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-decorations.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-decorations.tex
@@ -930,7 +930,7 @@ a |mark| option is executed. (They are only defined in this code):
markings,% switch on markings
mark=at position 1cm with {\node[red]{1cm};},
mark=at position .75 with {\arrow[blue,line width=2mm]{>}},
- mark=at position -1cm with {\arrowreversed[black]{stealth};}}
+ mark=at position -1cm with {\arrowreversed[black]{stealth}}}
]
\draw [help lines] grid (3,2);
\draw [postaction={decorate}] (0,0) -- (3,1) arc (0:180:1.5 and 1);
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-external.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-external.tex
index 7d2130b035b..793d4c94618 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-external.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-external.tex
@@ -105,20 +105,15 @@ From this point on, successive runs of \LaTeX\ will use the final graphics files
\label{extlib:systemcall:option}
A template string used to generate system calls. Inside of \marg{template}, the macro |\image| can be used as placeholder for the image which is about to be generated while |\texsource| contains the main file name (in truth, it contains |\input|\marg{main file name}, but that doesn't matter).
- The default is
+ The default depends on the value of |\pgfsysdriver|. For |pgfsys-pdftex.def|, it is
\begin{codeexample}[code only]
\tikzset{external/system call={pdflatex \tikzexternalcheckshellescape -halt-on-error
- -interaction=batchmode -jobname "\image" "\texsource"}
+ -interaction=batchmode -jobname "\image" "\texsource"}}
\end{codeexample}
\noindent where \declareandlabel{\tikzexternalcheckshellescape} inserts the value of the configuration key |shell escape|
if and only if the current document has been typeset with |-shell-escape|\footnote{Note that this is always true for the default configuration. This security consideration applies mainly for \texttt{mode=list and make} which will also work \emph{without} shell escapes.}.
- For |eps| output, you can (and need to) use
-\begin{codeexample}[code only, tikz syntax=false]
-\tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error
- -interaction=batchmode -jobname "\image" "\texsource";
- dvips -o "\image".ps "\image".dvi}}
-\end{codeexample}
+ Other drivers result in slightly different calls. There is support for |lualatex|, |xelatex|, and |dvips|. The precise values are written to the |.log| file as soon as you attempt to compile a document.
The argument \marg{template} will be expanded using |\edef|, so any control sequences will be expanded. During this evaluation, `|\\|' will result in a normal backslash, `|\|'. Furthermore, double quotes `|"|', single quotes `|'|', semicolons and dashes `|-|' will be made to normal characters if any package uses them as macros. This ensures compatibility with the |german| package, for example.
\end{key}
@@ -138,13 +133,13 @@ There are, however, some points which need your attention when you try to use
For point a), a |\ref| inside of an externalized graphics works \emph{only} if you issue the required system call \emph{manually} or by |make|. The initial configuration |mode=convert with system call| does \emph{not} support |\ref|. But you can copy--paste the system call generated by |mode=convert with system call| and issue it manually. The reason is that |\ref| information is stored in the main |.aux| file -- but this auxiliary file is not completely written when |mode=convert with system call| is invoked (there is a race condition). Note that |\pageref| is not supported (sorry). Thus: if you have |\ref| inside of external graphics, consider using |mode=list and make| or copy--paste the system call for the image(s) and issue it manually.
-Point b) is realized automatically by the external library. In detail, a |\label| inside of an externalized graphics causes the external library to generate separate auxiliary files for every external image. These files are called \meta{imagename}|.dpth|. The extension |.dpth| indicates that the file also contains the image's depth (the |baseline| key of \tikzname). Furthermore, anything which would have been written to an |.aux| file will be redirected to the |.dpth| file -- but only things which occur inside of the externalized |tikzpicture| environment. When the main document loads the image, it will copy the |.dpth| file into the main |.aux| file. Then, successive compilations of the main document contain the external |\label| information. In other words, a |\label| in an external graphics needs the following work flow:
+Point b) is implemented automatically by the external library. In detail, a |\label| inside of an externalized graphics causes the external library to generate separate auxiliary files for every external image. These files are called \meta{imagename}|.dpth|. The extension |.dpth| indicates that the file also contains the image's depth (the |baseline| key of \tikzname). Furthermore, anything which would have been written to an |.aux| file will be redirected to the |.dpth| file -- but only things which occur inside of the externalized |tikzpicture| environment. When the main document loads the image, it will copy the |.dpth| file into the main |.aux| file. Then, successive compilations of the main document contain the external |\label| information. In other words, a |\label| in an external graphics needs the following work flow:
\begin{enumerate}
\item The external graphics needs to be generated together with its |.dpth| (usually automatically by \tikzname).
\item The main document includes the external graphics and copies the |.dpth| content into its main |.aux| file.
\item The main document needs to be translated once again to re-read its |.aux| file\footnote{Note that it is not possible to activate the content of an auxiliary file after \texttt{\textbackslash begin\{document\}} in \LaTeX.}.
\end{enumerate}
-There is just one special case: if a |\label|/|\ref| combination is realized itsself by a |tikzpicture| which should be externalized, you need to proceed as for case a) since |mode=convert with system call| can't handle that stuff on its own. Thus, |\label| works automatically, just translate the main document often enough.
+There is just one special case: if a |\label|/|\ref| combination is implemented itsself by a |tikzpicture| which should be externalized, you need to proceed as for case a) since |mode=convert with system call| can't handle that stuff on its own. Thus, |\label| works automatically, just translate the main document often enough.
\begin{key}{/tikz/external/aux in dpth=\marg{boolean} (initially true)}
Allows to disable the feature. Disabling it will safe one |\newwrite| command, i.e.\ a write register.
@@ -361,7 +356,17 @@ pdflatex -shell-escape main
The choice \declare{diff} is the same as MD5 -- except that it compares the picture content as-is instead of a hash. The |.md5| file will be used to compare an old version with the current one -- but its content is some ``normalized'' version of the picture for internal use.
- \paragraph{Attention:} the content--based strategies |md5| and |diff| operate on the picture content -- and only on the picture content. Here, ``picture content'' only includes the top--level tokens; no expansion is applied and no included files are part of the strategies. If you change preamble styles, you have to rebuild the figures manually (for example by deleting the generated graphics files). If you have include files, consider using |\tikzpicturedependsonfile| and its variants. Since this key provides heuristics, you should always remake your figures before you finally publish your document.
+ \paragraph{Attention:} the content--based strategies |md5| and |diff| operate on the picture content -- and only on the picture content. Here, ``picture content'' only includes the top--level tokens; no expansion is applied and no included files are part of the strategies. If you change preamble styles, you have to rebuild the figures manually (for example by deleting the generated graphics files). If you have include files, consider using |\tikzpicturedependsonfile| and its variants. Since this key provides heuristics, you should always remake your figures before you finally publish your document. Example: Suppose we have the following picture which depends on a command |\mycommand|:
+\begin{codeexample}[code only]
+\def\mycommand{My comment}
+
+\begin{tikzpicture}
+
+\node at (0,0) {\mycommand};
+
+\end{tikzpicture}
+\end{codeexample}
+ What happens if you change ``My comment'' to ``My super comment''? Well, |external| will \emph{not} pick it up; you will need to handle this manually. However, if you modify anything between |\begin{tikzpicture}| and |\end{tikzpicture}|, the external library \emph{will} pick it up and regenerate the picture.
The |up to date check| is applied for |mode=convert with system call| and |mode=list and make|.
\end{key}
@@ -451,7 +456,7 @@ pdflatex -shell-escape
% step 1: generate main.makefile:
pdflatex main
% step 2: generate ALL graphics on 2 processors:
-make -j 2 main.makefile
+make -j 2 -f main.makefile
% step 3: include the graphics:
pdflatex main
\end{codeexample}
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-mindmaps.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-mindmaps.tex
index 0288319b757..a01c56b50bc 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-mindmaps.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-mindmaps.tex
@@ -67,11 +67,11 @@ Every mindmap should be put in a scope or a picture where the
\paragraph{Remark:} Note that |mindmap| redefines |font| sizes and |sibling angle| depending on the current concept level (i.e. inside of |level 1 concept|, |level 2 concept| etc.). Thus, if you need to redefine these variables, use
- |\tikzset{level 1 concept/.append style={font=\small}}|
+ |level 1 concept/.append style={font=\small}|
\noindent or
- |\tikzset{level 2 concept/.append style={sibling distance=90}}|
+ |level 2 concept/.append style={sibling distance=90}|
\noindent \emph{after} the |mindmap| style.
\end{stylekey}
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main-body.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main-body.tex
index 1fdda1c63d9..d34656b688f 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main-body.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main-body.tex
@@ -426,7 +426,12 @@ also, to use algorithmic graph drawing).
\include{pgfmanual-en-gd-force}
\include{pgfmanual-en-gd-circular}
\include{pgfmanual-en-gd-phylogenetics}
-\include{pgfmanual-en-gd-ogdf}
+\include{pgfmanual-en-gd-edge-routing}
+%
+% XXX : disabled because of
+% 1. compile-time dependencies which are hard to resolve
+% 2. it is "hardly usable anyway" (TT)
+%\include{pgfmanual-en-gd-ogdf}
\include{pgfmanual-en-gd-algorithm-layer}
\include{pgfmanual-en-gd-algorithms-in-c}
\include{pgfmanual-en-gd-display-layer}
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main-preamble.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main-preamble.tex
index 9922ac79219..df6b0b97708 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main-preamble.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main-preamble.tex
@@ -99,7 +99,7 @@
\ifluatex
\usetikzlibrary{graphdrawing}
- \usegdlibrary{trees,circular,layered,examples,force,phylogenetics}
+ \usegdlibrary{trees,circular,layered,examples,force,phylogenetics,routing}
% Test whether C code is available:
\directlua{
@@ -148,6 +148,9 @@
\usepackage{pifont}
\usepackage{makeidx}
+% Fontenc (new beginning 2014, let's see, what it breaks...):
+\usepackage[T1]{fontenc}
+
\ifluatex
% \usepackage[no-math]{fontspec}
% \usepackage{luatextra}
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-algorithms.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-algorithms.tex
index 5441b9e101f..7a30162a1ca 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-algorithms.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-algorithms.tex
@@ -28,13 +28,18 @@ recommended for adventurous users.
To add a new function to the math engine the following command can be
used:
-\begin{command}{\pgfmathdeclarefunction\marg{name}\marg{number of arguments}\marg{code}}
+\begin{command}{\pgfmathdeclarefunction\opt{|*|}\marg{name}\marg{number of arguments}\marg{code}}
This will set up the parser to recognize a function called
\meta{name}. The name of the function can consist of, uppercase or
lowercase letters, numbers or the underscore |_|. In line with
many programming languages, a function name cannot begin with a
- number or contain any spaces.
+ number or contain any spaces. The function may not have been
+ declared earlier, unless the optional star (|*|) is provided, which
+ forces an ``overwriting'' of the function by the new function. Note
+ that you \emph{should never change the arity of standard functions}
+ and you should normally use |\pgfmathredeclarefunction|, which
+ does not allow you to do anything wrong here.
The \meta{number of arguments} can be any positive integer, zero,
or the value |...|, which indicates a variable number of
@@ -74,9 +79,9 @@ used:
must also be directly followed by an |\endgroup| and will simply
``smuggle'' the definition of \meta{macro} outside the \TeX-group.
- By performing computations within a \TeX-group, \pgfname{}
- registers such as |\pgf@x|, |\pgf@y| and |\c@pgf@counta|,
- |\c@pgfcountb|, and so forth, can be used at will.
+ By performing computations within a \TeX-group, \pgfname{}
+ registers such as |\pgf@x|, |\pgf@y| and |\c@pgf@counta|,
+ |\c@pgfcountb|, and so forth, can be used at will.
Beyond setting up the parser, this command also defines two macros
which provide access to the function independently of the parser:
@@ -106,8 +111,8 @@ used:
the public macro is defined in the same way as normal \TeX{}
macros using, for example, |\def\pgfmathNoArgs{|\meta{code}|}|
for a function with no arguments, or
- |\def\pgfmathThreeArgs#1#2#3{|\meta{code}|}| for a function with
- three arguments.
+ |\def\pgfmathThreeArgs#1#2#3{|\meta{code}|}| for a function with
+ three arguments.
The private macro is defined in the same way, and each argument
can therefore be accessed in \meta{code}
using |#1|, |#2| and so on.
@@ -127,21 +132,35 @@ used:
the public versions of the |min| and |max| functions still
take two arguments for compatibility with older versions, but
each of these arguments can take several comma separated values.
-
-
-
-
\end{command}
- To redefine a function use the following command:
+To redefine a function use the following command:
\begin{command}{\pgfmathredeclarefunction\marg{function name}\marg{algorithm code}}
-
This command redefines the |\pgfmath|\meta{function name}|@| macro
with the new \meta{algorithm code}. See the description of the
|\pgfmathdeclarefunction| for details. You cannot change the number
of arguments for an existing function.
-
+\begin{codeexample}[]
+\makeatletter
+\pgfmathdeclarefunction{foo}{1}{
+ \begingroup
+ \pgf@x=#1pt\relax
+ \multiply\pgf@x by2\relax
+ \pgfmathreturn\pgf@x
+ \endgroup
+}
+\pgfmathparse{foo(42)}\pgfmathresult
+\pgfmathredeclarefunction{foo}{
+ \begingroup
+ \pgf@x=#1pt\relax
+ \multiply\pgf@x by3\relax
+ \pgfmathreturn\pgf@x
+ \endgroup
+}
+\pgfmathparse{foo(42)}\pgfmathresult
+\makeatother
+\end{codeexample}
\end{command}
\pgfname{} uses the last known definition of a function within the
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-numberprinting.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-numberprinting.tex
index f86b6f59187..c3afcc8b234 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-numberprinting.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-numberprinting.tex
@@ -406,6 +406,21 @@ display style.
uses the argument provided to |precision| for all number styles).
\end{key}
+\begin{key}{/pgf/number format/read comma as period=\mchoice{true,false} (initially false)}
+ This is one of the few keys which allows to customize the number parser. If this switch is turned on, a comma is read just as a period.
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/read comma as period}
+\pgfmathprintnumber{1234,56}
+\end{codeexample}
+ This is typically undesired as it can cause side--effects with math parsing instructions. However, it is supported to format input numbers or input tables. Consider |use comma| to typeset the result with a comma as well.
+\begin{codeexample}[]
+\pgfkeys{/pgf/number format/.cd,
+ read comma as period,
+ use comma}
+\pgfmathprintnumber{1234,56}
+\end{codeexample}
+\end{key}
+
\subsection{Changing display styles}%
\label{sec:number:styles}%
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-parsing.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-parsing.tex
index 37df357e706..8cdadabe281 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-parsing.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-parsing.tex
@@ -8,7 +8,9 @@
% See the file doc/generic/pgf/licenses/LICENSE for more details.
%
-\section{Evaluating Mathematical Expressions}
+\section{Mathematical Expressions}
+
+\label{pgfmath-syntax}
The easiest way of using \pgfname's mathematical engine is to provide
a mathematical expression given in familiar infix notation, for
@@ -31,12 +33,14 @@ expression are explained first, then the syntax for expression is
explained.
-\subsection{Commands for Parsing Expressions}
+\subsection{Parsing Expressions}
\label{pgfmath-registers}
\label{pgfmath-parsing}
+\subsubsection{Commands}
+
The basic command for invoking the parser of \pgfname's mathematical
engine is the following:
@@ -49,36 +53,15 @@ engine is the following:
In the following, the special properties of this command are
explained. The exact syntax of mathematical expressions is explained
- in Section~\ref{pgfmath-syntax}.
+ in Sections \ref{pgfmath-operators} and~\ref{pgfmath-functions}.
\begin{itemize}
\item
The result stored in the macro |\pgfmathresult| is a decimal
\emph{without units}. This is true regardless of whether the
\meta{expression} contains any unit specification. All numbers
- with units are converted to points first.
- You can check whether an expression contained a unit using
- the following \TeX-if.
- {\let\ifpgfmathunitsdeclared\relax
- \begin{command}{\ifpgfmathunitsdeclared}
- After a call of |\pgfmathparse| this if will be true exactly if
- some unit was encountered in the expression. It is always set
- globally in each call.
- \end{command}
- }
-
- A special kind of units are \TeX's ``math units'' (|mu|). It will
- be treated as if |pt| had been used, but you can
- check whether an expression contained a math unit using the
- following:
- {\let\ifpgfmathmathunitsdeclared\relax
- \begin{command}{\ifpgfmathmathunitsdeclared}
- This \TeX-if is similar to |\ifpgfmathunitsdeclared|, but it
- is only set when the unit |mu| is encountered at least
- once. In this case, |\ifpgfmathunitsdeclared| will \emph{also}
- be set to true.
- \end{command}
- }
+ with units are converted to points first. See
+ Section~\ref{pgfmath-units} for details on units.
\item
The parser will recognize \TeX{} registers and box dimensions,
so |\mydimen|, |0.5\mydimen|, |\wd\mybox|, |0.5\dp\mybox|,
@@ -186,7 +169,7 @@ The effect of the following commands is always local to the current
register and \meta{expression} be something like |+1pt plus 1fil|
and the \meta{register} will be assigned the expected value.
- Second, when the \meta{expected} does not start with |+|, it is
+ Second, when the \meta{expression} does not start with |+|, it is
first parsed using |\pgfmathparse|, resulting in a (dimensionless)
value |\pgfmathresult|. Now, if the parser encountered the unit |mu|
somewhere in the expression, it assumes that \meta{register} is a
@@ -261,21 +244,105 @@ The effect of the following commands is always local to the current
\end{command}
+\subsubsection{Considerations Concerning Units}
+\label{pgfmath-units}
-\section{Syntax for mathematical expressions}
+As was explained earlier, the parser commands like |\pgfmathparse|
+will always return a result without units in it and all dimensions
+that have a unit like |10pt| or |1in| will first be converted to \TeX\
+points (|pt|) and, then, the unit is dropped.
-\label{pgfmath-syntax}
+Sometimes it is useful, nevertheless, to find out whether an
+expression or not. For this, you can use the following commands:
+
+{\let\ifpgfmathunitsdeclared\relax
+ \begin{command}{\ifpgfmathunitsdeclared}
+ After a call of |\pgfmathparse| this if will be true exactly if
+ some unit was encountered in the expression. It is always set
+ globally in each call.
+
+ Note that \emph{any} ``mentioning'' of a unit inside an
+ expression will set this \TeX-if to true. In particular, even an
+ expressionlike |2pt/1pt|, which arguably should be considered
+ ``scalar'' or ``unit-free'' will still have this \TeX-if set to
+ true. However, see the |scalar| function for a way to change
+ this.
+ \end{command}
+}
+
+\begin{math-function}{scalar(\mvar{value})}
+ \mathcommand
+
+ This function is the identity function on its input, but it will
+ reset the \TeX-if |\ifpgfmathunitsdeclared|. Thus, it can be used to
+ indicate that the given \meta{value} should be considered as a
+ ``scalar'' even when it contains units; but note that it will work
+ even when the \meta{value} is a string or something else. The only
+ effect of this function is to clear the unit declaration.
- The syntax for the expressions recognized by |\pgfmathparse| and
- friends is straightforward, and the following sections describe the
- operators and functions that are recognized by default.
+\begin{codeexample}[]
+\pgfmathparse{scalar(1pt/2pt)} \pgfmathresult\
+\ifpgfmathunitsdeclared with \else without \fi unit
+\end{codeexample}
-\subsection{Operators}
+ Note, however, that this command (currently) really just clears the
+ \TeX-if as the input is scanned from left-to-right. Thus, even if
+ there is a use of a unit before the |scalar| function is used, the
+ \TeX-if will be cleared:
+
+\begin{codeexample}[]
+\pgfmathparse{1pt+scalar(1pt)} \pgfmathresult\
+\ifpgfmathunitsdeclared with \else without \fi unit
+\end{codeexample}
+
+ The other way round, a use of a unit after the |scalar| function
+ will set the units once more.
+\begin{codeexample}[]
+\pgfmathparse{scalar(1pt)+1pt} \pgfmathresult\
+\ifpgfmathunitsdeclared with \else without \fi unit
+\end{codeexample}
+
+ For these reasons, you should use the function only on the outermost
+ level of an expression.
+
+ A typical use of this function is the following:
+\begin{codeexample}[]
+\tikz{
+ \coordinate["$A$"] (A) at (2,2);
+ \coordinate["$B$" below] (B) at (0,0);
+ \coordinate["$C$" below] (C) at (3,0);
+ \draw (A) -- (B) -- (C) -- cycle;
+ \path
+ let \p1 =($(A)-(B)$), \p2 =($(A)-(C)$),
+ \n1 = {veclen(\x1,\y1)}, \n2 = {veclen(\x2,\y2)}
+ in coordinate ["$D$" below] (D) at ($ (B)!scalar(\n1/(\n1+\n2))!(C) $);
+ \draw (A) -- (D);
+}
+\end{codeexample}
+\end{math-function}
+
+A special kind of units are \TeX's ``math units'' (|mu|). It will
+be treated as if |pt| had been used, but you can
+check whether an expression contained a math unit using the
+following:
+{\let\ifpgfmathmathunitsdeclared\relax
+ \begin{command}{\ifpgfmathmathunitsdeclared}
+ This \TeX-if is similar to |\ifpgfmathunitsdeclared|, but it
+ is only set when the unit |mu| is encountered at least
+ once. In this case, |\ifpgfmathunitsdeclared| will \emph{also}
+ be set to true. The |scalar| function has no effect on this \TeX-if.
+ \end{command}
+}
+
+\subsection{Syntax for Mathematical Expressions: Operators}
+
+The syntax for the expressions recognized by |\pgfmathparse| and
+friends is rather straightforward. Let us start with the operators.
\label{pgfmath-operators}
- The following operators (presented in the context in which they are used)
- are recognized:
+The following operators (presented in the context in which they are used)
+are recognized:
\begin{math-operator}{+}{infix}{add}
Adds \mvar{x} to \mvar{y}.
@@ -454,7 +521,7 @@ calculations are unlikely to be possible with the result.
-\subsection{Functions}
+\subsection{Syntax for Mathematical Expressions: Functions}
\label{pgfmath-functions}
@@ -470,12 +537,11 @@ The following functions are recognized:
less,ln,log10,log2,max,min,mod,Mod,multiply,
neg,not,notequal,notgreater,notless,
oct,or,pi,pow,rad,rand,random,real,rnd,round,
- sec,sin,sinh,sqrt,subtract,tan,tanh,true, veclen,width}
+ scalar,sec,sign,sin,sinh,sqrt,subtract,tan,tanh,true, veclen,width}
\node [anchor=base west] at ({int(\i/12)*2.5cm},{-mod(\i,12)*1.1*\baselineskip}) {\mathlink{\f}};
\end{tikzpicture}
\bigskip
-
Each function has a \pgfname{} command associated with it (which is
also shown with the function below). In general, the command
is simply the name of the function prefixed with |\pgfmath|, for
@@ -704,6 +770,23 @@ example, |\pgfmathadd|, but there are some notable exceptions.
\end{math-function}
+\begin{math-function}{sign(\mvar{x})}
+\mathcommand
+
+ Returns the sign of $x$.
+
+\begin{codeexample}[]
+\pgfmathparse{sign(-5)} \pgfmathresult
+\end{codeexample}
+
+\begin{codeexample}[]
+\pgfmathparse{sign(0)} \pgfmathresult
+\end{codeexample}
+
+\begin{codeexample}[]
+\pgfmathparse{sign(5)} \pgfmathresult
+\end{codeexample}
+\end{math-function}
@@ -1025,6 +1108,34 @@ example, |\pgfmathadd|, but there are some notable exceptions.
\end{math-function}
+\begin{key}{/pgf/trig format=\mchoice{deg,rad} (initially deg)}
+ Allows to define whether trigonometric math functions (i.e.\ all in this subsection) operate with degrees or with radians.
+
+\begin{codeexample}[]
+\pgfmathparse{cos(45)} \pgfmathresult
+\end{codeexample}
+\begin{codeexample}[]
+\pgfkeys{/pgf/trig format=rad}
+\pgfmathparse{cos(pi/2)} \pgfmathresult
+\end{codeexample}
+
+ The initial configuration |trig format=deg| is the base of \pgfname: almost all of it is based on degrees.
+
+ Specifying |trig format=rad| is most useful for data visualization where the angles are typically given in radians. However, it is applied to all trigonometric functions for which the option applies, including any drawing instructions which operate on angles.
+\begin{codeexample}[]
+\begin{tikzpicture}
+ \draw[-stealth]
+ (0:1) -- (45:1) -- (90:1) -- (135:1) -- (180:1);
+
+ \draw[-stealth,trig format=rad,red]
+ (pi:1) -- (5/4*pi:1) -- (6/4*pi:1) -- (7/4*pi:1) -- (2*pi:1);
+\end{tikzpicture}
+\end{codeexample}
+
+ \paragraph{Warning:} At the time of this writing, this feature is ``experimental''. Please handle it with care: there may be path instructions or libraries in \pgfname\ which rely on |trig format=deg|. The intented usage of |trig format=rad| is for local scopes -- and as option for data visualization.
+\end{key}
+
+
\subsubsection{Comparison and logical functions}
\label{pgfmath-functions-comparison}
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfkeys.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfkeys.tex
index 25825dc52c7..423fac92e88 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfkeys.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfkeys.tex
@@ -507,7 +507,8 @@ following happens:
\begin{enumerate}
\item The input is replaced by \meta{key}|=\pgfkeysnovalue|. In
particular, the commands |\pgfkeys{my key}| and
- |\pgfkeys{my key=\pgfkeysnovalue}| have exactly the same effect and
+ % FIXME : there is a bug in the pretty printer ... fix it and get rid of '||' here:
+ |\pgfkeys{my key=||\pgfkeysnovalue}| have exactly the same effect and
you can ``simulate'' a missing value by providing the value
|\pgfkeysnovalue|, which is sometimes useful.
\item If the \meta{value} is |\pgfkeysnovalue|, then it is checked
@@ -1609,7 +1610,8 @@ inspecting things:
\begin{key}{/utils/exec=\meta{code}}
This key will simply execute the given \meta{code}.
- \example |\pgfkeys{some key=some value,/utils/exec=\show\hallo,obscure key=obscure}|
+ % FIXME : there is a bug in the pretty printer ... fix it!
+ \example \verb|\pgfkeys{some key=some value,/utils/exec=\show\hallo,obscure key=obscure}|
\end{key}
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-coordinates.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-coordinates.tex
index d23d81efb3e..154533e680c 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-coordinates.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-coordinates.tex
@@ -906,8 +906,8 @@ which should be one of the paths mentioned in the
You can prefix coordinates by |++| to make them ``relative.'' A
coordinate such as |++(1cm,0pt)| means ``1cm to the right of the
-previous position.'' Relative coordinates are often useful in
-``local'' contexts:
+previous position, making this the new current position.'' Relative
+coordinates are often useful in ``local'' contexts:
\begin{codeexample}[]
\begin{tikzpicture}
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-graphs.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-graphs.tex
index 91aebaa1b0d..e9643c75744 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-graphs.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-graphs.tex
@@ -920,6 +920,28 @@ however, be modified by using the following keys:
\end{codeexample}
\end{key}
+\begin{key}{/tikz/graphs/number nodes=\opt{\meta{start number}} (default 1)}
+ When this key is used in a scope, each encountered node name will
+ get appended a new number, starting with \meta{start}. Typically,
+ this ensures that all node names are different. Between the original
+ node name and the appended number, the setting of the following will
+ be inserted:
+ \begin{key}{/tikz/graphs/number nodes sep=\meta{text} (initially \normalfont space)}
+ \end{key}
+\begin{codeexample}[]
+\tikz \graph [branch down=5mm] {
+ { [number nodes]
+ a -> {
+ b -> {c, c},
+ b -> {c, c},
+ b -> {c, c},
+ }
+ },
+ b 2 -- b 5
+};
+\end{codeexample}
+\end{key}
+
When a fresh node has been detected, a new node is created in the
inside a protecting scope. For this, the current
placement strategy is asked to compute a default position for the
@@ -1397,6 +1419,8 @@ conjunction with large, algorithmically generated graphs.
\end{quote}
The \meta{options} are compulsory. The semicolon can, again, be
replaced by a comma.
+ \item
+ The |number nodes| option will work as expected.
\end{enumerate}
Here is a typical way this syntax might be used:
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-pics.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-pics.tex
index fcc88e1e5dc..b4ba727c1d0 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-pics.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-pics.tex
@@ -248,7 +248,7 @@ picture's type between the braces:
states that the path should be drawn, not filled, and the fact that
in the surrounding scope the |fill| option is set has no effect.
The following key can be used to change this:
- \begin{key}{/tikz/pic action}
+ \begin{key}{/tikz/pic actions}
This key is a style that can be used (only) inside the code of a
pic. There, it will set the ``action'' keys set inside the
\meta{options} of the pic (``actions'' are drawing, filling,
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-plots.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-plots.tex
index 35f83f1546f..944eeca1a12 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-plots.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-plots.tex
@@ -56,9 +56,9 @@ There are basically three ways of creating plots using \tikzname:
and forces you to do a lot of things ``by hand'' like adding axes or
ticks.
\item Use the |datavisualization| path command, which is documented in
- Part~\ref{part-dv}. This command is much more powerful that the
+ Part~\ref{part-dv}. This command is much more powerful than the
|plot| path operation and produces complete plots including axes and
- ticks. The downside is that you cannot use it to ``just'' to quickly
+ ticks. The downside is that you cannot use it to ``just'' quickly
plot a simple curve (or, more precisely, it is hard to use it in
this way).
\item Use the |pgfplots| package, which is basically an alternative to
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-shapes.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-shapes.tex
index e5fe70f35c7..612ca23d1c4 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-shapes.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-shapes.tex
@@ -63,7 +63,7 @@ path where it would expect a normal path operation (like |-- (1,1)| or
The node operation is typically followed by some options, which apply
only to the node. Then, you can optionally \emph{name} the node by
-providing a name in round braces. Lastly, for the |node| operation you
+providing a name in parentheses. Lastly, for the |node| operation you
must provide some label text for the node in curly braces, while for
the |coordinate| operation you may not. The node is placed at the
current position of the path either \emph{after the path has been
@@ -80,7 +80,7 @@ encountered.
\tikz \fill [fill=yellow!80!black]
(0,0) node {first node}
-- (1,1) node[behind path] {second node}
- -- (0,2) node {third node};
+ -- (2,0) node {third node};
\end{codeexample}
\subsubsection{Syntax of the Node Command}
@@ -116,7 +116,7 @@ The syntax for specifying nodes is the following:
curly braces, you can also use the following key:
\begin{key}{/tikz/node contents=\meta{node contents}}
\label{option-node-contents}%
- This key sets that contents of the node to the given text as if
+ This key sets the contents of the node to the given text as if
you had given it at the end in curly braces. When the option is
used inside the options of a node, the parsing of the node stops
immediately after the end of the option block. In particular, the
@@ -468,7 +468,7 @@ shapes:
Specifies the inner separation in the $y$-direction, only.
\end{key}
-\begin{key}{/pgf/outer sep=\meta{dimension} (initially .5\string\pgflinewidth)}
+\begin{key}{/pgf/outer sep=\meta{dimension or ``auto''}}
\keyalias{tikz}
This option adds an additional (invisible) separation space of
\meta{dimension} outside the background path. The main effect of
@@ -480,24 +480,63 @@ shapes:
The default for this option is half the line width. When the default
is used and when the background path is draw, the anchors will lie
exactly on the ``outside border'' of the path (not on the path
- itself). When the shape is filled, but not drawn, this may not be
- desirable. In this case, the |outer sep| should be set to zero
- points.
+ itself).
\begin{codeexample}[]
\begin{tikzpicture}
\draw[line width=5pt]
- (0,0) node[outer sep=0pt,fill=yellow!80!black] (f) {filled}
- (2,0) node[inner sep=.5\pgflinewidth+2pt,draw] (d) {drawn};
+ (0,0) node[fill=yellow!80!black] (f) {filled}
+ (2,0) node[draw] (d) {drawn}
+ (1,-2) node[draw,scale=2] (s) {scaled};
\draw[->] (1,-1) -- (f);
\draw[->] (1,-1) -- (d);
+ \draw[->] (1,-1) -- (s);
+\end{tikzpicture}
+\end{codeexample}
+
+ As the above example demonstrates, the standard settings for the
+ outer sep are not always ``correct.'' First, when a shape is filled,
+ but not drawn, the outer sep should actually be |0|. Second, when a
+ node is scaled, for instance by a factor of 5, the outer separation
+ also gets scaled by a factor of 5, while the line width stays at its
+ original width; again causing problems.
+
+ In such cases, you can say |outer sep=auto| to make \tikzname\
+ \emph{try} to compensate for the effects described above. This is
+ done by, firstly, setting the outer sep to |0| when no drawing is
+ done and, secondly, setting the outer separations to half the line
+ width (as before) times two adjustment factors, one for the
+ horizontal separations and one for the vertical
+ separations (see Section~\ref{section-adjustment-transformations}
+ for details on these factors). Note, however, that these factors can
+ compensate only for transformations that are either scalings plus
+ rotations or scalings with different magnitudes in the horizontal
+ and the vertical direction. If you apply slanting, the factors will
+ only approximate the correct values.
+
+ In general, it is a good idea to say |outer sep=auto| at some early
+ stage. It is not the default mainly for compatibility with earlier
+ versions.
+\begin{codeexample}[]
+\begin{tikzpicture}[outer sep=auto]
+ \draw[line width=5pt]
+ (0,0) node[fill=yellow!80!black] (f) {filled}
+ (2,0) node[draw] (d) {drawn}
+ (1,-2) node[draw,scale=2] (s) {scaled};
+
+ \draw[->] (1,-1) -- (f);
+ \draw[->] (1,-1) -- (d);
+ \draw[->] (1,-1) -- (s);
\end{tikzpicture}
\end{codeexample}
\end{key}
+
\begin{key}{/pgf/outer xsep=\meta{dimension} (initially .5\string\pgflinewidth)}
\keyalias{tikz}
- Specifies the outer separation in the $x$-direction, only.
+ Specifies the outer separation in the $x$-direction, only. This
+ value will be overwritten when |outer sep| is set, either to the
+ value given there or a computed value in case of |auto|.
\end{key}
\begin{key}{/pgf/outer ysep=\meta{dimension} (initially .5\string\pgflinewidth)}
@@ -505,6 +544,7 @@ shapes:
Specifies the outer separation in the $y$-direction, only.
\end{key}
+
\begin{key}{/pgf/minimum height=\meta{dimension} (initially 0pt)}
\keyalias{tikz}
This option ensures that the height of the shape (including the
@@ -799,7 +839,7 @@ lines of text. There are three different ways of achieving this:
\item Inside the node, you can put some standard environment that
produces multi-line, aligned text. For instance, you can use a
|{tabular}| inside a node:
-\begin{codeexample}[]
+\begin{codeexample}[width=5cm]
\tikz \node [draw] {
\begin{tabular}{cc}
upper left & upper right\\
@@ -934,7 +974,9 @@ Let us now first have a look at the |text width| command.
you specify a large line width and the node text
fits on a single line and is, in fact, much shorter than the
specified |text width|, an underfull horizontal box will
- result. Unfortunately, this cannot be avoided, due to the way \TeX\ works.
+ result. Unfortunately, this cannot be avoided, due to the way
+ \TeX\ works (more precisely, I have thought long and hard about this
+ and have not been able to figure out a sensible way to avoid this).
For this reason, \tikzname\ switches off horizontal badness
warnings inside boxes with |align=center|. Since this will also
suppress some ``wanted'' warnings, there is also an option for
@@ -1212,6 +1254,10 @@ more intuitively:
Similar to |above left|.
\end{key}
+\begin{key}{/tikz/centered}
+ A shorthand for |anchor=center|.
+\end{key}
+
% A second set of options behaves similarly, namely the |above of|,
% |below of|, and so on options. They cause the same anchors to be set
% as the options without |of|, however, their parameter is different:
@@ -1589,16 +1635,14 @@ keys:
-\subsubsection{Arranging Nodes Using Chains and Matrices}
+\subsubsection{Advanced Arrangements of Nodes}
The simple |above| and |right| options may not always suffice for
arranging a large number of nodes. For such situations \tikzname\
-offers two libraries that make positioning easier: The |chains|
-library and the |matrix| library. The first is mostly useful for
-creating ``chains of nodes'' and, more generally, ``flows.'' The
-second allows you to arrange multiple nodes in rows and columns. These
-methods for positioning nodes are described in two separate
-Sections~\ref{section-matrices} and~\ref{section-chains}.
+offers libraries that make positioning easier: The |graphdrawing|
+library and the |matrix| library. These libraries for positioning
+nodes are described in two separate Sections~\ref{section-matrices}
+and~\ref{section-intro-gd}.
\subsection{Fitting Nodes to a Set of Coordinates}
@@ -1646,10 +1690,10 @@ on a background layer.
child { node (e) {e} } }
child { node (c) {c} };
- \begin{pgfonlayer}{background}
+ \begin{scope}[on background layer]
\node[fill=red!20,inner sep=0pt,ellipse,fit=(root) (b) (d) (e)] {};
\node[fill=blue!20,inner sep=0pt,ellipse,fit=(b) (c) (e)] {};
- \end{pgfonlayer}
+ \end{scope}
\end{tikzpicture}
\end{codeexample}
@@ -2076,7 +2120,7 @@ having to use the cumbersome |node| syntax:
an angle of |0| refers to the point on the border that lies on a
straight line from the |main node|'s center to the right
(relative to the paper, not relative to the local coordinate
- system or either the node or the scope).
+ system of either the node or the scope).
The difference can be seen in the following example:
\begin{codeexample}[]
@@ -2106,8 +2150,9 @@ having to use the cumbersome |node| syntax:
from the major angle), the anchor for the major angle is
used. Thus, a label at a border point for $2^\circ$ will have the
anchor |west|, while a label for $3^\circ$ will have the anchor
- |south west|, resulting in a ``jump'' of the anchor. If this is
- not desired, you will have to set the anchor yourself.
+ |south west|, resulting in a ``jump'' of the anchor. You can set
+ the anchor ``by hand'' using the |anchor| key or indirect keys
+ like |left|.
\begin{codeexample}[]
\tikz
\node [circle, draw,
@@ -2115,7 +2160,9 @@ having to use the cumbersome |node| syntax:
label=60:$60^\circ$,
label=below:$-90^\circ$,
label=3:$3^\circ$,
- label=2:$2^\circ$] {my circle};
+ label=2:$2^\circ$,
+ label={[below]180:$180^\circ$},
+ label={[centered]135:$115^\circ$}] {my circle};
\end{codeexample}
\item
One \meta{angle} is special: If you set the \meta{angle} to
@@ -2164,6 +2211,8 @@ having to use the cumbersome |node| syntax:
\end{stylekey}
\end{key}
+See Section~\ref{section-label-quotes} for an easier
+syntax for specifying nodes.
\subsubsection{The Pin Option}
@@ -2275,8 +2324,9 @@ more complicated options in curly braces:
\matrix [row sep=5mm] {
\node [draw, "label"] {A}; \\
\node [draw, "label" left] {B}; \\
- \node [draw, "label" color=red] {C}; \\
- \node [draw, "label" {red,draw,thick}] {D}; \\
+ \node [draw, "label" centered] {C}; \\
+ \node [draw, "label" color=red] {D}; \\
+ \node [draw, "label" {red,draw,thick}] {E}; \\
};
\end{tikzpicture}
\end{codeexample}
@@ -2714,7 +2764,7 @@ Let us have a look at the effect of these options.
pictures at all.
\end{key}
-\begin{key}{/tikz/overlay}
+\begin{key}{/tikz/overlay=\meta{boolean} (default true)}
This option is mainly intended for use when nodes in other pictures
are referenced, but you can also use it in other situations. The
effect of this option is that everything within the current scope is
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transformations.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transformations.tex
index 95a3bc7b7fb..a02a9111430 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transformations.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transformations.tex
@@ -436,7 +436,7 @@ singular (if you do not know what singular matrices are, you are blessed).
applies the following transformation to all coordinates: Let $(x,y)$
be the coordinate to be transformed and let \meta{coordinate}
specify the point $(t_x,t_y)$. Then the new coordinate is given by
- $\left(\begin{smallmatrix} a & b \\ c & d\end{smallmatrix}\right)
+ $\left(\begin{smallmatrix} a & c \\ b & d\end{smallmatrix}\right)
\left(\begin{smallmatrix} x \\ y \end{smallmatrix}\right) +
\left(\begin{smallmatrix} t_x \\ t_y
\end{smallmatrix}\right)$. Usually, you do not use this option
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex
index 99585ce2b48..07f6784f54c 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex
@@ -772,7 +772,7 @@ quite useful to ``get to the point $(\cos 30^\circ,\sin 30^\circ)$ on
the circle.''
You can add a single |+| sign in front of a coordinate or two of
-them as in |+(1cm,0cm)| or |++(0cm,2cm)|. Such coordinates are interpreted
+them as in |+(0cm,1cm)| or |++(2cm,0cm)|. Such coordinates are interpreted
differently: The first form means ``1cm upwards from the previous
specified position'' and the second means ``2cm to the right of the
previous specified position, making this the new specified position.''
@@ -1007,7 +1007,7 @@ scope. This is useful since there is no other way of ``enlarging'' the
clipping area.
Karl has also already seen that giving options to commands like
-|\draw| apply only to that command. In turns out that the situation is
+|\draw| apply only to that command. It turns out that the situation is
slightly more complex. First, options to a command like |\draw| are
not really options to the command, but they are ``path options'' and
can be given anywhere on the path. So, instead of
@@ -1227,7 +1227,7 @@ most of the other text elements. However, Karl thinks that, though
\emph{below} a given point, he has to use the \emph{north} anchor. For
this reason, there is an option called |below|, which does the
same as |anchor=north|. Similarly, |above right| does the same as
-|anchor=south east|. In addition, |below| takes an optional
+|anchor=south west|. In addition, |below| takes an optional
dimension argument. If given, the shape will additionally be shifted
downwards by the given amount. So, |below=1pt| can be used to put
a text label below some point and, additionally shift it 1pt
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-xxcolor.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-xxcolor.tex
index dd51284cef0..603d46945b3 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-xxcolor.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-xxcolor.tex
@@ -66,7 +66,7 @@ you to provide a different image for this case. If you nest
|colormixin| environments, the different mix-ins are all appended. For
example, inside the inner environment of
the above example, |\pgfuseimage{foo}| would first check whether
-there exists an image named |foo.!50!white!25!black|.
+there exists an image named |foo.!25!white!25!black|.
\begin{command}{\colorcurrentmixin}
Expands to the current accumulated mix-in. Each nesting of a