I'm trying to generate PDF from source files using Doxygen and MikTex (also Tex Live tested) but with no success. Here is an example file which from I'm trying to generate the documentation:
/**
* @defgroup Example examplegroup
* @{ */
/**
* @brief Example function
* @param[in] e example var */
void exampleFunction( int e )
{
(void)e;
}
/** @} */
And when I try to run latex/make.bat to generate PDF I get error:
//...
("C:\Program Files\MiKTeX 2.9\tex/latex/caption\ltcaption.sty"))
("C:\Program Files\MiKTeX 2.9\tex/latex/etoc\etoc.sty")
No file refman.aux.
("C:\Program Files\MiKTeX 2.9\tex/latex/base\ts1cmr.fd")
("C:\Program Files\MiKTeX 2.9\tex/latex/psnfss\t1phv.fd")
("C:\Program Files\MiKTeX 2.9\tex/context/base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
) ("C:\Program Files\MiKTeX 2.9\tex/latex/oberdiek\epstopdf-base.sty"
("C:\Program Files\MiKTeX 2.9\tex/latex/oberdiek\grfext.sty"))
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
("C:\Program Files\MiKTeX 2.9\tex/latex/hyperref\nameref.sty"
("C:\Program Files\MiKTeX 2.9\tex/generic/oberdiek\gettitlestring.sty"))
No file refman.toc.
[1{C:/Users/FIJOGRE/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
[2]
Chapter 1.
(modules.tex ("C:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\umsa.fd")
("C:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\umsb.fd")
("C:\Program Files\MiKTeX 2.9\tex/latex/wasysym\uwasy.fd")
LaTeX Warning: Reference `group___example' on page 1 undefined on input line 3.
) [1] [2]
Chapter 2.
(group___example.tex ("C:\Program Files\MiKTeX 2.9\tex/latex/psnfss\ts1phv.fd")
("C:\Program Files\MiKTeX 2.9\tex/latex/psnfss\t1pcr.fd")
! Missing } inserted.
<inserted text>
}
l.28 \end{DoxyParams}
?
So what I have concluded is that when I use param-tag in source file comments, the doxygen generates this kind of DoxyParams section to doxygen.sty that causes the issues:
%...
% Used by parameter lists
\newenvironment{DoxyParams}[2][]{%
\tabulinesep=1mm%
\par%
\ifthenelse{\equal{#1}{}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description
{\ifthenelse{\equal{#1}{1}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc
}
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
%...
I'm thinking maybe the ifthen-begins are not properly closed with end-tags? because if I remove the first ifthens and begins I get the pdflatex to work. Or is there something else? Is there a bug in Doxygen that generates invalid doxygen.sty? Or is the issue somewhere else? What can I do to make the documentation generation to work correctly?
EDIT:
More info, I think the issue is also related to grouping, because if I remove the groupings the generation works. So defgroup + param with doxygen + pdflatex -> problems.
This medication is used to treat a wide variety of bacterial infections, including those that cause acne. This medication is also used to prevent malaria. This medication is known as a tetracycline antibiotic. It works by stopping the growth of bacteria.
Doxygen is a tool that can generate project documentation in html, pdf or Latex from code comments formatted with Doxygen markup syntax. The generated documentation makes easier to navigate and understand the code as it may contain all public functions, classes, namespaces, enumerations, side notes and code examples.
Doxygen is the de facto standard tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, and to some extent D.
Doxygen enables you to provide a comprehensive overview of the structure of your code without additional effort. While Doxygen is mainly used to document C++, you can use it for many other languages, like C, Objective-C, C#, PHP, Java, Python, and more.
All the credits go to albert since the issue was about the LaTex tabu-package as he suggested. Here is a small summary about the issue.
There is a problem with the LaTeX tabu package, due to a change (Dec/2018) in latex3/latex2e (https://github.com/latex3/latex2e/issues/111 & https://github.com/doxygen/doxygen/issues/6769) that causes generation to fail in certain situations when 'tabu' is used (the developer of longtabu-package has gone long time ago and the package is not maintained anymore).
There is already patch (https://github.com/tabu-fixed/tabu) available (and already updated in the newest MikTek release) that fixes most of the cases (like the Doxygen documentation, that couldn't be generated without patching the tabu-package), but it doesn't work on all the situations. Example including a table in the tabu-environment breaks the generation even with the patched tabu-package.
If the patch doesn't fix the issue, it is advised to to use a TeX version from before the change (https://github.com/latex3/latex2e).
If downgrading or using older (Mik)TeX version is not an option, one workaround would be to use some other package instead of the broken one. For example writing a script that edits the doxygen.sty definitions for those parts that utilize longtabu* and replaces those longtabu*:s with {longtable}{|c|c|c|c|} after Doxygen has generated the doxygen.sty file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With