0

The following option in the Doxyfile can be used to hide the trailing "Class Reference" text from a page title.

# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then Doxygen will
# append additional text to a page's title, such as Class Reference. If set to
# YES the compound reference will be hidden.
# The default value is: NO.

HIDE_COMPOUND_REFERENCE = YES

But this does not work for Namespace pages, which still have the "Namespace Reference" text appended. This is an issue particularly for those using the OPTIMIZE_OUTPUT_JAVA tag, since that presents namespaces as packages. The result is documentation where clicking on Packages takes you to a page that says Namespace Reference, which is a little misleading.

# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
# Python sources only. Doxygen will then generate output that is more tailored
# for that language. For instance, namespaces will be presented as packages,
# qualified scopes will look different, etc.
# The default value is: NO.

OPTIMIZE_OUTPUT_JAVA   = YES

Running Doxygen 1.13.2 on Windows 11.

Example

Two sourcecode files.

demo_class.py

class demo_class():
    """
    This is a demo class
    """

demo_module.py

"""
In Python nomenclature, this file is a module.
"""

def demo_function_1():
    """
    This is a demo function
    """
    
def demo_function_2():
    """
    This is another demo function
    """

And the following modifications to the Doxyfile.

OPTIMIZE_OUTPUT_JAVA   = YES
HIDE_COMPOUND_REFERENCE= YES

The resulting documentation has a Packages section and a Classes section.

enter image description here

However, the page for the demo_module says Namespace in the title, even though it is in the Packages section.

enter image description here

Whereas, the page for the demo_class has Class hidden from the title by the HIDE_COMPOUND_REFERENCE setting.

enter image description here

8
  • Can you please add a small example (source plus settings different from the default settings, so doxygen -x Doxyfile) so it would be possible to reproduce the problem. Maybe also add an image indicating the problem. Commented Mar 4 at 10:32
  • Despite the missing reaction and example a proposed pull request has been made github.com/doxygen/doxygen/pull/11482 Commented Mar 6 at 9:57
  • Sorry for the slow reply with this. Been a hectic week. I can provide an example if it is still necessary, but it may have to wait until the weekend. Commented Mar 7 at 8:17
  • Best it to test the patch. Commented Mar 7 at 8:18
  • Just added an example. Sorry this took so long! Commented Mar 11 at 10:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.