I have a "project book" which uses LaTeX's \documentclass{report}
("report" is like a more compact version of \documentclass{book}
). I would like to include into this book an appendix with the Doxygen-generated API documentation for the software in the project.
I have achieved this by setting Doxygen's config options LATEX_HEADER
and LATEX_FOOTER
to an empty file. This makes the resulting latex/refman.tex have top level commands like: \section{\-Namespace \-Index}
, at which point I can wrap this with a top level document like:
\documentclass{report}
\usepackage{doxygen.sty}
% the "import" package helps to find Doxygen files in the latex/ subdirectory
\usepackage{import}
% [...] title page and the rest of the book
\appendix
\chapter{API reference (generated by Doxygen)
subimport{latex/}{refman.tex}
% [...] final stuff
\end{document}
This works reasonably well and I get doxygen.sty
with this special doxygen invocation:
doxygen -w latex /dev/null /dev/null doxygen.sty
One problem is that this puts an "autogenerated" header on the entire document (not just on the doxygen appendix). I can get rid of this by editing doxygen.sty
(I also rename it for my inclusion, actually) and commenting out the block that starts with % Setup fancy headings
.
At this point I have something I can live with, but I would like to go one step further: the "doxygen" style modifies a lot of other aspects of the LaTeX document style, and I like it less.
So my question is (in two levels of excellence):
What would be a minimal set of LaTeX commands to put in a doxygen.sty file that would nicely render the doxygen appendix but not interfere with the rest of the LaTeX document?
Even better, has someone come up with a way of doing
\usepackage{doxygen_standalone}
% [... until you need doxygen]
\begin{doxygen}
% the stuff you need to insert your auto-generated doxygen API docs,
% for example the \subimport{latex/}{refman.tex} that I showed above
\end{doxygen}
This last approach is one I would consider very clean.
I'm hoping there is a really simple answer, such as "this already exists in doxygen.sty as an option, and you missed it!"
rename doxygen.sty to mydoxygen.sty, then modify it by inserting \newenvironment{doxygen}{... most of doxygen.sty goes here ...}{}
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