简体   繁体   English

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

[英]Doxygen Markdown : How to include and render a .dot GraphViz file

I have Graphviz file "foo.dot" holding the diagram I'd like to render inside a markdown "bar.md" with doxygen.我有 Graphviz 文件“foo.dot”,其中包含我想在带有 doxygen 的降价“bar.md”中呈现的图表。

Knowing that:知道:

  • Doxygen support markdown (I address the case of a separated markdown .md file); Doxygen 支持降价(我解决了分离降价 .md 文件的情况);
  • Doxygen support Graphviz .dot files with the instruction in the source (.cpp or else). Doxygen 支持带有源代码(.cpp 或其他)指令的 Graphviz .dot 文件。

Is it possible to do the same in a markdown rendered by doxygen (without resorting to distant service like gravizo for exemple)?是否可以在由 doxygen 呈现的降价中做同样的事情(例如,不求助于像 gravizo 这样的远程服务)?

I'd like to do this to benefit from the assets of .dot diagrams and markdown together with doxygen.我想这样做是为了从 .dot 图表和降价与 doxygen 的资产中受益。

I think you have to set我想你必须设置

HAVE_DOT = YES

in your doxygen configuration file.在你的 doxygen 配置文件中。 See comment from standard doxyfile:请参阅标准 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

Furthermore you might also have a look at the DOTFILE_DIRS value:此外,您还可以查看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           = 

If you set these values correctly, I think your posted \\dotfile myDiagram.dot command should work.如果您正确设置了这些值,我认为您发布的\\dotfile myDiagram.dot命令应该可以工作。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM