Create Graphviz labels with subscripts from Java application

点点圈 提交于 2021-01-28 03:22:19

问题


I am calling Graphviz from Java application using the Graphviz.java API and save the output graph to PDF file. I need to label some nodes with math subscripts and accents (for example $a_1$ or $\hat{a}$ in latex). I can survive with subscripts only.

is there anyway to do it? is this because of the API i'm using or I am missing something here.

I have tried b [label=<x<SUB>1</SUB>>]; but it doesn't work (though symbols like a [ label=<&#945;>]; work and show up in the output file).


回答1:


According to their documentation,

NOTE: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. In addition, the horizontal and vertical rules (<HR> and <VR>) are only available in versions later than 8 July 2011.

Are you sure you are using either of those versions?



来源:https://stackoverflow.com/questions/17669014/create-graphviz-labels-with-subscripts-from-java-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!