Doxygen Basics

References

  1. reference for tags
  2. Video Reference
  3. Good Table of Contents Reference
  4. Basic Documentation Files
  5. Generated Documentation
  6. Commonly Used Tags

PHP Paginator project with Doxygen Documentation

  1. git
  2. Documentation

Install

Download
You have to enter email and password, download link will be mailed

Start

Tripple slashes & a lesstan symbol ///< is single line comment for doxygen

  1. first senetence is brief description
  2. subsequent sentences constitute detailed description

Using Doxywizard

Wizard tab

  1. Open doxy wizard. Initial tab is Wizard tab
    set

    1. Working Directory : Folder where DoxyFile will be saved.
    2. source folder : Folder of source files to parseand create documentation
    3. target folder(destination for generated documentation files)
    4. project name
    5. project synopsis
    6. project version
    7. project logo
    8. Check Scan recursively
  2. Go to Topics >>Output, Uncheck Latex, since we only need html
    1. in the Topics list, select output
    2. Uncheck Latex
  3. If you are using PHP, go to Topics >> Mode and check Optimize for C or PHP output
  4. Go to Run Tab >> Run Doxygen

Expert tab

To set all configuration options go to Expert tab

Important config options

  1. Under Topics >>Project
    1. JAVADOC_AUTOBRIEF : required for extracting comments with three slashes ///
    2. Add js=JavaScript to EXTENSION_MAPPING for checking Javascript files
  2. Under Topics >>Build
    1. Check EXTRACT_ALL : Extract all comments
    2. Uncheck SHOW_USED_FILES
  3. Under Topics >>HTML
    1. Check GENERATE_TREE_VIEW
    2. Check DISABLE INDEX : To remove top bar
  4. Under Topics >>Inputs
    1. add additional external source folders in INPUT
    2. add folders to ignore in EXCLUDE
    3. For adding images in documentation pages, set IMAGE_PATH
    4. For loading javascript files add *.js in FILE PATTERNS

Special actions for Javascript Parsing

  1. Under Topics >>Project,Add js=JavaScript for checking Javascript files
  2. Under Topics >>Inputs, add *.js in FILE PATTERNS
  3. Make use of defgroup, ingroup, addtogroup and file tags
  4. for functions usefn tag
  5. to ignore code enclose in cond and endcod tags
    For more details, use cccontact.js as reference

Important tags

  1. @brief
  2. @param
  3. @returns
  4. @details
  5. @see anotherMemebreFunction() anotherMemebreFunction2()
  6. @note
  7. @attention
  8. @warning
  9. @date
  10. @returns
  11. @see
  • in Details, you could use markdown

Tutorial Pages

Could be

  1. html
  2. markdown

PS: Ideal to save them in seperate folder say doxyip/tutorials

Main Page

@mainpage tag marks main page. This will be the first page in the documentation

Additional pages

  1. @page pageId Page Title
  2. @tableofcontents
  3. @section sectionId Section Title
  4. @subsection subsectionId SubSection Title

Sub pages

Below @page pageId Page Title
Add @subpage pageIdOfIntendedSubpage

Link to other pages

@ref pageId/sectionId/SubsectionId

eg:

See this page for more @ref SubsectionId

Inserting Images

  1. use markdown tag for images
  2. save image in IMAGE_PATH set above
    PS: Ideal to save them in seperate folder say doxyip/images

Creating final documentation pages

  1. To save the current configuration, do to File >> Save .
    1. Save the configuration file witha name of your choice. This is for future use
    2. You can use File >> Open to use the saved config file later
  2. Click Run doxygen
  3. Alternatively once configuration file is saved, you can run in command line
doxygen ConfigFileName

Some Nuances

Caching issue after gnenerating new documentation / Old Index(tree) still shows up

Solution

Referesh the following js files

  1. html/navtreedata.js
  2. html/navtreeindex0.js

Creating PDF documentation

  1. Go to Topics >>Output, Check Latex. To know more about latex click here)
  2. Run Doxygen
  3. go to latex output and run make.bat

Errors like: 'pdflatex' is not recognized as an internal or external command,... Mean that you do you needto install pdflatex

There are a lot of options available here

Popular choices are

  1. MikTeX
  2. TeX Live
  3. W32TeX