I am using doxygen to generate a PDF of my code documentation. The PDF has very big margins when using PAPER_TYPE = letter. It looks OK when using a4wide but I would like to have more control over it. I want to use a package called geometry but can’t figure out where to add code like this:
\usepackage[top=2.9cm,left=2in,bottom=1in,right=1in]{geometry}
I would like to not have to change the doxygen-generated tex files if possible.
In your
Doxyfile, add or edit theEXTRA_PACKAGESline:Then create a new file called
mydoxy.sty:Drop that
mydoxy.stywhere LaTeX can find it.The
EXTRA_PACKAGESline will tell Doxygen to add\usepackage{mydoxy}to the preamble of the.texfiles it generates. This will cause LaTeX to look for a file namedmydoxy.sty. In themydoxy.styfile that we’ve created, we can add whatever LaTeX code we like (before the\endinputline). Feel free to drop any other customizations you like in this style file.Note that I haven’t tested this, and I’m making a number of assumptions that may be false. But it should at least get you started.