Title: Theory / Unimportant / CS / Descriptive / Dot / Language
Tags: récupéré comment
On every note of this deck, unless a note says otherwise:
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html

Name: ID
Definition: Any string of alphabetic ([a-zA-Z\200-\377]) characters, underscores ('_') or digits ([0-9]), not beginning with a digit;
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html
Context: GraphViz and dot
Definition2: a numeral [-]?(.[0-9]+ | [0-9]+(.[0-9]*)? );
Conjdef: Either
Definition3: any double-quoted string ("...") possibly containing escaped quotes (\")1;
Definition4: an HTML string (<...>).

Name: An edgeop
Definition: -> in digraph
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html
Context: GraphViz and dot
Definition2: -- in undirected graph
Conjdef: Either

Language: GraphViz and dot
Instruction: //foo
#foo
/*foo*/
Other fields (not shown on cards):
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html

Instruction: ; ,
Effect: readability help, not used
Context: GraphViz and dot

Instruction: \ newline
Effect: Ignore the newline caracter
Context: GraphViz and dot
Where to use it: string

Instruction: "foo"+"bar"
Effect: the string foobar
Context: GraphViz and dot
Where to use it: string

Question: Subgraphs's role ?
Answer: a subgraph can be used to represent graph structure, indicating that certain nodes and edges should be grouped together. This is the usual role for subgraphs and typically specifies semantic information about the graph components.
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html
Context: GraphViz and dot
Answer2: It can also provide a convenient shorthand for edges. An edge statement allows a subgraph on both the left and right sides of the edge operator. When this occurs, an edge is created from every node on the left to every node on the right.
Answer3: a subgraph can provide a context for setting attributes. For example, a subgraph could specify that blue is the default color for all nodes defined in it. In the context of graph drawing, a more interesting example is:
subgraph {
rank = same; A; B; C;
}
This (anonymous) subgraph specifies that the nodes A, B and C should all be placed on the same rank if drawn using dot.
Answer4: If the name of the subgraph begins with cluster, Graphviz notes the subgraph as a special cluster subgraph. If supported, the layout engine will do the layout so that the nodes belonging to the cluster are drawn together, with the entire drawing of the cluster contained within a bounding rectangle.

Instruction: {foo_1, ..., foo_n}->{bar_1, ..., bar_m}
Effect: An abbreviation for the set of foo_i -> bar_j
Context: GraphViz and dot

Instruction: clusterfoo
Effect: Indicate to certain program that the subgraph is a cluster and should be drawn in a rectangle
Context: GraphViz and dot
Where to use it: subgraph name

Name: A strict graph
Definition: A graph without multi-edge
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html
Context: GraphViz and dot

Question: What happen to multi-edge in a strict graph
Answer: The edges are assumed to be the same. The parameter of the unification is the union of the parameters
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html
Context: GraphViz and dot

Question: What is the default setting of a subgraph ?
Answer: The setting of its parent graph
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html
Context: GraphViz and dot

Instruction: strict foo
Effect: Introduce a strict (di)graph, as would do the command foo alone, but with multi-edge identified
Context: GraphViz and dot

Instruction: graph {foo}
Effect: Introduce an undirected graph, as precised in the parameters foo
Context: GraphViz and dot
Variables: foo a list of statements

Instruction: digraph {foo}
Effect: Introduce a directed graph, as precised in the parameters foo
Context: GraphViz and dot
Variables: foo a list of statements

Instruction: foo [bar_1= plop_1 ... bar_n= plop_n ]
Effect: every element of type foo introduced latter will have attribute bar_i equal to plop_i
Context: GraphViz and dot
Variables: foo being "edge", "node" or "graph"
Where to use it: (di)graph declaration

Instruction: [bar_1= plop_1 ... bar_n= plop_n ]
Effect: The last object introduced have attribute bar_i equal to plop_i
Context: GraphViz and dot
Where to use it: (di)graph declaration

Smaller0: a--b belongs to C
Greater0: a and b belongs to c
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html
Variables: a,b nodes
C a cluster
Context: GraphViz and dot

Smaller0: \(C_1\) is disjoint from \(C_2\)
Greater0: some \(C_i\) is included in the other one
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html
Variables: \(C_1\), \(C_2\) clusters
Smaller to greater: or

Question: The namespace of an element is
Answer: global
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html
Context: dot

Question: default character encoding is
Answer: UTF8
Page: https://graphviz.gitlab.io/_pages/doc/info/lang.html
Context: dot

Instruction: subgraph {
 foo
}
Effect: introduce a subgraph, with elements foo
Context: dot
Where to use it: graph definition

Question: The 0 of coordinate is
Answer: bottom left
Page: https://graphviz.gitlab.io/_pages/doc/info/output.html
Context: dot