From: Mark Hansen Date: Mon, 1 Jun 2020 10:51:39 +0000 (+1000) Subject: Inline attrs.1 into Jinja2 template X-Git-Tag: 2.44.1~37^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c5cda7be63ce2eaf8843a10f984e32b8897dd8a;p=graphviz Inline attrs.1 into Jinja2 template It's nice to have fewer moving parts, and brings the context together. --- diff --git a/doc/infosrc/Makefile b/doc/infosrc/Makefile index 31b0b8a98..ff81a009c 100644 --- a/doc/infosrc/Makefile +++ b/doc/infosrc/Makefile @@ -119,9 +119,8 @@ sdlshapes.ps : sdlshapes.dot sdlshapes.png : sdlshapes.ps ./ps_to_png.sh sdlshapes.ps sdlshapes.png -attrs.html : attrs.1 attrs types mkattrs.py mktypes.sh - cat attrs.1 > $@ - ./mkattrs.py < attrs >> $@ +attrs.html : attrs types mkattrs.py mktypes.sh templates/attrs.html.j2 + ./mkattrs.py < attrs > $@ ./mktypes.sh < types >> $@ colors.html : colors.1 colors.n ../../lib/common/color_names ../../lib/common/svgcolor_names ../../lib/common/brewer_colors mkcolors.awk brewer.awk svg.awk diff --git a/doc/infosrc/attrs.1 b/doc/infosrc/attrs.1 deleted file mode 100644 index bd7a64454..000000000 --- a/doc/infosrc/attrs.1 +++ /dev/null @@ -1,84 +0,0 @@ - - - - -Node, Edge and Graph Attributes - - - -

Node, Edge and Graph Attributes

-
-The table below describes the attributes used by various Graphviz tools. -The table gives the name of the attribute, the graph components (node, -edge, etc.) which use the attribute and the type of the attribute -(strings representing legal values of that type). Where applicable, the table -also gives a default value for the attribute, a minimum allowed setting -for numeric attributes, and certain restrictions on the use of the attribute. -

-Note that attribute names are case-sensitive. -This is usually true for attribute values as well, unless noted. -

-All Graphviz attributes are specified by name-value pairs. Thus, to -set the fillcolor of a node abc, one would use - - -
abc [fillcolor = red]
-Similarly, to set the arrowhead style of an edge abc -> def, -one would use - - -
abc -> def [arrowhead = diamond]
-Further details concerning the setting of attributes can be found -in the description of the -DOT language. -

-At present, most device-independent units are either inches or - -points, -which we take as 72 points per inch. -

-Note: Some attributes, such as -dir or arrowtail, are -ambiguous when used in -DOT -with an undirected graph since the head and tail of an edge are meaningless. -As a convention, the first time an undirected edge appears, the -DOT -parser will assign the left node as the tail node and the right node as -the head. For example, the edge A -- B will have tail A -and head B. It is the user's responsibility to handle such -edges consistently. If the edge appears later, in the format - - -
B -- A [taillabel = "tail"]
-the drawing will attach the tail label to node A. -To avoid possible confusion when such attributes are required, the user -is encouraged to use a directed graph. -If it is important to make the graph appear undirected, this can be -done using the dir, arrowtail -or arrowhead attributes. -

-The tools accept standard C representations for int and -double types. -For the bool type, TRUE values are -represented by "true" or "yes" (case-insensitive) -and any non-zero integer, and FALSE values by "false" or "no" (case-insensitive) -and zero. -In addition, there are a variety of specialized types such as -arrowType, color, -point and rankdir. Legal values for these types are given -at the end. -

-In the Used By field, the -characters E, N, G, S and C -represent edges, nodes, the root graph, subgraphs -and cluster subgraphs, respectively. -This field indicates which graph component uses the attribute. -

-In the Notes field, an annotation of write only -indicates that the attribute is used for output, and is not used or read by any -of the layout programs. -


- diff --git a/doc/infosrc/templates/attrs.html.j2 b/doc/infosrc/templates/attrs.html.j2 index 25dc26152..9135d24e6 100644 --- a/doc/infosrc/templates/attrs.html.j2 +++ b/doc/infosrc/templates/attrs.html.j2 @@ -1,3 +1,87 @@ + + + + +Node, Edge and Graph Attributes + + + +

Node, Edge and Graph Attributes

+
+The table below describes the attributes used by various Graphviz tools. +The table gives the name of the attribute, the graph components (node, +edge, etc.) which use the attribute and the type of the attribute +(strings representing legal values of that type). Where applicable, the table +also gives a default value for the attribute, a minimum allowed setting +for numeric attributes, and certain restrictions on the use of the attribute. +

+Note that attribute names are case-sensitive. +This is usually true for attribute values as well, unless noted. +

+All Graphviz attributes are specified by name-value pairs. Thus, to +set the fillcolor of a node abc, one would use + + +
abc [fillcolor = red]
+Similarly, to set the arrowhead style of an edge abc -> def, +one would use + + +
abc -> def [arrowhead = diamond]
+Further details concerning the setting of attributes can be found +in the description of the +DOT language. +

+At present, most device-independent units are either inches or + +points, +which we take as 72 points per inch. +

+Note: Some attributes, such as +dir or arrowtail, are +ambiguous when used in +DOT +with an undirected graph since the head and tail of an edge are meaningless. +As a convention, the first time an undirected edge appears, the +DOT +parser will assign the left node as the tail node and the right node as +the head. For example, the edge A -- B will have tail A +and head B. It is the user's responsibility to handle such +edges consistently. If the edge appears later, in the format + + +
B -- A [taillabel = "tail"]
+the drawing will attach the tail label to node A. +To avoid possible confusion when such attributes are required, the user +is encouraged to use a directed graph. +If it is important to make the graph appear undirected, this can be +done using the dir, arrowtail +or arrowhead attributes. +

+The tools accept standard C representations for int and +double types. +For the bool type, TRUE values are +represented by "true" or "yes" (case-insensitive) +and any non-zero integer, and FALSE values by "false" or "no" (case-insensitive) +and zero. +In addition, there are a variety of specialized types such as +arrowType, color, +point and rankdir. Legal values for these types are given +at the end. +

+In the Used By field, the +characters E, N, G, S and C +represent edges, nodes, the root graph, subgraphs +and cluster subgraphs, respectively. +This field indicates which graph component uses the attribute. +

+In the Notes field, an annotation of write only +indicates that the attribute is used for output, and is not used or read by any +of the layout programs. +


+ {% for attr in attrs %}
NameUsed ByTypeDefaultMinimumNotes