Markdown Doxygen标记:如何包含和呈现.dot GraphViz文件

Markdown Doxygen标记:如何包含和呈现.dot GraphViz文件,markdown,doxygen,graphviz,Markdown,Doxygen,Graphviz,我有一个Graphviz文件“foo.dot”,其中保存了我想用doxygen在标记“bar.md”中呈现的图表 知道: Doxygen support markdown(我处理一个单独的markdown.md文件) Doxygen支持源(.cpp或else)中包含指令的Graphviz.dot文件 在doxygen提供的降价服务中是否也可以这样做(例如,不必求助于gravizo这样的远程服务) 我想这样做是为了从.dot图和markdown以及doxygen的资产中获益。我认为您必须设置

我有一个Graphviz文件“foo.dot”,其中保存了我想用doxygen在标记“bar.md”中呈现的图表

知道:

  • Doxygen support markdown(我处理一个单独的markdown.md文件)
  • Doxygen支持源(.cpp或else)中包含指令的Graphviz.dot文件
在doxygen提供的降价服务中是否也可以这样做(例如,不必求助于gravizo这样的远程服务)


我想这样做是为了从.dot图和markdown以及doxygen的资产中获益。

我认为您必须设置

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\u 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           = 

如果您正确设置了这些值,我认为您发布的
\dotfile myDiagram.dot
命令应该可以工作。

这也支持类型为*.gv的文件,这些文件基本上与*.dot文件相同(内容没有区别)但是,如果安装了MS Word,并且*.dot文件类型与Word模板文件相关联,则可能更易于处理。

您在哪里看到doxygen支持.dot文件?据我所知,doxygen不直接支持.dot文件,它支持图像和doxygen内部。dot文件生成并转换为图像,因此您应该将.dot文件转换为图像,并将其包含在标记代码中。我考虑的是命令
\dotfile myDiagram.dot
,在这种情况下,doxygen能够调用Graphviz(位于路径中)将.dot转换为图像。我想在doxygen读取的降价文件中,我们可以用类似的命令执行相同的操作。。。如果不可能,我会自己转换它。哦,我完全忘记了这个命令和它的朋友,你不能在你的.md文件中使用\dotfile吗?我认为它应该进行转换,好的,我会进行转换。谢谢;)我认为使用\dotfile时不必转换.dot文件