gpt4 book ai didi

ubuntu - Graphviz 下标

转载 作者:行者123 更新时间:2023-12-02 00:50:18 30 4
gpt4 key购买 nike

我正在尝试让 graphviz 启动并工作,我迫切需要节点标签中的下标。不幸的是,通过浏览无数关于类似问题的帖子,我似乎适合所有建议的解决方案,但仍然不起作用。这是我的代码:

 digraph G{
execute [label=<ex<SUB>2</SUB>>];
main -> parse -> execute;
main -> init;
main -> cleanup;
init -> make_string;
main -> printf;
}

还运行这个:

$ dot -Tps:cairo -v test.gv -o out.ps

并作为输出:

> dot - graphviz version 2.26.3 (20100126.1600)
Activated plugin library: libgvplugin_pango.so.6
Using textlayout: textlayout:cairo
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
Using render: cairo:cairo
Using device: ps:cairo:cairo
The plugin configuration file:
/usr/lib/graphviz/config6
was successfully loaded.
render : cairo dot fig gd map ps svg tk vml vrml xdot
layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
textlayout : textlayout
device : canon cmap cmapx cmapx_np dot eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg pdf plain plain-ext png ps ps2 svg svgz tk vml vmlz vrml wbmp x11 xdot xlib
loadimage : (lib) eps gd gd2 gif jpe jpeg jpg png ps svg
Error: Unknown HTML element <SUB> on line 1
fontname: "Times-Roman" resolved to: (ps:pango Times Roman,) (PangoCairoFcFont) "DejaVu Sans 14"
in label of node execute
network simplex: 7 nodes 6 edges maxiter=2147483647 balance=1
network simplex: 7 nodes 6 edges 0 iter 0.00 sec
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross G: 0 crossings, 0.00 secs.
network simplex: 13 nodes 16 edges maxiter=2147483647 balance=2
network simplex: 13 nodes 16 edges 1 iter 0.00 sec
routesplines: 6 edges, 18 boxes 0.00 sec
Using render: cairo:cairo
Using device: ps:cairo:cairo

我不太熟悉 cairo 或 svg 渲染,并且非常不确定它是否与 graphviz 一起打包,或者它是否是一个单独的库。我有 Ubuntu 12,通过 apt-get 安装了 graphviz。任何帮助将不胜感激。

谢谢

最佳答案

原因如下 - 来自 the graphviz documentation :

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

您的版本是 2.26.3,来自2010 年 1 月

我建议升级。

另请参阅this answer to a similar question

关于ubuntu - Graphviz 下标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17819718/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com