summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-er.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-er.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-er.tex63
1 files changed, 34 insertions, 29 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-er.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-er.tex
index 174bfd98d13..b3503a60108 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-er.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-er.tex
@@ -24,8 +24,7 @@ saying |rectangle,draw| makes the code more expressive.
The package defines a simple style for drawing entities:
-\begin{itemize}
- \itemstyle{entity}
+\begin{stylekey}{/tikz/entity}
This style is to be used with nodes that represent entity types. It
causes the node's shape to be set to a rectangle that is drawn and
whose minimum size and width are set to sensible values.
@@ -37,23 +36,24 @@ The package defines a simple style for drawing entities:
programming). If this bothers you, feel free to define a style
|entity type| instead.
\begin{codeexample}[]
-\begin{tikzpicture}[node distance=2cm]
+\begin{tikzpicture}
\node[entity] (sheep) {Sheep};
- \node[entity] (genome) [right of=sheep] {Genome};
+ \node[entity] (genome) [right=of sheep] {Genome};
\end{tikzpicture}
\end{codeexample}
-
- \itemstyle{every entity}
+\end{stylekey}
+
+\begin{stylekey}{/tikz/every entity}
This stype is envoked by the style |entity|. To change the
appearance of entities, you can change this style.
\begin{codeexample}[]
-\begin{tikzpicture}[node distance=2cm]
- \tikzstyle{every entity}=[draw=blue!50,fill=blue!20,thick]
+\begin{tikzpicture}
+ [every entity/.style={draw=blue!50,fill=blue!20,thick}]
\node[entity] (sheep) {Sheep};
- \node[entity] (genome) [right of=sheep] {Genome};
+ \node[entity] (genome) [right=of sheep] {Genome};
\end{tikzpicture}
\end{codeexample}
-\end{itemize}
+\end{stylekey}
@@ -62,8 +62,7 @@ The package defines a simple style for drawing entities:
Relationships are drawn using styles that are very similar to the
styles for entities.
-\begin{itemize}
- \itemstyle{relationship}
+\begin{stylekey}{/tikz/relationship}
This style works like |entity|, only it is to be used for
relationships. Again, |relationship|s are actually relationship types.
\begin{codeexample}[]
@@ -75,12 +74,14 @@ styles for entities.
edge (genome);
\end{tikzpicture}
\end{codeexample}
- \itemstyle{every relationship}
- works like |every entity|
+\end{stylekey}
+
+\begin{stylekey}{/tikz/every relationship}
+ Works like |every entity|.
\begin{codeexample}[]
\begin{tikzpicture}
- \tikzstyle{every entity}=[fill=blue!20,draw=blue,thick]
- \tikzstyle{every relationship}=[fill=orange!20,draw=orange,thick,aspect=1.5]
+ [every entity/.style={fill=blue!20,draw=blue,thick},
+ every relationship/.style={fill=orange!20,draw=orange,thick,aspect=1.5}]
\node[entity] (sheep) at (0,0) {Sheep};
\node[entity] (genome) at (2,0) {Genome};
\node[relationship] at (1,1.5) {has}
@@ -88,14 +89,13 @@ styles for entities.
edge (genome);
\end{tikzpicture}
\end{codeexample}
-\end{itemize}
+\end{stylekey}
\subsection{Attributes}
-\begin{itemize}
- \itemstyle{attribuate}
+\begin{stylekey}{/tikz/attribute}
This style is used to indicate that a node is an attribute. To
connect an attribute to its entity, you can use, for example, the
|child| command or the |pin| option.
@@ -107,23 +107,29 @@ styles for entities.
\end{tikzpicture}
\end{codeexample}
\begin{codeexample}[]
-\begin{tikzpicture}
- \tikzstyle{every pin edge}=[draw]
+\begin{tikzpicture}[every pin edge/.style=draw]
\node[entity,pin={[attribute]60:name},pin={[attribute]120:color}] {Sheep};
\end{tikzpicture}
\end{codeexample}
- \itemstyle{key attribute}
+\end{stylekey}
+
+\begin{stylekey}{/tikz/key attribute}
This style is intended for key attributes. By default, the will
cause the attribute to be typeset in italics. Typcially, underlining
is used instead, but that looks ugly and it is difficult to
implement in \TeX.
- \itemstyle{every attribute}
+\end{stylekey}
+
+
+\begin{stylekey}{/tikz/every attribute}
This style is used with every (key) attribute.
\begin{codeexample}[]
-\begin{tikzpicture}[text depth=1pt]
- \tikzstyle{every attribute}=[fill=black!20,draw=black]
- \tikzstyle{every entity}=[fill=blue!20,draw=blue,thick]
- \tikzstyle{every relationship}=[fill=orange!20,draw=orange,thick,aspect=1.5]
+\begin{tikzpicture}
+ [text depth=1pt,
+ every attribute/.style={fill=black!20,draw=black},
+ every entity/.style={fill=blue!20,draw=blue,thick},
+ every relationship/.style={fill=orange!20,draw=orange,thick,aspect=1.5}]
+
\node[entity] (sheep) at (0,0) {Sheep}
child {node [key attribute] {name}};
\node[entity] (genome) at (2,0) {Genome};
@@ -132,8 +138,7 @@ styles for entities.
edge (genome);
\end{tikzpicture}
\end{codeexample}
-\end{itemize}
-
+\end{stylekey}
%%% Local Variables: