Ora

How Do I Disable LaTeX in Doxygen?

Published in Doxygen Configuration 2 mins read

To disable LaTeX output in Doxygen, you must modify its configuration file, typically named Doxyfile or doxygen.ini, and set the GENERATE_LATEX option to NO.

Understanding Doxygen's Configuration

Doxygen relies on a configuration file to determine how it processes your source code and generates documentation. This file contains various settings that control the output format, input files, warnings, and much more. Disabling LaTeX output is a straightforward modification within this file.

Locating Your Doxygen Configuration File

Before you can disable LaTeX, you need to find or create your Doxygen configuration file:

  • Existing Project: If you already have a Doxygen project set up, locate the Doxyfile (or doxygen.ini) in the root directory of your project.
  • New Project: If you are setting up Doxygen for the first time, you can generate a default configuration file by running the following command in your project's root directory from your terminal:
    doxygen -g

    This command creates a Doxyfile with all default options commented out, which you can then edit.

Modifying the Configuration to Disable LaTeX

Once you have your Doxygen configuration file, open it with a plain text editor. You will need to find and modify the GENERATE_LATEX tag.

Step-by-Step Guide:

  1. Open the file: Use any text editor (e.g., Notepad, VS Code, Sublime Text, Vim, Nano) to open your Doxyfile or doxygen.ini.
  2. Find GENERATE_LATEX: Search for the line that contains GENERATE_LATEX. This line might be commented out, indicated by a # character at the beginning.
  3. Set to NO: Change its value from YES (which is often the default) to NO. If it was commented out, remove the # character as well.

Here's how the relevant line should appear after your modification:

Option Description Value
GENERATE_LATEX If set to NO, Doxygen will not generate LaTeX output. NO

Example of the line in your Doxyfile after modification:

# This tag specifies whether or not Doxygen should generate LaTeX output.
# The default value is YES.
GENERATE_LATEX         = NO

Verifying the Change

After saving the modified configuration file, run Doxygen again (e.g., doxygen Doxyfile). It will no longer produce LaTeX-related files (such as .tex files or the latex directory) in your output folder, confirming that LaTeX generation has been successfully disabled.