2017-09-02 149 views
1

我有Graphviz文件“foo.dot”,它包含我想要在doxygen中用markdown“bar.md”进行渲染的图。Doxygen Markdown:如何包含和渲染一个.dot GraphViz文件

知道 * Doxygen支持降价(我解决了分隔markdown .md文件的情况)。 * Doxygen支持源代码中的指令(.cpp或其他)的Graphviz .dot文件

在doxygen呈现的markdown中可以执行相同的操作吗? (没有诉诸像gravizo遥远的服务为例)

我想这样做的好处是从.dot图的资产和doxygen一起降价。

+0

你从哪里看到doxygen支持.dot文件?就我所知,doxygen不直接支持.dot文件,它支持图像和doxygen内部.dot文件生成并转换为图像,因此您应该将.dot文件转换为图像并将其包含在Markdown代码中。 – albert

+0

我正在考虑命令'\ dotfile myDiagram.dot' [link](http://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmddotfile),在这种情况下,doxygen可以调用Graphviz(位于PATH中)将.dot转换为图像。我在doxygen读取的降价文件中跳跃,我们可以用类似的命令来做同样的事情...... 如果不可能的话的确的话,我会把它转换成我自己的。 –

+0

糟糕,我完全忘记了这个命令及其朋友,难道你不能在你的.md文件中使用\ dotfile吗?我认为它应该完成转换, – albert

回答

2

我认为你必须设置

HAVE_DOT = YES 

在doxygen的配置文件。 从标准的Doxyfile见注释:

# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
# available from the path. This tool is part of Graphviz (see: 
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent 
# Bell Labs. The other options in this section have no effect if this option is 
# set to NO 
# The default value is: NO. 

HAVE_DOT    = NO 

此外,您还可能有一个看DOTFILE_DIRS值:

# The DOTFILE_DIRS tag can be used to specify one or more directories that 
# contain dot files that are included in the documentation (see the \dotfile 
# command). 
# This tag requires that the tag HAVE_DOT is set to YES. 

DOTFILE_DIRS   = 

如果你正确设置这些值,我觉得你的贴\dofile myDiagram.dot命令应该工作。

相关问题