5

I'm using dot version 2.26.3

The following .dot contents:

digraph html {
results [shape=none, margin=0, label=<
    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
    <TR>
    <TD>Title</TD>
    </TR>
    <TR>
    <TD><I>Description.</I></TD>
    </TR>
    </TABLE>
>];
}

..should produce a non-italic 'Title' and italic 'Description' when generating an SVG according to the documentation.

dot -Tsvg filename.dot -o output/filename.svg

However, the description is non-italic as you can see:

enter image description here

Any idea why?

UPDATE

I couldn't get the latest version installed for various reasons. In the end I remedied by using an italicised font. Equally, you could use a strong font as an equivalent for bold.

<TD><FONT FACE="Times-Roman">Standard.</FONT></TD>

<TD><FONT FACE="Times-Italic">In italics.</FONT></TD>

<TD><FONT FACE="Times-Bold">In bold.</FONT></TD>

Community
  • 1
  • 1
KomodoDave
  • 7,239
  • 10
  • 60
  • 92
  • Do you mean "bold" instead of "italic"? PNG output for `` is bold: http://i.imgur.com/IvOGj.png I would expect `` to be used for italics (not that it would fix your problem to use ``, I'm just confused why you're asking about italics). – user1201210 Oct 07 '12 at 16:59
  • Whoops, thanks for that tenterhook. When `` failed I tried `` which also didn't work. – KomodoDave Oct 07 '12 at 18:01

2 Answers2

4

Here's why - from the link to the documentation you provided:

The font markups for bold, italic, underlining, subscript and superscript (<B>, <I>, <U>, <SUB>; and <SUP>) are only available in versions after 14 October 2011, and are currently only available via the cairo and svg renderers

Version 2.26.3 however seems to be from January 2010 - at least when checking the dates of the downloads for ubuntu or windows.

I recommend to upgrade.

marapet
  • 54,856
  • 12
  • 170
  • 184
  • The most recently modified versions according to those directories are also before 14 October 2011. :S – user1201210 Oct 07 '12 at 17:25
  • Sincere thanks, marapet. I saw that comment and foolishly presumed the latest version in Ubuntu repositories was a post-Oct 2011 release. – KomodoDave Oct 07 '12 at 18:02
1

I have version 2.28 installed, and my local documentation (C:\Program Files\Graphviz 2.28\share\graphviz\doc\html\info\shapes.html#html) makes no mention of any <I> or <B> tags under the HTML-Like Labels section. It appears that the tags still work when producing png output, but the support was (apparently) either removed from or never added to the svg functionality and is now (apparently) not supported for any output.

user1201210
  • 3,801
  • 22
  • 25
  • Thank you for the info, tenterhook. – KomodoDave Oct 07 '12 at 18:02
  • 1
    You're right, this is not in the documentation packaged with 2.28 (and 2.29 dev). Strangely, those are the versions it works - though I wouldn't bet my money on this being available in future versions. I couldn't find anything about this being deprecated. However, svg output does include a `font-style="italic"` attribute - at least on my windows box. – marapet Oct 07 '12 at 18:49
  • @marapet Which version produces the `font-style="italic"` output for you? 2.28 just turns `...Description....` into `... Description. ... ` in the svg output for me. – user1201210 Oct 07 '12 at 19:14
  • Both 2.28 and 2.29.20110921, on windows. – marapet Oct 07 '12 at 19:45