summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-11-07 22:15:00 +0000
committerKarl Berry <karl@freefriends.org>2016-11-07 22:15:00 +0000
commit04c0ffa1bcffa7a3b017387a190029feaf04a340 (patch)
tree0d9afaf6de0a0d0bfbe6f85892a1011d55ce6385
parent293604ad265c7c828f4f9183844ed5e6647c2b84 (diff)
tikz-dependency (7nov16)
git-svn-id: svn://tug.org/texlive/trunk@42454 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/tikz-dependency/README6
-rw-r--r--Master/texmf-dist/doc/latex/tikz-dependency/VERSION2
-rw-r--r--Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.pdfbin723117 -> 732387 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.tex67
-rw-r--r--Master/texmf-dist/tex/latex/tikz-dependency/pgfmanual.code.tex (renamed from Master/texmf-dist/doc/latex/tikz-dependency/pgfmanual.code.tex)0
-rw-r--r--Master/texmf-dist/tex/latex/tikz-dependency/pgfmanual.pdflinks.code.tex (renamed from Master/texmf-dist/doc/latex/tikz-dependency/pgfmanual.pdflinks.code.tex)0
-rw-r--r--Master/texmf-dist/tex/latex/tikz-dependency/pgfmanual.prettyprinter.code.tex (renamed from Master/texmf-dist/doc/latex/tikz-dependency/pgfmanual.prettyprinter.code.tex)0
-rw-r--r--Master/texmf-dist/tex/latex/tikz-dependency/tikz-dependency.sty28
8 files changed, 80 insertions, 23 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-dependency/README b/Master/texmf-dist/doc/latex/tikz-dependency/README
index 20272804669..12e1bb07fcf 100644
--- a/Master/texmf-dist/doc/latex/tikz-dependency/README
+++ b/Master/texmf-dist/doc/latex/tikz-dependency/README
@@ -26,6 +26,12 @@ feature requests. Thanks for using tikz-dependency!
Changelog
---------
+* **Version 1.2** (Jul 5, 2012)
+
+ - Added "edge height" to override the behavior of the edge-drawing algorithm and explicitly set
+ the height of an edge
+ - Incorporated patch by Tetsuo Kiso that fixes error in the handling of "edge end offset x"
+
* **Version 1.1** (Jan 17, 2012)
- Added the possibility to use simple arcs as edges (keys: "arc edge"/"segmented edge")
diff --git a/Master/texmf-dist/doc/latex/tikz-dependency/VERSION b/Master/texmf-dist/doc/latex/tikz-dependency/VERSION
index 9459d4ba2a0..5625e59da88 100644
--- a/Master/texmf-dist/doc/latex/tikz-dependency/VERSION
+++ b/Master/texmf-dist/doc/latex/tikz-dependency/VERSION
@@ -1 +1 @@
-1.1
+1.2
diff --git a/Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.pdf b/Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.pdf
index c1da36bf12f..df006468028 100644
--- a/Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.pdf
+++ b/Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.pdf
Binary files differ
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).
diff --git a/Master/texmf-dist/doc/latex/tikz-dependency/pgfmanual.code.tex b/Master/texmf-dist/tex/latex/tikz-dependency/pgfmanual.code.tex
index 0160878cb99..0160878cb99 100644
--- a/Master/texmf-dist/doc/latex/tikz-dependency/pgfmanual.code.tex
+++ b/Master/texmf-dist/tex/latex/tikz-dependency/pgfmanual.code.tex
diff --git a/Master/texmf-dist/doc/latex/tikz-dependency/pgfmanual.pdflinks.code.tex b/Master/texmf-dist/tex/latex/tikz-dependency/pgfmanual.pdflinks.code.tex
index e507d30e85c..e507d30e85c 100644
--- a/Master/texmf-dist/doc/latex/tikz-dependency/pgfmanual.pdflinks.code.tex
+++ b/Master/texmf-dist/tex/latex/tikz-dependency/pgfmanual.pdflinks.code.tex
diff --git a/Master/texmf-dist/doc/latex/tikz-dependency/pgfmanual.prettyprinter.code.tex b/Master/texmf-dist/tex/latex/tikz-dependency/pgfmanual.prettyprinter.code.tex
index 85482fedaaf..85482fedaaf 100644
--- a/Master/texmf-dist/doc/latex/tikz-dependency/pgfmanual.prettyprinter.code.tex
+++ b/Master/texmf-dist/tex/latex/tikz-dependency/pgfmanual.prettyprinter.code.tex
diff --git a/Master/texmf-dist/tex/latex/tikz-dependency/tikz-dependency.sty b/Master/texmf-dist/tex/latex/tikz-dependency/tikz-dependency.sty
index 4e57109f8de..bd2022398a3 100644
--- a/Master/texmf-dist/tex/latex/tikz-dependency/tikz-dependency.sty
+++ b/Master/texmf-dist/tex/latex/tikz-dependency/tikz-dependency.sty
@@ -9,11 +9,15 @@
%
% Changelog
%
+% 1.2 (Nov 3, 2016)
+% - It's been a while :) Integrated a patch submitted by Jan Strunk <jan.strunk@uni-koeln.de>
+% (thanks a lot Jan!) fixing a bug with the behavior of "edge end x offset".
+%
% 1.1 (Jan 17, 2012)
% - Added the possibility to use simple arcs as edges (keys: arc edge/segmented edge)
% - Added "edge start x offset" and "edge end x offset" to fine tune edge start/end point position
% - Added \depstyle to define styles more easily
-% - Added "simple" theme, based on the parse on page 1 of [Nivre and McDonald, 2008 ACL-HLT]
+% - Added "simple" theme, based on the parse on page 1 of [Nivre and McDonald, 2008 ACL-HLT]
% - Added instructions to draw bubble parses
% - Fixed bug that would cause groupedges not to be straight under some circumstances;
%
@@ -37,6 +41,9 @@
/depgraph/.search also = {/tikz},
dep id/.code = {\def\dt@depid{#1}},
dep id = dependency,
+ % fix the distance of the edge
+ edge height/.code = {\pgfmathsetlengthmacro{\dt@linkheight}{#1}},
+ edge height = 0pt,
% the distant of the horizontal line of the edge style for two adjacent words
edge unit distance/.code = {\pgfmathsetlengthmacro{\dt@linkstep}{#1}},
edge unit distance = 3ex,
@@ -179,7 +186,12 @@
\def\anchorpoint{south}
\fi
\def\source{\dt@depid-\dt@tgtlayer-#2}
- \pgfmathsetmacro{\distance}{\dt@linkstep * 4}
+
+ \ifdim\dt@linkheight=0pt
+ \pgfmathsetmacro{\distance}{\dt@linkstep * 4}
+ \else
+ \pgfmathsetlengthmacro{\distance}{\dt@linkheight}
+ \fi
\pgfmathsetlengthmacro{\dt@startdist}{\dt@linkdist}
\ifdt@linkbelow
\pgfmathsetmacro{\distance}{-(\dt@linkstep * 4)}
@@ -199,7 +211,11 @@
\def\source{\wordref{\dt@tgtlayer}{#2}}
\def\dest{\wordref{\dt@tgtlayer}{#3}}
\def\depname{#4}
- \pgfmathsetlengthmacro{\distance}{abs(\offb - \offa)*\dt@linkstep}
+ \ifdim\dt@linkheight=0pt
+ \pgfmathsetlengthmacro{\distance}{abs(\offb - \offa)*\dt@linkstep}
+ \else
+ \pgfmathsetlengthmacro{\distance}{\dt@linkheight}
+ \fi
\groupedge[#1]{\source}{\dest}{\depname}{\distance}
\end{scope}}
@@ -263,9 +279,9 @@
% meaningful for segmented edge, but we also draw the nodes for arc edge, someone
% may always find these anchors useful...
\node (\dt@lastlabel-edge-origin) [coordinate] at ($(#2.\anchorpoint) + (\doff,\dt@startdist) + (\dt@EdgeStartOffsetX,0)$) {};
- \node (\dt@lastlabel-edge-first-corner) [coordinate] at ($(\dt@lastlabel-edge-origin) + (\dslant,\dt@enddist) + (\dt@EdgeEndOffsetX,0)$) {};
- \node (\dt@lastlabel-edge-second-corner) [coordinate] at ($(#3.\anchorpoint) + (-\dslant,\dt@enddist+\dt@startdist+\ydiff)$) {};
- \node (\dt@lastlabel-edge-endpoint) [coordinate] at ($(#3.\anchorpoint) + (0,\dt@startdist)$) {};
+ \node (\dt@lastlabel-edge-first-corner) [coordinate] at ($(\dt@lastlabel-edge-origin) + (\dslant,\dt@enddist)$) {};
+ \node (\dt@lastlabel-edge-second-corner) [coordinate] at ($(#3.\anchorpoint) + (\dt@EdgeEndOffsetX,0) + (-\dslant,\dt@enddist+\dt@startdist+\ydiff)$) {};
+ \node (\dt@lastlabel-edge-endpoint) [coordinate] at ($(#3.\anchorpoint) + (0,\dt@startdist) + (\dt@EdgeEndOffsetX,0)$) {};
\ifdt@arcedge
% link above, left to right