Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
Doxygen can write a LaTeX version of your documentation alongside its HTML output, and the LaTeX folder it creates builds into a PDF reference manual (refman.pdf). This guide is for researchers and research software engineers who want a versioned, citable PDF reference for code they release with a paper or dataset. After reading it you should be able to generate the LaTeX output, choose the right build route, and know which settings decide whether you get a PDF, a PostScript file or a DVI file.
Checked against the Doxygen manual and download page on 2026-11-08 (the download page lists release 1.18.0, 13 August 2026).
What Doxygen’s LaTeX output is used for in research
Doxygen reads annotated source code and writes documentation in several formats. According to the Doxygen manual, output can go to html, rtf, latex, xml, man and docbook directories depending on your settings. The LaTeX directory is the route to a print-quality PDF that can be archived with a software release, deposited next to a dataset, or attached to a grant report. A frozen PDF per version serves a similar purpose to a CITATION.cff file: a reader can see what the code offered at the version you cite.
How to install or access it
Download Doxygen from the project’s own page, doxygen.nl/download.html. On 2026-11-08 it listed a Windows 10/11 x64 installer and zip, a Linux (Ubuntu 22.04 x64) tar.gz, macOS 13+ packages for Arm and Intel, the source tarball, and the GitHub repository at github.com/doxygen/doxygen, with SHA-256 checksums so you can check what you downloaded. The same page offers the manual as PDF and CHM.
The PDF step uses the LaTeX program named in your configuration, so a working LaTeX installation must be on your machine. See the guides on compiling LaTeX documents and TeXstudio if you are setting up LaTeX for the first time.
Step-by-step: from source code to refman.pdf
- Create a configuration file. In your project folder run
doxygen -g. With no file name it writes a template calledDoxyfile; with a name,doxygen -g my.cfg, it uses that name. If a file of that name already exists, Doxygen renames it to<config-file>.bakfirst. - Check the LaTeX settings in the file.
GENERATE_LATEX = YESturns the LaTeX output on (it is the default). LeaveUSE_PDFLATEX = YESandPDF_HYPERLINKS = YESfor a PDF with working links (both are defaults in the current configuration reference). - Run Doxygen.
doxygen Doxyfile(or your file name). Output goes to the directory where Doxygen was started unless you change the output location; the LaTeX files land in alatexsubfolder, set byLATEX_OUTPUT. - Build the PDF. Change into the
latexfolder and runmake pdf, the command the manual gives for turning the LaTeX output into a PDF. On Windows Doxygen also writes amake.batnext to theMakefile. WithUSE_PDFLATEX = YESandPDF_HYPERLINKS = YESthe Makefile buildsrefman.pdfdirectly.
doxygen -g Doxyfile
doxygen Doxyfile
cd latex
make pdf
Output and how to read it
The result is refman.pdf in the latex folder, a reference manual built from your annotated source. With PDF_HYPERLINKS = YES the entries are hyperlinked. The other outputs depend on your settings, as the next table shows.
Which build route you get
| USE_PDFLATEX | Command in the latex folder | Result | Extra tool the manual names |
|---|---|---|---|
| NO | make |
refman.dvi |
none named |
| NO | make ps |
refman.ps |
dvips |
| NO | make pdf |
PDF converted from PostScript | Ghostscript |
| YES with PDF_HYPERLINKS = YES | make |
refman.pdf built directly |
none named |
The manual also notes that make ps works best with PDF_HYPERLINKS = NO, and that USE_PDFLATEX = YES improves PDF quality.
Current defaults for the LaTeX tags
Many older tutorials tell you to switch USE_PDFLATEX on. In the configuration reference read on 2026-11-08 it already defaults to YES.
| Tag | Default |
|---|---|
| GENERATE_LATEX | YES |
| LATEX_OUTPUT | latex |
| USE_PDFLATEX | YES |
| PDF_HYPERLINKS | YES |
| PAPER_TYPE | a4 |
| COMPACT_LATEX | NO |
| LATEX_BATCHMODE | NO |
| LATEX_HIDE_INDICES | NO |
| LATEX_BIB_STYLE | plainnat |
| MAKEINDEX_CMD_NAME | makeindex |
| LATEX_CMD_NAME | latex (pdflatex when USE_PDFLATEX is YES) |
| EXTRA_PACKAGES | empty (no extra LaTeX packages) |
For research use, PAPER_TYPE sets the page size, LATEX_BIB_STYLE sets the bibliography style for citations in your comments, and EXTRA_PACKAGES is where you add LaTeX packages your comments rely on.
Troubleshooting
- No PDF, only
refman.dvi.USE_PDFLATEXis set to NO in your configuration. Set it to YES and run Doxygen again, or build the PDF withmake pdf(which then needs Ghostscript). make psoutput looks wrong. The PostScript route needs dvips, and the manual recommendsPDF_HYPERLINKS = NOfor it.- The latex folder is missing. Output goes to the directory where Doxygen was started, in
latexunlessLATEX_OUTPUTsays otherwise. CheckGENERATE_LATEXand where you ran the command. - Your old config disappeared. Running
doxygen -gon an existing name renames the old file to.bak; restore it from there. - A LaTeX error inside
make. The Makefile runs the LaTeX program named inLATEX_CMD_NAME, so the error comes from your LaTeX installation or from the content of your comments. For general LaTeX errors see compiling LaTeX documents.
Choosing a build route
This summarises the table above; the routes are all part of Doxygen’s own Makefile, so there is no separate software to compare. For a PDF to archive with a release, the direct route (USE_PDFLATEX = YES, PDF_HYPERLINKS = YES) is the default and needs no conversion tool. Use the PostScript route only if you need refman.ps. If you only need web documentation, the HTML output needs no LaTeX; for writing LaTeX itself in the browser, see web LaTeX editors.
FAQ
How do I generate a PDF from Doxygen?
Set GENERATE_LATEX = YES, run Doxygen, then run make pdf in the latex output folder. With USE_PDFLATEX = YES and PDF_HYPERLINKS = YES this produces refman.pdf.
Is GENERATE_LATEX on by default?
Yes. The configuration reference lists YES as the default, so a freshly generated Doxyfile already writes the LaTeX folder.
Where does Doxygen put the LaTeX files?
In the latex subfolder (the LATEX_OUTPUT default) of the output location, which defaults to the directory where Doxygen starts.
Do I need Ghostscript or dvips?
Only for the non-direct routes: dvips for make ps, Ghostscript for a PDF made via PostScript when USE_PDFLATEX is NO.
Sources
- Doxygen manual, Getting started, read 2026-11-08.
- Doxygen manual, Output formats, read 2026-11-08.
- Doxygen manual, Configuration, read 2026-11-08.
- Doxygen download page, read 2026-11-08.







