# Automatic Documentation Generator for Source File

**URL:** <https://fortran-lang.discourse.group/t/automatic-documentation-generator-for-source-file/279>\
**Category:** Help\
**Created:** [August 29, 2020, 6:38pm UTC](https://fortran-lang.discourse.group/t/automatic-documentation-generator-for-source-file/279 "2020-08-29T18:38:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://fortran-lang.discourse.group/u/Robert)\
**Post date:** [August 29, 2020, 6:38pm UTC](https://fortran-lang.discourse.group/t/automatic-documentation-generator-for-source-file/279/1 "2020-08-29T18:38:44Z")

</div>

I would like to hear what positive or negative reviews people can give for source file “automatic” documentation generators. What program do you recommend that I give a try. I see that there is FORD, Doxygen, Sphinx-Fortran, ROBODoc, Fortrandoc and others. There seem to be two categories of doc generators. Some just process special comments that are manually inserted, and some try to read the Fortran and make sense of it. Ideally I would like something that does a bit of both. I would like to find something out there that automatically produces a list of all routines, and for each routine lists what it calls and what calls it? Adding to the wish list, the doc generator would list out variables. Thank you for your suggestions!

---

<div class="post-metadata">

**Author:** ![rgoswami](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/rgoswami/32/23_2.png) [@rgoswami](https://fortran-lang.discourse.group/u/rgoswami)\
**Post date:** [August 31, 2020, 10:41am UTC](https://fortran-lang.discourse.group/t/automatic-documentation-generator-for-source-file/279/2 "2020-08-31T10:41:08Z")

</div>

I’ve had good experiences with FORD. It’s the most robust of the existing tools. I’ve also had to work with Doxygen, but it takes more manual tinkering.

---

<div class="post-metadata">

**Author:** ![jeremie.vandenplas](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@jeremie.vandenplas](https://fortran-lang.discourse.group/u/jeremie.vandenplas)\
**Post date:** [September 1, 2020, 7:59pm UTC](https://fortran-lang.discourse.group/t/automatic-documentation-generator-for-source-file/279/3 "2020-09-01T19:59:06Z")

</div>

FORD is used for `stdlib`. See [here](https://stdlib.fortran-lang.org/index.html) the result of applying FORD on `stdlib` specs and source code. I prefer FORD output over Doxygen output.

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://fortran-lang.discourse.group/u/Robert)\
**Post date:** [September 1, 2020, 9:38pm UTC](https://fortran-lang.discourse.group/t/automatic-documentation-generator-for-source-file/279/4 "2020-09-01T21:38:51Z")

</div>

Thank you for the recommendation to check out FORD.

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [October 16, 2020, 4:29pm UTC](https://fortran-lang.discourse.group/t/automatic-documentation-generator-for-source-file/279/5 "2020-10-16T16:29:17Z")

</div>

Hi,

in the early days of our gtk-fortran project some documentation was automatically generated from source code comments, but the memory of which tool was exactly used is uncertain… This is the syntax that was used in the comments:

- A block delimited by !\* and !/ provides a section header.
- A block delimited by !+ and !- describes an individual routine. The arguments are described in a colon-separated list with `name: type : status : description`.

See for example that file: [https://github.com/vmagnin/gtk-fortran/blob/gtk4/src/gtk-hl-container.f90](https://github.com/vmagnin/gtk-fortran/blob/gtk4/src/gtk-hl-container.f90)  
And an example of a generated documentation: [https://github.com/vmagnin/gtk-fortran/wiki/Highlevel-api](https://github.com/vmagnin/gtk-fortran/wiki/Highlevel-api)

Do you think the tool could be Doxygen ? I tried to used Doxygen but didn’t succeeded to obtain something from those blocks.

Do you think FORD could be configured to use these block syntaxes?

---

<div class="post-metadata">

**Author:** ![jeremie.vandenplas](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@jeremie.vandenplas](https://fortran-lang.discourse.group/u/jeremie.vandenplas)\
**Post date:** [October 16, 2020, 6:12pm UTC](https://fortran-lang.discourse.group/t/automatic-documentation-generator-for-source-file/279/6 "2020-10-16T18:12:51Z")

</div>

@vmagnin By defauld FORD interprets comments starting with `!!` and that come after what it should be documented as documentation (as well as comments starting with `!>` that are placed before what should be documented).  
However, both default marks (`!!` and `!>`) can be changed. You can find more details [here](https://github.com/Fortran-FOSS-Programmers/ford/wiki/Project-File-Options#documentation-markers).
