How do you use Graphviz/DOT's HTML features to add a subscript character to an edge label?
Asked
Active
Viewed 6,693 times
1 Answers
25
Like this:
digraph g {
1 -> 2 [label=<Regular<SUB>subscript</SUB>>];
}

marapet
- 54,856
- 12
- 170
- 184
-
3What if I got char like "<" or ">" in the label? Who to escape them? – enchanter Jun 27 '14 at 00:31
-
6@enchanter According to the [HTML specification](http://www.w3.org/TR/html4/sgml/entities.html), one can [encode](http://www.html-entities.org/) many special characters. "<" becomes `<` and ">" is `>`. UTF-8 HTML encodings `<` and `>` do also work with Graphviz labels. – Serge Stroobandt Dec 20 '14 at 21:02