Skip to main content
v2026.11,986 entries · CC-BY 4.0

Doxygen LaTeX: Generate a PDF Reference Manual (refman.pdf)

Generate Doxygen LaTeX output and build refman.pdf: the commands, a USE_PDFLATEX route table and current defaults, checked against the manual.

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

  1. Create a configuration file. In your project folder run doxygen -g. With no file name it writes a template called Doxyfile; 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>.bak first.
  2. Check the LaTeX settings in the file. GENERATE_LATEX = YES turns the LaTeX output on (it is the default). Leave USE_PDFLATEX = YES and PDF_HYPERLINKS = YES for a PDF with working links (both are defaults in the current configuration reference).
  3. 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 a latex subfolder, set by LATEX_OUTPUT.
  4. Build the PDF. Change into the latex folder and run make pdf, the command the manual gives for turning the LaTeX output into a PDF. On Windows Doxygen also writes a make.bat next to the Makefile. With USE_PDFLATEX = YES and PDF_HYPERLINKS = YES the Makefile builds refman.pdf directly.
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_PDFLATEX is set to NO in your configuration. Set it to YES and run Doxygen again, or build the PDF with make pdf (which then needs Ghostscript).
  • make ps output looks wrong. The PostScript route needs dvips, and the manual recommends PDF_HYPERLINKS = NO for it.
  • The latex folder is missing. Output goes to the directory where Doxygen was started, in latex unless LATEX_OUTPUT says otherwise. Check GENERATE_LATEX and where you ran the command.
  • Your old config disappeared. Running doxygen -g on 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 in LATEX_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

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Doxygen LaTeX: Generate a PDF Reference Manual (refman.pdf)

2 free questions a day, no account.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →