unable to get HTML labels to render--am I doing this correctly?

Hello everyone, I don't know whether this is an issue with my understanding or a real issue with graphviz. I am unable to get html labels to render properly. When I have a node defined B [label="bold label"] it just appears as the text literal "bold label"

Would someone confirm that either I'm doing it wrong, or there is a bug with the software? Here's the output of my running make: PMBF27337MacBookPro:~/Work/dot_test$ make clean PMBF27337MacBookPro:~/Work/dot_test$ ls Makefile test.dot PMBF27337MacBookPro:~/Work/dot_test$ make dot -T png:quartz test.dot -o test-quartz.png dot -T png:cairo test.dot -o test-cairo.png dot -T png test.dot -o test.png dot -T pdf test.dot -o test.pdf dot -V dot - graphviz version 2.26.3 (20100126.1600) uname -a Darwin PMBF27337MacBookPro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 i386 MacBookPro6,2 Darwin Note that I have added ".txt" to the files that don't have "acceptable" suffixes for attached files. Thanks for any assistance that people can provide.

AttachmentSize
test.dot_.txt147 bytes
Makefile.txt414 bytes
test-cairo.png16.98 KB
test-quartz.png32.15 KB
test.pdf9.19 KB
test.png16.98 KB

unable to get HTML labels to

HTML-like labels use a different quoting convention than ordinary strings. In particular, the string delimiters are < and >. So, if you change your input to use

    B [label=<<B>bold label B</B>>];
    C [label=<<b>bold label C</b>>];

 

you'll get the output you want. No, I take that back. The <B> notation wasn't added until after 2.26, so you'll also need to update to 2.28 or later.
 

(still) unable to get HTML labels to render properly

Thank you very much for your help. My update: the text of the labels appears properly, but the rendering (i.e., bold or italic changes) is (still) not happening. I've updated my version of graphviz (as well as my test graph)--details provided below, but I cannot attach files on this comment (apparently). Any more magic help? Thanks again for any help that anyone can provide PMBF27337MacBookPro:~/Work/dot_test$ cat test.dot digraph test { A [label="plain label A"]; B [label=<bold label B>]; C [label=<bold label C>]; D [label=<italic label D>]; A -> B; A -> C; A -> D; } PMBF27337MacBookPro:~/Work/dot_test$ make test dot -T pdf:quartz:quartz test.dot -o 'test-pdf:quartz:quartz.pdf' dot -T png:gd:gd test.dot -o 'test-png:gd:gd.png' dot -T png:quartz:quartz test.dot -o 'test-png:quartz:quartz.png' PMBF27337MacBookPro:~/Work/dot_test$ make version dot -V dot - graphviz version 2.28.0 (20110509.1545) uname -a Darwin PMBF27337MacBookPro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 i386 MacBookPro6,2 Darwin

(still) unable to get HTML labels to render properly

Based on your reply, your input is still not correct. I'm seeing B[label=<bold label B>] rather than B[label=<<B>bold label B</B>>]. If your input has the latter and you are still not seeing bold, email me your input and what you get when you run dot -Tps.
 

(still) unable to get HTML labels to render properly

The immediate cause of the problem is that, at present, only svg and cairo-based output has been fixed to
handle the <b>, <i>, etc. markup, and your installation is not picking up cairo. This is because, try as we might,
we were unable to create a mac package for snow leopard that binds with cairo. (See the note at the top of
http://www.graphviz.org/Download_macos.php.)  As alternatives, you can install the macports version of graphviz,
or build from source. Sorry for the inconvenience.

Recent comments