How to use <sub>
/<sup>
in record shape?
Or, how to ensure a smallest height and weight for html node?
I am drawing a b+-tree with like Pn-1.
In record with “” I cannot use <sub>
/<sup>
.
In html empty node is too small. And it is hard to make shapes in the same height.
The docs say <sub>
and <sup>
are supported. Do they not work? Could you post your input file?
digraph g1 {
node [shape=record];
root[label="<f0> P<sub>n-1</sub>|<f1>"];
}
dot -Tsvg test.dot -o test.svg
Error: bad label format <f0> P<sub>n-1</sub>
<sub>
and <sup>
are only supported for HTML-like labels, not for record-based nodes.
Here is how to write your example to use HTML-like labels:
[dot verbose=true]
digraph g1 {
node [shape=plaintext]
root [label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR>
<TD port="f0">P<SUB>n-1</SUB></TD>
<TD port="f1"></TD>
</TR>
</TABLE>
>]
}
[/dot]
NOTE: This renders incorrectly using Firefox, but correctly with Chrome.
In case you are not using Chrome, here is a png image generated offline:
See also: