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.tex74
1 files changed, 41 insertions, 33 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 c896037c584..691d4e1d790 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
@@ -11,13 +11,12 @@
\section{Entity-Relationship Diagram Drawing Library}
\begin{tikzlibrary}{er}
- This packages provides styles for drawing entity-relationship
- diagrams.
+ This packages provides styles for drawing entity-relationship diagrams.
\end{tikzlibrary}
-This library is intended to help you in creating E/R-diagrams. It defines
-only few new styles, but using the style |entity| instead of
-saying |rectangle,draw| makes the code more expressive.
+This library is intended to help you in creating E/R-diagrams. It defines only
+few new styles, but using the style |entity| instead of saying |rectangle,draw|
+makes the code more expressive.
\subsection{Entities}
@@ -25,27 +24,29 @@ saying |rectangle,draw| makes the code more expressive.
The package defines a simple style for drawing entities:
\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.
-
- Note that this style is called |entity| despite the fact that it is
- to be used for nodes representing entity \emph{types} (the
- difference between an entity and an entity type is the same as the
- difference between an object and a class in object-oriented
- programming). If this bothers you, feel free to define a style
- |entity type| instead.
+ 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.
+
+ Note that this style is called |entity| despite the fact that it is to be
+ used for nodes representing entity \emph{types} (the difference between an
+ entity and an entity type is the same as the difference between an object
+ and a class in object-oriented programming). If this bothers you, feel free
+ to define a style |entity type| instead.
+ %
\begin{codeexample}[]
\begin{tikzpicture}
\node[entity] (sheep) {Sheep};
\node[entity] (genome) [right=of sheep] {Genome};
\end{tikzpicture}
\end{codeexample}
+ %
\end{stylekey}
\begin{stylekey}{/tikz/every entity}
- This style is evoked by the style |entity|. To change the
- appearance of entities, you can change this style.
+ This style is evoked by the style |entity|. To change the appearance of
+ entities, you can change this style.
+ %
\begin{codeexample}[]
\begin{tikzpicture}
[every entity/.style={draw=blue!50,fill=blue!20,thick}]
@@ -53,18 +54,19 @@ The package defines a simple style for drawing entities:
\node[entity] (genome) [right=of sheep] {Genome};
\end{tikzpicture}
\end{codeexample}
+ %
\end{stylekey}
-
\subsection{Relationships}
-Relationships are drawn using styles that are very similar to the
-styles for entities.
+Relationships are drawn using styles that are very similar to the styles for
+entities.
\begin{stylekey}{/tikz/relationship}
- This style works like |entity|, only it is to be used for
- relationships. Again, |relationship|s are actually relationship types.
+ This style works like |entity|, only it is to be used for relationships.
+ Again, |relationship|s are actually relationship types.
+ %
\begin{codeexample}[]
\begin{tikzpicture}
\node[entity] (sheep) at (0,0) {Sheep};
@@ -74,10 +76,12 @@ styles for entities.
edge (genome);
\end{tikzpicture}
\end{codeexample}
+ %
\end{stylekey}
\begin{stylekey}{/tikz/every relationship}
- Works like |every entity|.
+ Works like |every entity|.
+ %
\begin{codeexample}[]
\begin{tikzpicture}
[every entity/.style={fill=blue!20,draw=blue,thick},
@@ -89,16 +93,17 @@ styles for entities.
edge (genome);
\end{tikzpicture}
\end{codeexample}
+ %
\end{stylekey}
-
\subsection{Attributes}
\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.
+ 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.
+ %
\begin{codeexample}[]
\begin{tikzpicture}
\node[entity] (sheep) {Sheep}
@@ -106,23 +111,25 @@ styles for entities.
child {node[attribute] {color}};
\end{tikzpicture}
\end{codeexample}
+ %
\begin{codeexample}[]
\begin{tikzpicture}[every pin edge/.style=draw]
\node[entity,pin={[attribute]60:name},pin={[attribute]120:color}] {Sheep};
\end{tikzpicture}
\end{codeexample}
+ %
\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. Typically, underlining
- is used instead, but that looks ugly and it is difficult to
- implement in \TeX.
+ This style is intended for key attributes. By default, the will cause the
+ attribute to be typeset in italics. Typically, underlining is used instead,
+ but that looks ugly and it is difficult to implement in \TeX.
\end{stylekey}
-
\begin{stylekey}{/tikz/every attribute}
- This style is used with every attribute, and therefore also for every key attribute.
+ This style is used with every attribute, and therefore also for every key
+ attribute.
+ %
\begin{codeexample}[]
\begin{tikzpicture}
[text depth=1pt,
@@ -138,6 +145,7 @@ styles for entities.
edge (genome);
\end{tikzpicture}
\end{codeexample}
+ %
\end{stylekey}