doxytag Command in Linux



The Linux doxytag command generates a tag and search-index files of doxygen-generated documentation. The tag file links different documentation generated by the doxygen utility. However, the search index file contains the keywords of classes, functions, variables, and other parameters with their location in the documentation.

Table of Contents

Here is a comprehensive guide to the options available with the doxytag command −

Note − The doxytag command has been made obsolete from doxygen version 1.8.0. In the later versions, the tag and search index handling has been integrated with the doxygen.

Syntax of doxytag Command

The general syntax of the doxytag command is as follows −

doxytag [options] [html_files]

The [options] field is used to specify the options to generate a tag of the search-index file. The [html_files] is used to specify the HTML documentation generated by the doxygen command.

If the html files are not specified then all the files with .html extension in the current directory will be parsed.

doxytag Command Options

The options used with the doxytag command are listed in the following table −

Options Description
-t tagfile To create the tag file from the documentation HTML files
-s indexfile To create the search index file from the documentation HTML files

Using the doxytag Command in Linux

This section demonstrates the usage of the doxytag command in Linux −

Generating the Tag File

To generate the tag file from the documentation HTML files, use the -t option −

doxytag -t myproject.tag html/*.html

Here, the tag file is given .tag extension, while html/*.html indicates all the HTML files in the html directory. The html directory is created when the documentation is generated from the doxygen command in the current directory.

Generating the Search Index File

To generate the search-index file, use the -s option −

doxytag -s myproject.idx html/*.html

Here, myproject.idx is the index file name, while html/*.html indicates all the HTML files in the html directory.

Generating a Tag and Search-Index Files through doxygen

The doxytag command is useful if you do not have the source file. If you have the source file then using the doxygen command to generate the tag and search index files is recommended.

The tag and search index file can be created through the doxygen configuration file. For example, if you have a source code file, simply modify the configuration file to generate a tag or search index file. The configuration file is generated through the following command −

doxygen -g [filename]

Open the file in any text editor such as nano, or vim. Search for the GENERATE_TAGFILE directive and assign the name of the file as shown in the image below −

Tag and Search-Index Files through doxygen 1

Similarly, to generate the search index file find the SEARCHENGINE directive in the configuration file and enable it by typing YES. By default, it is enabled.

Tag and Search-Index Files through doxygen 2

Save the configuration file and run the doxygen command to generate documentation. After the command execution, a tag file will be generated. The search index files with the .js extensions will be generated in the /html/search directory.

Tag and Search-Index Files through doxygen 3

Linking Tag Files of Multiple Documentations

To create references of multiple documentations the TAGFILES is modified. Suppose you have documentation of two projects; Project1 and Project2. First, create the tag file of Project1 (project1.tag) through the configuration file.

To integrate the Project1 tag file into the Project2 tag file, open the configuration file of Project2 and modify the TAGFILES field in the way shown below −

TAGFILES = [path_to_project1_tag]=[path_to_project1_html]
Linking Tag Files of Multiple Documentations

After making these modifications, generate the documentation of Project2 which will reference the documentation of Project1.

Conclusion

The doxytag command generates the tag and search index files from HTML files of doxygen documentation. However, this command has been made obsolete and tag and index file generation is integrated into the doxygen configuration file.

If the doxygen version is lower than 1.8.0 then the doxytag can be used. This tutorial discussed the doxytag command, its syntax, and its usage in Linux. Additionally, the methods to generate tag files using the doxygen command are also elaborated.

Advertisements