From: Emden R. Gansner Date: Wed, 17 Jul 2013 15:26:35 +0000 (-0400) Subject: Require infosrc input to use \ rather than '\' because the difficulty of handling X-Git-Tag: LAST_LIBGRAPH~32^2~135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7679ef02bda0f8c88514b41d2fde96864ea8cd0;p=graphviz Require infosrc input to use \ rather than '\' because the difficulty of handling the various intermediate filters that might interpret this character. --- diff --git a/doc/info/attrs.html b/doc/info/attrs.html index b26609a34..5aeaf06d1 100644 --- a/doc/info/attrs.html +++ b/doc/info/attrs.html @@ -234,7 +234,7 @@ This field indicates which graph component uses the attribute.
stringfalse label ENGClblString -"\N" (nodes)
"" (otherwise) +"\N" (nodes)
"" (otherwise) labelURL EescString ""svg, map only @@ -282,7 +282,7 @@ This field indicates which graph component uses the attribute. GlayerRange "" layersep -Gstring" :\t" +Gstring" :\t" layout Gstring"" len @@ -306,7 +306,7 @@ This field indicates which graph component uses the attribute. NCGdouble
point <device-dependent> maxiter -Gint100 * # nodes(mode == KK)
200(mode == major)
600(fdp)fdp, neato only +Gint100 * # nodes(mode == KK)
200(mode == major)
600(fdp)fdp, neato only mclimit Gdouble1.0dot only mindist @@ -950,10 +950,10 @@ This field indicates which graph component uses the attribute.
id
Allows the graph author to provide an id for graph objects which is to be included in the output. - Normal "N", "E", "G" substitutions are applied. + Normal "\N", "\E", "\G" substitutions are applied. If provided, it is the responsiblity of the provider to keep its values sufficiently unique for its intended downstream use. - Note, in particular, that "E" does not provide a unique id for multi-edges. + Note, in particular, that "\E" does not provide a unique id for multi-edges. If no id attribute is provided, then a unique internal id is used. However, this value is unpredictable by the graph writer. An externally provided id is not used internally. @@ -2148,23 +2148,23 @@ enclosed in the parentheses, (...)+ indicates 1 or more, and
escString
string allowing escape sequences which are replaced according to the context. - For node attributes, the substring "\N" is replaced by the name of the node, - and the substring "\G" by the name of the graph. - For graph or cluster attributes, the substring "\G" is replaced by the + For node attributes, the substring "\N" is replaced by the name of the node, + and the substring "\G" by the name of the graph. + For graph or cluster attributes, the substring "\G" is replaced by the name of the graph or cluster. - For edge attributes, the substring "\E" is replaced by the name of the edge, - the substring "\G" is replaced by the name of the graph or cluster, - and the substrings "\T" and "\H" by the names of + For edge attributes, the substring "\E" is replaced by the name of the edge, + the substring "\G" is replaced by the name of the graph or cluster, + and the substrings "\T" and "\H" by the names of the tail and head nodes, respectively. The name of an edge is the string formed from the name of the tail node, the appropriate edge operator ("--" or "->") and the name of the head node. - In all cases, the substring "\L" is replaced by the object's label attribute. + In all cases, the substring "\L" is replaced by the object's label attribute.

In addition, if the associated attribute is label, headlabel or taillabel, - the escape sequences "\n", "\l" and "\r" + the escape sequences "\n", "\l" and "\r" divide the label into lines, centered, left-justified, and right-justified, respectively. diff --git a/doc/info/lang.html b/doc/info/lang.html index 3550e1902..1c9af0729 100644 --- a/doc/info/lang.html +++ b/doc/info/lang.html @@ -117,7 +117,7 @@ the parser will actually accept any identifier.

An ID is one of the following:

-
  • Any string of alphabetic ([a-zA-Z\200-\377]) characters, underscores ('_') or +
  • Any string of alphabetic ([a-zA-Z\200-\377]) characters, underscores ('_') or digits ([0-9]), not beginning with a digit;
  • a numeral [-]?(.[0-9]+ | [0-9]+(.[0-9]*)? );
  • any double-quoted string ("...") possibly containing escaped diff --git a/doc/info/output.html b/doc/info/output.html index f31331a45..761250d50 100644 --- a/doc/info/output.html +++ b/doc/info/output.html @@ -333,9 +333,9 @@ The analogous description holds for the tail and the A URL associated with the graph is used as a default link.

    If the URL -of a node contains the escape sequence "\N", it will be replaced by +of a node contains the escape sequence "\N", it will be replaced by the node's name. -If the headURL is defined and contains the escape sequence "\N", +If the headURL is defined and contains the escape sequence "\N", it will be replaced by the headlabel, if defined. The analogous result holds for the tailURL and the @@ -356,7 +356,7 @@ nodes and edges. Since edge links are attached to edge labels, an edge must have a label for its URL to be used. For both nodes and edges, if the URL has the escape -sequence "\N" embedded in its string, this will be replaced with the +sequence "\N" embedded in its string, this will be replaced with the node or edge name.

    jpg @@ -552,10 +552,10 @@ one of the plugins, in which case, that transformation is not possible.
  • In the formats: -Tcmap, -Tcmapx, -Tsvg, -Tvml, the output generates 'id="node#"' properties for nodes, 'id="edge#"' properties for edges, and 'id="cluster#"' properties for clusters, with the '#' replaced by an internally assigned integer. These strings can be provided instead by an externally provided "id=xxx" attribute on the object. -Normal "\N" "\E" "\G" substitutions are applied. +Normal "\N" "\E" "\G" substitutions are applied. Externally provided id values are not used internally, and it is the use's reponsibilty to ensure that they are sufficiently unique for their intended downstream use. -Note, in particular, that "\E" is not a unique id for multiedges. +Note, in particular, that "\E" is not a unique id for multiedges. diff --git a/doc/info/shapes.html b/doc/info/shapes.html index c8905feea..3a19e3c37 100644 --- a/doc/info/shapes.html +++ b/doc/info/shapes.html @@ -266,7 +266,7 @@ The first string in fieldId assigns a portname to the field and can be combined with the node name to indicate where to attach an edge to the node. (See portPos.) The second string is used as the text for the field; it supports the usual -escape sequences \n, \l and \r. +escape sequences \n, \l and \r.

    Visually, a record is a box, with fields represented by alternating rows of horizontal or vertical subboxes. The Mrecord shape is identical @@ -290,9 +290,9 @@ As an example of a record node, the dot input

    digraph structs { node [shape=record]; - struct1 [label="<f0> left|<f1> mid\ dle|<f2> right"]; + struct1 [label="<f0> left|<f1> mid&#92; dle|<f2> right"]; struct2 [label="<f0> one|<f1> two"]; - struct3 [label="hello\nworld |{ b |{c|<here> d|e}| f}| g | h"]; + struct3 [label="hello&#92;nworld |{ b |{c|<here> d|e}| f}| g | h"]; struct1:f1 -> struct2:f0; struct1:f2 -> struct3:here; } diff --git a/doc/infosrc/attrs b/doc/infosrc/attrs index 86f02e87c..3ee2c2be7 100644 --- a/doc/infosrc/attrs +++ b/doc/infosrc/attrs @@ -39,9 +39,9 @@ # There can be more than one item with the same name. # The attributes are alphabetized on output. # -# The current program generating HTML is a shell script. This should -# cause no problems except with '\', which may require some number of -# escaping '\' to get the right final output. +# As this is processed by a shell script, and then the web page generator, +# the special character '\' can cause problems. When used as a literal, use +# the HTML encoding &#92; to avoid problems. # :Damping:G:double:0.99:0.0; neato Factor damping force motions. On each iteration, a nodes movement @@ -427,10 +427,10 @@ is used. Synonym for <A HREF=#d:URL>URL</A>. :id:GCNE:escString:""; map,ps,svg Allows the graph author to provide an id for graph objects which is to be included in the output. -Normal "\N", "\E", "\G" substitutions are applied. +Normal "&#92;N", "&#92;E", "&#92;G" substitutions are applied. If provided, it is the responsiblity of the provider to keep its values sufficiently unique for its intended downstream use. -Note, in particular, that "\E" does not provide a unique id for multi-edges. +Note, in particular, that "&#92;E" does not provide a unique id for multi-edges. If no id attribute is provided, then a unique internal id is used. However, this value is unpredictable by the graph writer. An externally provided id is not used internally. @@ -507,7 +507,7 @@ to an ideal edge length (in inches), in that increasing K tends to increase the distance between nodes. Note that the edge attribute <A HREF=#d:len>len</A> can be used to override this value for adjacent nodes. -:label:ENGC:lblString:"\\\\N" (nodes)/"" (otherwise); +:label:ENGC:lblString:"\&#92;N" (nodes)/"" (otherwise); Text label attached to objects. If a node's <A HREF=#d:shape>shape</A> is record, then the label can have a <A HREF=shapes.html#record>special format</A> @@ -606,7 +606,7 @@ Specifies the separator characters used to split an attribute of type <A HREF=#k:layerRange>layerRange</A> into a list of ranges. :layerselect:G:layerRange:""; Selects a list of layers to be emitted. -:layersep:G:string:" :\\\\t"; +:layersep:G:string:" :&#92;t"; Specifies the separator characters used to split the <A HREF=#d:layers>layers</A> attribute into a list of layer names. :layout:G:string:""; @@ -664,7 +664,7 @@ the cluster bounding box. By default, this is 8 points. <P> For nodes, this attribute specifies space left around the node's label. By default, the value is <TT>0.11,0.055</TT>. -:maxiter:G:int:100 \\* # nodes(mode == KK)/200(mode == major)/600(fdp); neato,fdp +:maxiter:G:int:100 &#42; # nodes(mode == KK)/200(mode == major)/600(fdp); neato,fdp Sets the number of iterations used. :mclimit:G:double:1.0; dot Multiplicative scale factor used to alter the MinQuit (default = 8) diff --git a/doc/infosrc/lang.2 b/doc/infosrc/lang.2 index 6b01539b2..4a4477fb0 100644 --- a/doc/infosrc/lang.2 +++ b/doc/infosrc/lang.2 @@ -8,7 +8,7 @@ the parser will actually accept any identifier. <P> An <I>ID</I> is one of the following: <MENU> -<LI> Any string of alphabetic (<TT>[a-zA-Z\200-\377]</TT>) characters, underscores (<TT>'_'</TT>) or +<LI> Any string of alphabetic (<TT>[a-zA-Z&#92;200-&#92;377]</TT>) characters, underscores (<TT>'_'</TT>) or digits (<TT>[0-9]</TT>), not beginning with a digit; <LI> a numeral [<tt>-</tt>]<sup>?</sup>(<tt>.</tt>[<tt>0</tt>-<tt>9</tt>]<sup>+</sup> | [<tt>0</tt>-<tt>9</tt>]<sup>+</sup>(<tt>.</tt>[<tt>0</tt>-<tt>9</tt>]<sup>*</sup>)<sup>?</sup> ); <LI> any double-quoted string (&quot;...&quot;) possibly containing escaped diff --git a/doc/infosrc/mkattrs.sh b/doc/infosrc/mkattrs.sh index 593045ca6..39df45d93 100755 --- a/doc/infosrc/mkattrs.sh +++ b/doc/infosrc/mkattrs.sh @@ -30,9 +30,9 @@ protect () '>' ) s=${s}'&#62;' ;; - '&' ) - s=${s}'&#38;' - ;; +# '&' ) +# s=${s}'&#38;' +# ;; '\' ) if (( J == L-1 )) then diff --git a/doc/infosrc/output.2 b/doc/infosrc/output.2 index 61e2a3d16..63e99323c 100644 --- a/doc/infosrc/output.2 +++ b/doc/infosrc/output.2 @@ -20,10 +20,10 @@ one of the plugins, in which case, that transformation is not possible. <LI> <A NAME=ID></A>In the formats: -Tcmap, -Tcmapx, -Tsvg, -Tvml, the output generates 'id="node#"' properties for nodes, 'id="edge#"' properties for edges, and 'id="cluster#"' properties for clusters, with the '#' replaced by an internally assigned integer. These strings can be provided instead by an externally provided "id=xxx" attribute on the object. -Normal "\N" "\E" "\G" substitutions are applied. +Normal "&#92;N" "&#92;E" "&#92;G" substitutions are applied. Externally provided id values are not used internally, and it is the use's reponsibilty to ensure that they are sufficiently unique for their intended downstream use. -Note, in particular, that "\E" is not a unique id for multiedges. +Note, in particular, that "&#92;E" is not a unique id for multiedges. </OL> </BODY> </HTML> diff --git a/doc/infosrc/outputs b/doc/infosrc/outputs index cc15e7037..a9a025efc 100644 --- a/doc/infosrc/outputs +++ b/doc/infosrc/outputs @@ -49,7 +49,7 @@ nodes and edges. Since edge links are attached to edge labels, an edge must have a <A HREF=attrs.html#d:label>label</A> for its URL to be used. For both nodes and edges, if the URL has the escape -sequence "\\N" embedded in its string, this will be replaced with the +sequence "&#92;N" embedded in its string, this will be replaced with the node or edge name. :cmap:Client-side imagemap (deprecated) Produces map files for client-side image maps. The cmap format is @@ -121,9 +121,9 @@ The analogous description holds for the tail and the A URL associated with the graph is used as a default link. <P> If the URL -of a node contains the escape sequence "\\N", it will be replaced by +of a node contains the escape sequence "&#92;N", it will be replaced by the node's name. -If the headURL is defined and contains the escape sequence "\\N", +If the headURL is defined and contains the escape sequence "&#92;N", it will be replaced by the <A HREF=attrs.html#d:headlabel>headlabel</A>, if defined. The analogous result holds for the tailURL and the diff --git a/doc/infosrc/shapes.2 b/doc/infosrc/shapes.2 index b73bad12f..538d01b7b 100644 --- a/doc/infosrc/shapes.2 +++ b/doc/infosrc/shapes.2 @@ -64,7 +64,7 @@ The first string in <I>fieldId</I> assigns a portname to the field and can be combined with the node name to indicate where to attach an edge to the node. (See <A HREF=attrs.html#k:portPos>portPos</A>.) The second string is used as the text for the field; it supports the usual -<A HREF=attrs.html#k:escString>escape sequences</A> \n, \l and \r. +<A HREF=attrs.html#k:escString>escape sequences</A> &#92;n, &#92;l and &#92;r. <P> Visually, a record is a box, with fields represented by alternating rows of horizontal or vertical subboxes. The Mrecord shape is identical @@ -88,9 +88,9 @@ As an example of a record node, the dot input <XMP> digraph structs { node [shape=record]; - struct1 [label="<f0> left|<f1> mid\ dle|<f2> right"]; + struct1 [label="<f0> left|<f1> mid&#92; dle|<f2> right"]; struct2 [label="<f0> one|<f1> two"]; - struct3 [label="hello\nworld |{ b |{c|<here> d|e}| f}| g | h"]; + struct3 [label="hello&#92;nworld |{ b |{c|<here> d|e}| f}| g | h"]; struct1:f1 -> struct2:f0; struct1:f2 -> struct3:here; } diff --git a/doc/infosrc/types b/doc/infosrc/types index ea5f1de69..cdeb74265 100644 --- a/doc/infosrc/types +++ b/doc/infosrc/types @@ -148,23 +148,23 @@ A colon-separated list of doubles: "<I>%f</I>(:<I>%f</I>)*" :escString string allowing escape sequences which are replaced according to the context. -For node attributes, the substring "\\N" is replaced by the name of the node, -and the substring "\\G" by the name of the graph. -For graph or cluster attributes, the substring "\\G" is replaced by the +For node attributes, the substring "&#92;N" is replaced by the name of the node, +and the substring "&#92;G" by the name of the graph. +For graph or cluster attributes, the substring "&#92;G" is replaced by the name of the graph or cluster. -For edge attributes, the substring "\\\\E" is replaced by the name of the edge, -the substring "\\G" is replaced by the name of the graph or cluster, -and the substrings "\\T" and "\\H" by the names of +For edge attributes, the substring "&#92;E" is replaced by the name of the edge, +the substring "&#92;G" is replaced by the name of the graph or cluster, +and the substrings "&#92;T" and "&#92;H" by the names of the tail and head nodes, respectively. The name of an edge is the string formed from the name of the tail node, the appropriate edge operator ("--" or "->") and the name of the head node. -In all cases, the substring "\\L" is replaced by the object's label attribute. +In all cases, the substring "&#92;L" is replaced by the object's label attribute. <P> In addition, if the associated attribute is <A HREF=#a:label>label</A>, <A HREF=#a:headlabel>headlabel</A> or <A HREF=#a:taillabel>taillabel</A>, -the escape sequences "\\\\n", "\\l" and "\\\\r" +the escape sequences "&#92;n", "&#92;l" and "&#92;r" divide the label into lines, centered, left-justified, and right-justified, respectively. :lblString