doxygen cheatsheet

Doxygen commands cheatsheet

This page lists common Doxygen commands and brief descriptions. No styling — plain HTML only.

Comment block styles

Basic tags

CommandUsageDescription
\file / @file\file filenameDocument the file (overrides file brief).
\brief / @brief\brief Short descriptionShort one-line description shown in summaries.
\details / @details\details Longer text...Longer, detailed description.
\param / @param\param[in] name DescriptionDescribe function parameters. Direction specifiers: in, out, in,out.
\return / @return\return DescriptionDescribe return value.
\retval / @retval\retval value DescriptionDocument specific return values (enum or int codes).
\see / @see\see OtherFunctionReference another symbol or topic.
\note / @note\note Important noteSmall note shown in documentation.
\warning / @warning\warning DangerousDisplay a warning callout.
\author / @author\author NameAuthor of the file or module.
\version / @version\version 1.2Version string.
\date / @date\date 2025-10-13Date associated with the documentation.
\deprecated / @deprecated\deprecated Use NewFunction()Marks API as deprecated and suggests alternatives.
\todo / @todo\todo Implement thisList a TODO item to appear in the TODO list.

Grouping and modules

CommandExamplePurpose
\defgroup\defgroup grpname "Group Title"Create a named group/module.
\ingroup\ingroup grpnameAssign a symbol to a group.
\addtogroup\addtogroup grpname "Title"Add subsequent documentation to the group.
\weakgroup\weakgroup nameCreate a group without showing it in module index (less common).

Sections & subsections (within comments)

Formatting and inline markup

MarkupExampleResult
\c\c valueInline code or identifier.
\b\b bold textBold text (simple emphasis).
\a\a ampersandAlternative emphasis (rare).
\em\em emphasizedEmphasis / italics.
\verbatim\verbatim ... \endverbatimPreformatted block (no markup processing).
\code\code ... \endcodeFormatted code block (supports syntax highlighting).
\f$ ... \f$\f$ a^2 + b^2 = c^2 \f$Inline mathematical formula (LaTeX-like).
\f[ ... \f]\f[ E = mc^2 \f]Displayed (block) math.
\nLine1\nLine2New line in some contexts.
\link ... \endlink\link URL Text \endlinkCreates a link with text.
\a refSee \ref other_funcReference another documented symbol.

Special blocks

Including images and files

CommandExampleNotes
\image\image html figure.png "Caption"Include an image; first argument is format (html, latex, rtf).
\include\include file.txtInclude a file verbatim into the documentation.
\verbinclude\verbinclude file.cppInclude file as verbatim/code.
\snippet\snippet source.cpp marker_start marker_endInclude a portion of a source file marked by special comments.

Cross-references and anchors

Advanced / miscellaneous

Examples (short)

/**
* \file example.h
* \brief Example header
*
* Detailed description goes here.
* \author Jane Doe
* \date 2025-10-13
*/

/**
* \brief Compute the sum
* \param[in] a first value
* \param[in] b second value
* \return sum of a and b
*/
int add(int a, int b);

Further reading

Refer to the official Doxygen manual for complete coverage and advanced features.


edit this page