0
votes

I am using doxygen to create documentation (a PDF) for a C project. I would like the index to show up in the TOC. This is simple enough with [pdf]latex.

Problem #1: I cannot use the tocbibind or idxlayout packages (see link above). If I attempt to use these with doxygen

EXTRA_PACKAGES = [nottoc]tocbibind

then doxygen writes to the TeX source file

\usepackage{[nottoc]{tocbibind}}

and the extra {} causes a LaTeX error. This seems to be a bug in doxygen?

Problem #2: This leaves me with the imakeidx package (again, see link above). In the doxygen config file

EXTRA_PACKAGES = imakeidx

But now I need to change from \makeindex to \makeindex[intoc].

Back to the Doxyfile:

MAKEINDEX_CMD_NAME = makeindex[intoc]

But this has no discernible effect. Any suggestions for actually getting the index to show up in the TOC?

1
I can think of at least one workaround (edit the refman.tex file that Doxygen creates... this could even be done with sed -i and wrapped into an alias) but there simply must be a better way...Clay
The problem noted under problem #2 is caused by a misunderstanding, the MAKEINDEX_CMD_NAME is the command to be used in the Makefile / make.bat to convert the tex files to pdf. For the part in the tex file nothing exits.albert
For the problem noted under #2 I've just pushed a proposed patch to github (pull request 715, github.com/doxygen/doxygen/pull/715).albert
Thanks @albert for the very useful info.Clay

1 Answers

0
votes

The issue as described occurred in Doxygen 1.6.1. Problem #1 above has been fixed (see here). In Doxygen 1.8.7 (which I am now using) the index is included in the TOC without issue.

UPDATE: Problem #2 was based upon my own misunderstanding of a configuration option. See the comment from albert, who has proposed a patch that provides the functionality I wanted.

EDIT: The mentioned pull request 715 has been integrated in master on github.