---
# System prepended metadata

title: Introduction to Doxygen
tags: [NTURT, electrical_system, tutorial]

---

# Introduction to Doxygen
###### tags: `tutorial` `electrical_system` `NTURT`
##### Author: @QuantumSpawner 

## Why using doxygen

Coding in a perplexing manner is one's own right when working on a project alone, but it's a totally different story when collaborating with others. Hence **every sigle person** should document their code for others to understand.

Doxygen has been the synonym for documenting C/C++ programs, it even supports other programming languages such as python javascript, etc.

It also generate beautiful web page such as: [VTK documentation](https://vtk.org/doc/nightly/html/index.html) for others new to the program have a greate place to start.

## Using doxygen

Doxygen with latex support can be installed in (debian-based) linux by:

```bash=
sudo apt install doxygen-latex
```

or a very handly [VS code extension for doxygen](https://marketplace.visualstudio.com/items?itemName=cschlosser.doxdocgen) can be used to generate and highlight the syntax of doxygen.

### External resources

Official website: [doxygen](https://doxygen.nl/)
Tutorial: [How to document your code using doxygen](https://flcwiki.desy.de/How%20to%20document%20your%20code%20using%20doxygen)
Parameters to use when using doxygen: [Doxygen parameters](https://www.doxygen.nl/manual/commands.html)

:::info
Note: In order to use latex in doxygen, please change `USE_MATHJAX` setting to `YES` (default to `NO`) in the doxygen config file `Doxyfile`.
:::

## Doxygen homework

Since all code should be documented, plase document your code using doxygen when you see

:::success
Please document your code using doxygen.
:::

in `homework`or`topic` section of other tutorials.

The documentation should include but not exclusive for `\author`, `\brief`, `\param` and `\return` parameters. And then generate a `html` file. Please submit both the generated `html` file and the documented code when submitting homeworks/topics.
