# Formatting Comments for Doxygen

The ROOT team has adopted Doxygen for generating the Reference Guide. Here you will find a number of conventions and tips to be used in source code to generate proper documentation.

## How to generate the doxygen documentation

Developers may generate the documentation by hand to see the results of the current changes before committing them to the repository. The automatic daily Jenkins procedures will generate the complete set of documentation.

### Tables

Markdown tables are very convening for tabulated documentation. See the following example:

### Grouping classes in modules

You can group the classes according to the corresponding packages (e.g. math, hist, tree, etc…). In order to do this, you need to define first somewhere, as a code comment or in a separate page a group using the \defgroup tag. Example

Then one needs to add in the class description comments the \ingroup tag. For example in the class TH1, which is part of the Hist group one should add

### Include additional documentation pages in HTML or Markdown format

One can add extra pages for the documentation in HTML or Markdown format (preferable) in the package/doc directory (e.g. hist/doc). These page could be used to provide a general documentation of the package. The pages should be included in a file with name as the package name and the .md or .html suffix (e.g. hist.md). The file should contain, in addition to the package description, the Doxygen command \page [name] [title] which defines the internal page name (used to reference that page) and the page title.

For example:

Inside page you can reference to groups or other pages using the Doxygen commands \subpage [refname] ["text"] and \ref [refname] ["text"]. See as example the existing math/doc/Math.md file.