summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.tex')
-rw-r--r--Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.tex67
1 files changed, 51 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.tex b/Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.tex
index 7db54a967a3..bbda74f0135 100644
--- a/Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.tex
+++ b/Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.tex
@@ -588,6 +588,46 @@ To decide how high a dependency should be drawn, \pkgname{} uses the formula $s\
\end{key}
+\begin{key}{/depgraph/edge height=\meta{length} (default 0pt)}
+
+ \textit{[New in version 1.2]}
+ As an alternative, |edge height| allows you to set explicitly the height of an edge.
+
+\begin{codeexample}[]
+\begin{dependency}
+ \begin{deptext}[column sep=0.2cm]
+ My \&[.5cm] dog \& also \&[.7cm] likes \&[.4cm] eating \& sausage \& and \& more \& words \\
+ \end{deptext}
+ \depedge{2}{1}{poss}
+ \depedge{4}{2}{nsubj}
+ \depedge{4}{3}{advmod}
+ \depedge{4}{5}{xcomp}
+ \depedge{5}{6}{dobj}
+ \deproot{4}{root}
+ \depedge[edge height=12ex]{9}{1}{rather-long}
+\end{dependency}
+\end{codeexample}
+
+Setting |edge height| overrides the automatic calculation of the edge height. If you set |edge height| at the |dependency| level, all edges will be drawn at the same height, e.g.:
+
+\begin{codeexample}[]
+\begin{dependency}[edge height=2cm]
+ \begin{deptext}[column sep=0.2cm]
+ My \&[.5cm] dog \& also \&[.7cm] likes \&[.4cm] eating \& sausage \& and \& more \& words \\
+ \end{deptext}
+ \depedge{2}{1}{poss}
+ \depedge{4}{2}{nsubj}
+ \depedge{4}{3}{advmod}
+ \depedge{4}{5}{xcomp}
+ \depedge{5}{6}{dobj}
+ \deproot{4}{root}
+\end{dependency}
+\end{codeexample}
+
+\noindent so maybe this is something that you will want to do only in very special cases.
+
+\end{key}
+
At this point, you may be wondering: why are we always drawing dependencies above the text? Indeed, turning links around is not only possible, but also quite easy, and the next key-value pairs allow you to control this behaviour.
\begin{keylist}{/depgraph/edge above=\meta{boolean} (default true),/depgraph/edge below=\meta{boolean} (default false)}
@@ -1497,7 +1537,7 @@ When using |fill| or |shade| with |\wordgroup|, as in the example, be aware of t
\section{\tikzname{} crash course} \label{sec:tikz}
-\textbf{Disclaimer.} \textit{I am making a lot of rough simplifications here to make it possible to explain everything in as little space as possible. Really invite to read the full version of the manual, if you haven't already. It is the only way to really appreciate the elegance and beauty of this \tikzname{} and its incredible potential.}
+\textbf{Disclaimer.} \textit{I am making a lot of rough simplifications here to make it possible to explain everything in as little space as possible. I really invite you to read the full version of the manual, if you haven't already. It is the only way to really appreciate the elegance and the full potential of \tikzname{}.}
\vspace{1cm}
@@ -1506,15 +1546,15 @@ PGF/\tikzname{} is a set of lower/higher level macros that allow you to draw ext
\subsection{\texttt{\textbackslash pgfkeys} and \texttt{\textbackslash tikzset}}
\index{key!key-value pairs}
-\tikzname{} is basically built on top of |pgfkeys|, which is a very flexible and sophisticated system to store key-value pairs. \tikzname{} (and derived packages), such as \pkgname{}, use this system for setting local or global variables, and to pass optional arguments to commands (macros) that can take a large number of configuration option.
+\tikzname{} is basically built on top of |pgfkeys|, which is a very flexible and sophisticated system to store key-value pairs. \tikzname{} (and derived packages such as \pkgname{}) use this system for setting local or global variables, and to pass optional arguments to commands (macros) that can take a large number of configuration option.
The definition of virtually all \tikzname{} macros follows the template:
\cmdname\somecommand\options\marg{first}\dots\marg{last}
-The first argument, optional, is a set of key-value pairs that can be used to set a bunch of options. It is thus possible to reduce to a minimum the number of mandatory arguments \marg{first}\dots\marg{last}, and keep macro's interface lighter and simpler to use. All commands, first parse the key-value pairs, then do what they have to do based on the updated state of the variables.
+The first argument, optional, is a set of key-value pairs that can be used to set a bunch of options. It is thus possible to reduce to a minimum the number of mandatory arguments \marg{first}\dots\marg{last}, and keep a macro's interface lighter and simpler to use. A command first parses the key-value pairs, then do what it has to do based on the updated state of these variables.
-Key names and values can contain spaces, values can be assigned via the |=| sign and commas can be used to separate assignments. Braces can be used for grouping values. So, for example, the assignment |variable one = \{a, b\}, vartwo = c| would result in |a, b| being assigned to |variable one| and |c| to |vartwo|.
+Key names and values can contain spaces, values can be assigned via the |=| sign and commas can be used to separate assignments. Curly braces can be used for grouping values. So, for example, the assignment |variable one = {a, b}, vartwo = c| would result in the set |{a, b}| being assigned to |variable one| and |c| to |vartwo|.
The function which is responsible for parsing key-value pairs is |\pgfkeys|:
@@ -1540,7 +1580,7 @@ As a convenience function, \tikzname{} also defines the following macro:
Some keys only have a name\index{key!without a value} and no value. Without going into details, it won't hurt to know that such keys are either \emph{binary}\index{key!binary} flags or one of a set of alternative options (\emph{choice} keys)\index{key!choice}, so that activating one automatically deactivates the other alternatives in the set.
-Conveniently, |\pgfkeys| also define an inheritance mechanism that allows sub-packages to consume the keys that they can understand, and then pass on to \tikzname{} all the keys that haven't been handled. This fact also makes it possible for a user to specify a key without using its fully qualified name. When introducing a key for the first time, I will always use its fully qualified name, just to make it clear where it belongs. In the examples, though, I will generally prefer to use a more compact notation and only use the ``base name'' of the keys.
+Conveniently, |\pgfkeys| also define an inheritance mechanism that allows sub-packages to consume the keys that they can understand, and then pass on to \tikzname{} all the keys that haven't been handled. This fact also makes it possible for a user to specify a key without using its fully qualified name. When introducing a key for the first time, I generally use its fully qualified name, just to make it clear where it belongs. In the examples, though, I generally prefer to use a more compact notation and only use the ``base name'' of the keys.
\subsection{Basic styling notions}
@@ -1580,8 +1620,9 @@ Let's briefly dive through the most relevant key-value pairs that can be used to
\subsubsection{Outline properties}
These describe the properties of lines. They apply to edges and to the contour of nodes (such as labels and words in the sentence)
-\begin{key}{/tikz/draw}
- This key tells tikz to actually draw the outline of a shape. If draw is not set, then the outline is not drawn. By default, outlines are not drawn.
+\begin{key}{/tikz/draw=\meta{color-spec}}
+ This key tells tikz to actually draw the outline of a shape with the given color. If draw is not set, then the outline is not drawn. By default, outlines are not drawn. \meta{color-spec} can be a color name, such as |red|, |green| or |blue|, or a more complicated expression, such as |red!60!black|, which means ``make a new color made of red for 60\% of red, of black for the rest''. Colors can be specified in many other ways, which we won't cover here.
+
\end{key}
\begin{keylist}[/tikz]{circle,ellipse,rectangle}
Selecting one of this properties allows you to use a different shape to draw a node. When |draw| is selected, by default the node will be drawn as a |rectangle|.
@@ -1592,26 +1633,20 @@ These describe the properties of lines. They apply to edges and to the contour o
\begin{keylist}[/tikz]{very thin,thin,thick,very thick}
Can be used to set the width of a line. |thin| is the default value (corresponding to |0.4pt|).
\end{keylist}
-\begin{key}{/tikz/color=\meta{color-spec}}
- Sets the color used to draw the line. \meta{color-spec} can be a color name, such as |red|, |green| or |blue|, or a more complicated expression, such as |red!60!black|, which means ``make a new color made of red for 60\% of red, of black for the rest''. Colors can be specified in many other ways, which we won't cover here.
-\end{key}
\begin{keylist}[/tikz]{solid,dotted,loosely dotted,densely dotted,dashed,loosely dashed,densely dashed}
Set the kind of line to be used to draw the outline. |solid| is the default (i.e. a continuous line).
\end{keylist}
\subsubsection{Area properties}
These describe the properties of areas. They apply to the background of nodes (such as labels, words in the sentence and word groups).
-\begin{key}{/tikz/fill=\meta{color}}
+\begin{key}{/tikz/fill=\meta{color-spec}}
This key tells tikz to fill the inside of a shape (or a node) with a solid color. Color specification is the same as for |/tikz/draw|.
\end{key}
\begin{key}{/tikz/shade}
Instead of filling the area with a solid color, fill it with a gradient.
\end{key}
-\begin{keylist}[/tikz]{top color=\meta{color},bottom color=\meta{color}}
- If |shade| is set, you can use these two keys to set up a vertical gradient.
-\end{keylist}
-\begin{keylist}[/tikz]{left color=\meta{color},right color=\meta{color}}
- If |shade| is set, you can use these two keys to set up a horizontal gradient.
+\begin{keylist}[/tikz]{top color=\meta{color-spec},bottom color=\meta{color-spec},left color=\meta{color-spec},right color=\meta{color-spec}}
+ Use these two keys to set up either a vertical or an horizontal gradient. Setting any of these properties automatically activates |shade|.
\end{keylist}
\begin{key}{/tikz/inner sep=\meta{length}}
This parameter controls the distance between the outline of a node and its contents (e.g., the text inside the node).