summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tikz-dependency
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-01-19 22:48:11 +0000
committerKarl Berry <karl@freefriends.org>2012-01-19 22:48:11 +0000
commit2648c52105e48119c27762f885fefa29d172b38b (patch)
tree34f9f129b25f6b1da52142a27fc3dd408b31acae /Master/texmf-dist/doc/latex/tikz-dependency
parent0588a0a5e407004b82011594c3bf7fde2a003f71 (diff)
tikz-dependency 1.1 (19jan12)
git-svn-id: svn://tug.org/texlive/trunk@25156 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/tikz-dependency')
-rw-r--r--Master/texmf-dist/doc/latex/tikz-dependency/README38
-rw-r--r--Master/texmf-dist/doc/latex/tikz-dependency/VERSION1
-rw-r--r--Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.pdfbin637292 -> 723117 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tikz-dependency/tikz-dependency-doc.tex328
4 files changed, 341 insertions, 26 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-dependency/README b/Master/texmf-dist/doc/latex/tikz-dependency/README
index 1de8cf23449..20272804669 100644
--- a/Master/texmf-dist/doc/latex/tikz-dependency/README
+++ b/Master/texmf-dist/doc/latex/tikz-dependency/README
@@ -1,15 +1,41 @@
-------------------------------------------------------
-TikZ-dependency -- A library to draw dependency graphs
-------------------------------------------------------
+**TikZ-dependency** -- A library to draw dependency graphs
+==========================================================
TikZ-dependency allows you to draw dependency graphs with little or
no effort. It also comes with a lot of styling facilities, to let you
personalize the look and feel of the graphs at your liking.
-Read the documentation in tikz-dependency-doc.pdf for installation and
-usage instructions.
+The package has a very easy to learn, high level interface that can be
+used to draw simple dependency trees, complex non projective graphs,
+bubble parses, and in general any kind of graph which is based on a
+sequence of nodes and edges among these.
-Licensing information is in the LICENSE file.
+Read the documentation in
+
+> tikz-dependency-doc.pdf
+
+for installation and usage instructions.
+
+Licensing information is in the file
+
+> LICENSE
Do not hesistate to contact me for comments, bug reports or
feature requests. Thanks for using tikz-dependency!
+
+Changelog
+---------
+
+* **Version 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, ACL-HLT 2008]
+ - Added instructions to draw bubble parses
+ - Fixed bug that would cause groupedges not to be straight under some circumstances
+
+* **Version 1.0** (Nov 26, 2011)
+
+ - First public release
+
diff --git a/Master/texmf-dist/doc/latex/tikz-dependency/VERSION b/Master/texmf-dist/doc/latex/tikz-dependency/VERSION
new file mode 100644
index 00000000000..9459d4ba2a0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-dependency/VERSION
@@ -0,0 +1 @@
+1.1
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 03275941f39..c1da36bf12f 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 feb85e73e71..7db54a967a3 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
@@ -18,7 +18,7 @@
\usepackage{hyperref}
\hypersetup{%
- pdftitle={The tikz-dependency package},
+ pdftitle={The tikz-dependency package v2.0},
pdfsubject={A latex package based on tikz to draw dependency graphs},
pdfauthor={Daniele Pighin},
pdfkeywords={dependency parses, latex, tikz, pgf},
@@ -58,6 +58,7 @@
\title{The \pkgname{} package}
\author{\normalsize Daniele Pighin\\\footnotesize{\href{mailto:daniele.pighin@gmail.com}{\texttt{daniele.pighin@gmail.com}}}\\\footnotesize{\url{http://danielepighin.net/cms}}}
+\date{Version 1.1, January 2012}
\makeatletter
\definecolor{graphicbackground}{rgb}{0.96,0.96,0.8}
@@ -78,6 +79,7 @@ If your work is in any way connected with linguistics or natural
language processing, chances are high that the moment will come when you will have
to draw a dependency graph:
\begin{center}
+\resizebox{\linewidth}{!}{
{\pipeescape%
\begin{dependency}[label style={font=\bfseries,fill=black,text=white}]
\tikzstyle{root}=[fill=yellow, text=black, font=\bfseries]
@@ -100,19 +102,48 @@ to draw a dependency graph:
\groupedge[edge below,red!60!black,label style={rolelab=red}]{pred}{a0}{ARG0}{5ex}
\groupedge[edge below,blue!60!black,label style={rolelab=blue}]{pred}{a1}{ARG1}{5ex}
\end{dependency}%
-}
+} % pipeescape
+\quad
+\begin{dependency}[theme = simple]
+ \begin{deptext}[column sep=1em]
+ A \& hearing \& is \& scheduled \& on \& the \& issue \& today \& . \\
+ \end{deptext}
+ \deproot{3}{ROOT}
+ \depedge{2}{1}{ATT}
+ \depedge[edge start x offset=-6pt]{2}{5}{ATT}
+ \depedge{3}{2}{SBJ}
+ \depedge{3}{9}{PU}
+ \depedge{3}{4}{VC}
+ \depedge{4}{8}{TMP}
+ \depedge{5}{7}{PC}
+ \depedge[arc angle=50]{7}{6}{ATT}
+ \end{dependency}
+} % resizebox
\end{center}
-\tikzname{} already has all the needed facilities to draw and style a dependency
-graph, but diving into the documentation just to understand how to draw one or two
-trees may turn out to be rather overwhelming.
-
-\pkgname{} is pretty flexible, and it can easily be used to draw quite complex graphs around sequences
-of words, not necessarily related to dependency parsing, as shown by the following fancier examples.
-
-
\begin{center}
-{\pipeescape%
+\resizebox{\linewidth}{!}{%
+\depstyle{inner bubble}{draw=gray!80, minimum height=20pt, rounded corners=8pt, inner sep=2pt, top color=gray!40, bottom color=white}
+\depstyle{outer bubble}{draw=gray!80, minimum height=26pt, rounded corners=10pt, inner sep=5pt, top color=white, bottom color=gray!40}
+\depstyle{ungrammatical}{edge below, edge style = {ultra thick, red}, label style = {below, text=red}, text only label}
+\begin{dependency}[hide label, arc edge,
+ edge vertical padding=-2pt,
+ group style=outer bubble]
+ \begin{deptext}[column sep=1.4em]
+ a \& student \& whose \& mother \& and \& his \& father \& peter \& knows \\
+ \end{deptext}
+ \wordgroup{1}{3}{7}{chubby}
+ \wordgroup{1}{1}{2}{first} \depedge{2}{1}{}
+ \wordgroup[inner bubble]{1}{3}{4}{second} \depedge{4}{3}{}
+ \wordgroup[inner bubble]{1}{6}{7}{third} \depedge{7}{6}{}
+ \wordgroup{1}{8}{8}{fourth}
+ \wordgroup{1}{9}{9}{fifth}
+ \groupedge{fifth}{fourth}{}{0}
+ \groupedge[ungrammatical]{first}{second}{ungrammatical}{.5cm}
+ \groupedge[edge above]{second}{fifth}{}{1.5cm}
+ \groupedge[edge above]{fifth}{chubby}{}{1cm}
+\end{dependency}%
+\quad%
\begin{dependency}[edge style={green!60!black,very thick},
label style={fill=blue!60,font=\bfseries,text=white}]
\tikzstyle{POS}=[font=\footnotesize\bfseries,text=blue!60!black]
@@ -121,8 +152,12 @@ of words, not necessarily related to dependency parsing, as shown by the followi
font=\normalsize, top color=blue!60, rounded corners]
\begin{deptext}[column sep=.5cm, row sep=0, nodes={POS}]
PRP\$ \& NN \& RB \&[.5cm] VBZ \& VBG \& NN \\
- |[word]| My \& |[word]| dog \& |[word]| also \&
- |[word]| likes \& |[word]| eating \& |[word]| sausage \\
+ \node [word] {My}; \&
+ \node [word] {dog}; \&
+ \node [word] {also}; \&
+ \node [word] {likes}; \&
+ \node [word] {eating}; \&
+ \node [word] {sausage}; \\
\end{deptext}
\deproot{4}{root}
\depedge[edge style={blue!60!black,ultra thick},
@@ -132,8 +167,17 @@ of words, not necessarily related to dependency parsing, as shown by the followi
\depedge{4}{5}{xcomp}
\depedge{5}{6}{dobj}
\end{dependency}%
-}
+} %resizebox
+\end{center}
+
+\tikzname{} already has all the needed facilities to draw and style a dependency
+graph, but diving into the documentation just to understand how to draw one or two
+trees may turn out to be rather overwhelming.
+\pkgname{} is pretty flexible, and it can easily be used to draw quite complex graphs around sequences
+of tokens, not necessarily related to dependency parsing or to language, as shown in this useless toy example:
+
+\begin{center}
{\pipeescape
\begin{dependency}
\tikzstyle{default}=[fill=white, draw=black, text = blue, solid]
@@ -164,10 +208,16 @@ dependency graph without too much \tikzname{} prior knowledge.
It will also allow you to draw cute graphs, which won't increase your impact
factor but may help making your papers look more pleasant and elegant.
+\thispagestyle{empty}
+
\newpage
\tableofcontents
+\thispagestyle{empty}
+
+\newpage
+
\section{Installation}\label{sec:installation}
The simplest and fastest way to get things working is to copy the style file
@@ -193,7 +243,7 @@ $ texhash texmf
\end{codeexample}
That should do it. Refer to \LaTeX\ documentation for more details or in case of non-standard \LaTeX{} installations.
-Please, not that PGF/\tikzname{} version 2.10 is required for \pkgname{} to work as expected.
+Please, note that PGF/\tikzname{} version 2.10 is required for \pkgname{} to work as expected.
If \tikzname{} is not installed on your system, you can easily install it in the same way.
Visit \url{http://sourceforge.net/projects/pgf/} with your favorite browser, download the latest version of the package and uncompress in some of the directories searched by \LaTeX{}. The |texmf| directory under your home directory should be a good place to start:
@@ -716,6 +766,121 @@ It may be worth repeating that even though you will generally want to set this p
\end{dependency}
\end{codeexample}
+\begin{keylist}[/depgraph]{arc edge=\meta{boolean} (default false),segmented edge=\meta{boolean} (default true)}
+ This key allows you to switch between the default, fancier edge shape (|/depgraph/segmented edge|) and the traditional arc-shaped edges used in dependency parsing literature. Can be used either within |dependency| (affect all the edges in the graph) or individual |\depedge| commands. Local overrides are also possible (as shown in the rightmost example).
+\begin{codeexample}[]
+\begin{dependency}[arc edge]
+ \begin{deptext}[column sep=.7cm]
+ My \& dog \& also \& likes \& eating \\
+ PRP\$ \& NN \& RB \& VBZ \& VBG \\
+ \end{deptext}
+ \deproot{4}{root}
+ \depedge{2}{1}{poss}
+ \depedge{4}{2}{nsubj}
+ \depedge{4}{3}{advmod}
+ \depedge{4}{5}{xcomp}
+\end{dependency}
+\quad
+\begin{dependency}[segmented edge]
+ \begin{deptext}[column sep=.7cm]
+ My \& dog \& also \&[.2cm] likes \& eating \\
+ PRP\$ \& NN \& RB \& VBZ \& VBG \\
+ \end{deptext}
+ \deproot{4}{root}
+ \depedge{2}{1}{poss}
+ \depedge[arc edge]{4}{2}{nsubj}
+ \depedge{4}{3}{advmod}
+ \depedge{4}{5}{xcomp}
+\end{dependency}
+\end{codeexample}
+\end{keylist}
+
+\begin{key}{/depgraph/arc angle=\meta{decimal} (default 60)}
+ When using |/depgraph/arc edge|, this key controls the angle with which edges enter and exit the nodes. It has no effect when the edge is drawn using |/depgraph/segmented edge|.
+\begin{codeexample}[]
+\begin{dependency}[arc edge, arc angle=80]
+ \begin{deptext}[column sep=.7cm]
+ My \& dog \& also \& likes \& eating \\
+ PRP\$ \& NN \& RB \& VBZ \& VBG \\
+ \end{deptext}
+ \deproot{4}{root}
+ \depedge{2}{1}{poss}
+ \depedge{4}{2}{nsubj}
+ \depedge{4}{3}{advmod}
+ \depedge{4}{5}{xcomp}
+\end{dependency}
+\quad
+\begin{dependency}[arc edge, arc angle = 40]
+ \begin{deptext}[column sep=.7cm]
+ My \& dog \& also \&[.2cm] likes \& eating \\
+ PRP\$ \& NN \& RB \& VBZ \& VBG \\
+ \end{deptext}
+ \deproot{4}{root}
+ \depedge{2}{1}{poss}
+ \depedge{4}{2}{nsubj}
+ \depedge{4}{3}{advmod}
+ \depedge{4}{5}{xcomp}
+\end{dependency}
+\end{codeexample}
+\end{key}
+
+\begin{key}{/depgraph/text only label=\meta{boolean} (default false)}
+ At least in my opinion, heavily drawn and filled labels don't look very well with |arc edge|. This flag allows you to show only the text of the label, without drawing the node around it. To prevent the label to be drawn just over the edge line, you may want to add either |above| or |below| to the |label style|, as in this example:
+\begin{codeexample}[]
+ \begin{dependency}[arc edge, arc angle=80, text only label, label style={above}]
+ \begin{deptext}[column sep=.7cm]
+ My \& dog \& also \& likes \& eating \\
+ PRP\$ \& NN \& RB \& VBZ \& VBG \\
+ \end{deptext}
+ \deproot{4}{root}
+ \depedge{2}{1}{poss}
+ \depedge{4}{2}{nsubj}
+ \depedge[label style={below}]{4}{3}{advmod}
+ \depedge{4}{5}{xcomp}
+\end{dependency}
+\end{codeexample}
+\end{key}
+
+\begin{keylist}[/depgraph]{edge start offset x=\meta{length} (default 0),edge end offset x=\meta{length} (default 0)}
+ When using arc edges, some edges may overlap as in the following example:
+\begin{codeexample}[]
+\begin{dependency}[theme = simple]
+ \begin{deptext}[column sep=1em]
+ A \& hearing \& is \& scheduled \& on \& the \& issue \& today \& . \\
+ \end{deptext}
+ \deproot{3}{ROOT}
+ \depedge{2}{1}{ATT}
+ \depedge{2}{5}{ATT}
+ \depedge{3}{2}{SBJ}
+ \depedge{3}{9}{PU}
+ \depedge{3}{4}{VC}
+ \depedge{4}{8}{TMP}
+ \depedge{5}{7}{PC}
+ \depedge[arc angle=50]{7}{6}{ATT}
+\end{dependency}
+\end{codeexample}
+
+These two keys allow you to shift the start/end point of the edge horizontally by the specified amount, so as to untangle the graph:
+
+\begin{codeexample}[]
+\begin{dependency}[theme = simple]
+ \begin{deptext}[column sep=1em]
+ A \& hearing \& is \& scheduled \& on \& the \& issue \& today \& . \\
+ \end{deptext}
+ \deproot{3}{ROOT}
+ \depedge{2}{1}{ATT}
+ \depedge[edge start x offset=-6pt]{2}{5}{ATT}
+ \depedge{3}{2}{SBJ}
+ \depedge{3}{9}{PU}
+ \depedge{3}{4}{VC}
+ \depedge{4}{8}{TMP}
+ \depedge{5}{7}{PC}
+ \depedge[arc angle=50]{7}{6}{ATT}
+\end{dependency}
+\end{codeexample}
+
+\end{keylist}
+
\section{Node groups and group linking}
Another thing that you may want to do is to annotate relations between groups of nodes. I added this functionality thinking about semantic parsing, so that it would be possible to annotate on the same graph the syntactic and semantic layers of a sentence. You can think of many other ways of exploiting the functionality and use it for your own specific needs. Two new commands can be used to define word groups and to connect them.
@@ -778,10 +943,26 @@ This section covers the ways in which you can customize the look of the building
\index{themes}\index{theming}The simplest way to change the look and feel of your dependency graphs is to use a pre-defined \emph{theme}.
-\begin{key}{/depgraph/theme=\meta{theme name} (default \{\})}
- By passing this option to |dependency|, you can completely change the appearence of the graphs. At the moment of writing, the following five themes have been defined: |night|, |brazil|, |grassy|, |iron|, |copper|. They look like this:
+\begin{key}{/depgraph/theme=\meta{theme name} (default default)}
+ By passing this option to |dependency|, you can completely change the appearence of the graphs. At the moment of writing, the following five themes have been defined: |default|, |simple|, |night|, |brazil|, |grassy|, |iron|, |copper|. They look like this:
+
\begin{codeexample}[]
-\begin{dependency}
+\begin{dependency}[theme=default]
+ \begin{deptext}[column sep=.5cm, row sep=.1ex]
+ PRP\$ \& NN \& RB \&[.5cm] VBZ \& VBG \& NN \\
+ My \& dog \& also \& likes \& eating \& sausage \\
+ \end{deptext}
+ \deproot{4}{root}
+ \depedge{2}{1}{poss}
+ \depedge{4}{2}{nsubj}
+ \depedge{4}{3}{advmod}
+ \depedge{4}{5}{xcomp}
+ \depedge{5}{6}{dobj}
+\end{dependency}
+\end{codeexample}
+
+\begin{codeexample}[]
+\begin{dependency}[theme=simple]
\begin{deptext}[column sep=.5cm, row sep=.1ex]
PRP\$ \& NN \& RB \&[.5cm] VBZ \& VBG \& NN \\
My \& dog \& also \& likes \& eating \& sausage \\
@@ -871,7 +1052,7 @@ This section covers the ways in which you can customize the look of the building
\end{codeexample}
\end{key}
-\begin{keylist}[/depgraph]{edge theme,label theme,text theme}
+\begin{keylist}[/depgraph]{edge theme=\meta{theme name} (default default),label theme=\meta{theme name} (default default),text theme=\meta{theme name} (default default)}
Each of the aforementioned themes is actually a combination of three themes with the same name: one for edges, one for edge labels and one for the sentence text. These three themes can also be applied independently. So, for example, you could apply the |iron| theme globally and then use |copper| to draw the labels:
\begin{codeexample}[]
\begin{dependency}[theme=iron, label theme=copper]
@@ -907,7 +1088,7 @@ Edges and labels can be styled locally, by passing the desired |theme|, |label t
\subsection{Styling elements individually}
-\begin{keylist}{/depgraph/hide label,/depgraph/show label}
+\begin{keylist}{/depgraph/hide label=\meta{boolean} (default false),/depgraph/show label=\meta{boolean} (default true)}
By default, all labels are visible. Add |hide label| to the \options{} of |\depedge| or |\groupedge| to prevent the bounding box and the text of the label to be drawn.
\begin{codeexample}[]
\begin{dependency}
@@ -1105,6 +1286,35 @@ The style can be overridden on a per-node basis, by using a special syntax under
When using this syntax, you should always consider that the |nodes| style is in any case applied to \emph{every node} in the |matrix|, then the style specified for each node (if any) is appended. This fact has the subtle implication that all the nodes inherit all the properties set via |nodes|, and per-node styles must explicitly overwrite all the properties that they don't need to use. As a rule of thumb, you should use |nodes| to set properties that all the nodes will share, and then use per-node options to add or override options.
\end{stylekey}
+\subsection{Defining your own styles}
+
+\begin{command}{\depstyle\marg{style-name}\marg{style-definition}}
+
+ Defining your own styles is a convenient way of using a consistent look for all your graphs across a document, at the same time avoiding a lot of unnecessary typing. |\depstyle| is a wrapper around |\tikzset| (see Section~\ref{sec:tikz}) with the advantage that you do not have to prepend |/depgraph| to all the styling keys that are defined by \pkgname{}. |\depstyle| automatically forwards to \tikzname{} all the keys that it does not how to handle.
+
+ In the following example I will define and use two styles. The first style results in thick blue edges, labels with a thick red outline, blue text and white background; the second style also uses a predefined themes.
+
+\begin{codeexample}[]
+\depstyle{red and blue}{edge style = {thick, blue},
+ label style = {thick, draw=red, text=blue, fill=white}}
+\depstyle{collage}{edge theme = grassy, label style={draw=orange,trapezium}}
+\begin{dependency}[red and blue]
+ \begin{deptext}[column sep=.5cm, row sep=.5ex]
+ PRP\$ \& NN \& RB \&[.5cm] VBZ \&[.2cm] VBG \& NN \\
+ My \& dog \& also \& likes \& eating \& sausage \\
+ \end{deptext}
+ \deproot{4}{root}
+ \depedge{2}{1}{poss}
+ \depedge{4}{2}{nsubj}
+ \depedge{4}{3}{advmod}
+ \depedge[collage]{4}{5}{xcomp}
+ \depedge[collage]{5}{6}{dobj}
+\end{dependency}
+\end{codeexample}
+
+Note how the labels in the style |collage| inherit the background and the text color of |red and blue| labels. This happens because the |red and blue| style is applied at the |dependency| level, meaning that it is applied to all the labels. Then, the |collage| style is applied to the labels of the last two edges. Since this style only overrides the color of the outline (|draw|), all the other properties are inherited from |red and blue|.
+\end{command}
+
\section{Interaction with \tikzname{}}
Some function make it possible to reference the nodes in the graph so that it is easier to extend the graph with \tikzname{} drawing capabilities. Understanding what is going on here requires at least some basic knowledge of how to draw nodes and paths in \tikzname{}.
@@ -1208,6 +1418,81 @@ Some function make it possible to reference the nodes in the graph so that it is
\end{codeexample}
\end{commandlist}
+\section{Answers to frequent or interesting questions}
+
+This section shows practical examples of how to achieve specific results with \pkgname{} that may not seem that obvious.
+
+\subsection{How do I change the shape of label nodes?}
+
+By default, \pkgname{} uses \tikzname{}'s |rounded corners| shape to draw the labels, but you can use every shape that you want. By default, \tikzname{} defines the |rectangle|, |rounded corners| and |circle| shapes. More shapes are available via the |shapes| library, which \pkgname{} already loads for you. As always, for more information you can refer to \tikzname{} manual.
+
+To change the shape of labels, you simply add the shape name to, |edge style|, as in the following examples:
+
+\begin{codeexample}[]
+\begin{dependency}[label style = {circle}]
+ \begin{deptext}[column sep=.5cm, row sep=.1ex]
+ PRP\$ \& NN \& RB \&[.5cm] VBZ \\
+ My \& dog \& also \& likes \& \dots \\
+ \end{deptext}
+ \deproot{4}{root}
+ \depedge{2}{1}{poss}
+ \depedge{4}{2}{nsubj}
+ \depedge{4}{3}{advmod}
+\end{dependency}
+\qquad
+\begin{dependency}[label style = {trapezium}]
+ \begin{deptext}[column sep=.5cm, row sep=.1ex]
+ PRP\$ \& NN \& RB \&[.5cm] VBZ \\
+ My \& dog \& also \& likes \& \dots \\
+ \end{deptext}
+ \deproot[label style = {star}]{4}{root}
+ \depedge{2}{1}{poss}
+ \depedge{4}{2}{nsubj}
+ \depedge{4}{3}{advmod}
+\end{dependency}
+\end{codeexample}
+
+\subsection{How do I draw bubble parses?}
+
+Until a user of \pkgname{} asked me how to draw them, I was not even aware that these things existed. Anyway, it turns out that is quite simple to draw bubble parses with \pkgname{}, and that |\wordgroup| is basically all you need.
+
+Until I or someone else writes some facilities to explicitly support these beauties, you will have to take care of the details explicitly. What you have to do is:
+\begin{itemize}
+ \item use |\wordgroup| to create bubbles;
+ \item use |inner sep| and |minimum height| with |group style| to create bubbles of the desired size;
+ \item increase the values of |inner sep| and |minimum height| for more external bubbles;
+ \item use |\groupedge| to create edges between bubbles.
+\end{itemize}
+\noindent The follow example should give you a good starting point:
+
+\begin{codeexample}[]
+\depstyle{inner bubble}{draw=gray!80, minimum height=20pt, rounded corners=8pt,
+ inner sep=2pt, top color=gray!40, bottom color=white}
+\depstyle{outer bubble}{draw=gray!80, minimum height=26pt, rounded corners=10pt,
+ inner sep=5pt, top color=white, bottom color=gray!40}
+\depstyle{ungrammatical}{edge below, edge style = {ultra thick, red},
+ label style = {below, text=red}, text only label}
+\begin{dependency}[hide label, arc edge,
+ edge vertical padding=-2pt,
+ group style=outer bubble]
+ \begin{deptext}[column sep=1.4em]
+ a \& student \& whose \& mother \& and \& his \& father \& peter \& knows \\
+ \end{deptext}
+ \wordgroup{1}{3}{7}{chubby}
+ \wordgroup{1}{1}{2}{first} \depedge{2}{1}{}
+ \wordgroup[inner bubble]{1}{3}{4}{second} \depedge{4}{3}{}
+ \wordgroup[inner bubble]{1}{6}{7}{third} \depedge{7}{6}{}
+ \wordgroup{1}{8}{8}{fourth}
+ \wordgroup{1}{9}{9}{fifth}
+ \groupedge{fifth}{fourth}{}{0}
+ \groupedge[ungrammatical]{first}{second}{ungrammatical}{.5cm}
+ \groupedge[edge above]{second}{fifth}{}{1.5cm}
+ \groupedge[edge above]{fifth}{chubby}{}{1cm}
+\end{dependency}%
+\end{codeexample}
+
+When using |fill| or |shade| with |\wordgroup|, as in the example, be aware of the fact that the nodes are drawn in the order that you write them down. For this reason, larger bubbles should always be drawn first, and the contained bubbles afterwards. Otherwise, the inner bubbles will be covered by the outer one.
+
\appendix
\section{\tikzname{} crash course} \label{sec:tikz}
@@ -1331,6 +1616,9 @@ These describe the properties of areas. They apply to the background of nodes (s
\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).
\end{key}
+\begin{keylist}[/tikz]{minimum height=\meta{length},minimum width=\meta{length}}
+ By default, the size of a node is determined based on its content, i.e., it is just as big as to fit what's inside (plus padding and spacing, e.g., |inner sep|). By setting these keys, you can force a node to be at least as tall and/or wide as requested.
+\end{keylist}
\subsubsection{Text properties}
These describe the properties of text boxes. They apply to the text of the sentence (the rows if the |matrix| wrapped by |deptext|) and to labels.