【问题标题】:Doxygen Markdown : How to include and render a .dot GraphViz fileDoxygen Markdown:如何包含和呈现 .dot GraphViz 文件
【发布时间】:2018-02-11 10:59:43
【问题描述】:

我有 Graphviz 文件“foo.dot”,其中包含我想在带有 doxygen 的降价“bar.md”中呈现的图表。

知道:

  • Doxygen 支持 markdown(我解决了单独的 markdown .md 文件的情况);
  • Doxygen 支持 Graphviz .dot 文件以及源代码中的指令(.cpp 或其他)。

是否可以在 doxygen 呈现的降价中做同样的事情(例如,不求助于像 gravizo 这样的远程服务)?

我想这样做是为了从 .dot 图表和降价以及 doxygen 的资产中受益。

【问题讨论】:

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

标签: markdown doxygen graphviz


【解决方案1】:

我认为你必须设置

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           = 

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

【讨论】:

    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 2013-08-15
      • 2019-11-13
      • 1970-01-01
      • 1970-01-01
      • 2013-07-29
      • 1970-01-01
      • 2011-09-14
      • 2019-10-19
      • 2014-01-31
      相关资源
      最近更新 更多