Rafael Catrou
Rafael Catrou

Reputation: 185

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.

Knowing that:

Is it possible to do the same in a markdown rendered by doxygen (without resorting to distant service like gravizo for exemple)?

I'd like to do this to benefit from the assets of .dot diagrams and markdown together with doxygen.

Upvotes: 3

Views: 3495

Answers (2)

Andreas Reiter
Andreas Reiter

Reputation: 11

This also supports files of type *.gv, which are basically the same as *.dot files (no difference in contents) but may be easier to handle if you have MS Word installed and the *.dot file type is associated with Word template files.

Upvotes: 1

flix
flix

Reputation: 177

I think you have to set

HAVE_DOT = YES

in your doxygen configuration file. See comment from standard 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:

# 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.

Upvotes: 4

Related Questions