From: Emden R. Gansner Date: Thu, 11 Dec 2014 16:54:21 +0000 (-0500) Subject: Add/update information about strict graphs, and directed vs. undirected graphs. X-Git-Tag: TRAVIS_CI_BUILD_EXPERIMENTAL~135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2c73f0b8ab8d638cc9b3df4ef65765deb7c12ff;p=graphviz Add/update information about strict graphs, and directed vs. undirected graphs. --- diff --git a/doc/dotguide.pdf b/doc/dotguide.pdf index 5888584f4..52ca10792 100644 Binary files a/doc/dotguide.pdf and b/doc/dotguide.pdf differ diff --git a/doc/dotguide/dotguide.tex b/doc/dotguide/dotguide.tex index 51c411962..6e66130df 100644 --- a/doc/dotguide/dotguide.tex +++ b/doc/dotguide/dotguide.tex @@ -8,7 +8,7 @@ \def\dag{{\it dag}} \def\DOT{{\it DOT}} \def\graphviz{{\it Graphviz}} -\newcommand{\lastedited}{November 2, 2010} +\newcommand{\lastedited}{December 11, 2014} \date{\lastedited} \newcommand{\mymark}{{\it dot} User's Manual, \lastedited \hfil } \markboth{\mymark}{\mymark} @@ -1243,8 +1243,13 @@ the verbose messages may give some estimate of \dot's progress. \section{Miscellaneous} In the top-level graph heading, a graph may be declared a -{\tt strict digraph}. This forbids the creation of self-arcs -and multi-edges; they are ignored in the input file. +{\tt strict digraph} or a {\tt strict graph}. This forbids the creation +of multi-edges, i.e., there can be at most one edge with a given tail +node and head node in the directed case. For undirected graphs, +there can be at most one +edge connected to the same two nodes. Subsequent edge statements using +the same two nodes will identify the edge with the previously defined one +and apply any attributes given in the edge statement. Nodes, edges and graphs may have a {\tt URL} attribute. In certain output formats ({\tt ps2}, {\tt imap}, {\tt cmapx}, or {\tt svg}), diff --git a/doc/info/lang.html b/doc/info/lang.html index 030be4975..5bbf7282a 100644 --- a/doc/info/lang.html +++ b/doc/info/lang.html @@ -199,6 +199,33 @@ Note that, for good and bad, cluster subgraphs are not part of the DOT language, but solely a syntactic convention adhered to by certain of the layout engines.

Lexical and Semantic Notes

+A graph must be specified as either a digraph or a graph. +Semantically, this indicates whether or not there is a natural direction from +one of the edge's nodes to the other. +Lexically, a digraph must specify an edge using the edge operator -> +while a undirected graph must use --. +Operationally, the distinction is used to define different default rendering +attributes. For example, edges in a digraph will be drawn, by default, with +an arrowhead pointing to the head node. For ordinary graphs, edges are drawn +without any arrowheads by default. +

+A graph may also be described as strict. +This forbids the creation of multi-edges, i.e., there can be at most one +edge with a given tail node and head node in the directed case. For undirected +graphs, there can be at most one +edge connected to the same two nodes. Subsequent edge statements using +the same two nodes will identify the edge with the previously defined one +and apply any attributes given in the edge statement. +For example, the graph +

+strict graph { 
+  a -- b
+  b -- a [color=blue]
+} 
+
+will have a single edge connecting nodes a and b, +whose color is blue. +

If a default attribute is defined using a node, edge, or graph statement, or by an attribute assignment not attached to a node or edge, any object of the diff --git a/doc/infosrc/lang.2 b/doc/infosrc/lang.2 index 1a2028c5f..fd3a78681 100644 --- a/doc/infosrc/lang.2 +++ b/doc/infosrc/lang.2 @@ -90,6 +90,33 @@ Note that, for good and bad, cluster subgraphs are not part of the DOT language, but solely a syntactic convention adhered to by certain of the layout engines.

Lexical and Semantic Notes

+A graph must be specified as either a digraph or a graph. +Semantically, this indicates whether or not there is a natural direction from +one of the edge's nodes to the other. +Lexically, a digraph must specify an edge using the edge operator -> +while a undirected graph must use --. +Operationally, the distinction is used to define different default rendering +attributes. For example, edges in a digraph will be drawn, by default, with +an arrowhead pointing to the head node. For ordinary graphs, edges are drawn +without any arrowheads by default. +

+A graph may also be described as strict. +This forbids the creation of multi-edges, i.e., there can be at most one +edge with a given tail node and head node in the directed case. For undirected +graphs, there can be at most one +edge connected to the same two nodes. Subsequent edge statements using +the same two nodes will identify the edge with the previously defined one +and apply any attributes given in the edge statement. +For example, the graph +

+strict graph { 
+  a -- b
+  b -- a [color=blue]
+} 
+
+will have a single edge connecting nodes a and b, +whose color is blue. +

If a default attribute is defined using a node, edge, or graph statement, or by an attribute assignment not attached to a node or edge, any object of the