1
votes

I am working on creating a PDF document of C# code. I am using the Doxygen GUI frontend and using the wizard to create LaTex files. Then, I take the generated refman.tex file and put it into TeXworks (part of MiKTeX) and generate the single pdf output. I can edit the .tex file to get rid of completely blank pages, change the page numbers, and more, but I am having two formatting issues I can't figure out.

The first problem is that each section is a "chapter" and the "chapter" headings are really far down the page (like probably ~40% down the page). I can't seem to find the setting in the .tex file that changes this. (See the linked screenshot below.)

The second problem has to do with the table of contents. It lists all the function names and their inputs. I don't want the inputs listed there. How do I change that?? (See the second screenshot below.)

Here is a small sample of the code...

%===== C O N T E N T S =====

\begin{document}

% Titlepage & ToC
\hypersetup{pageanchor=false,
             bookmarksnumbered=true,
             pdfencoding=unicode
            }
\begin{titlepage}
\vspace*{7cm}
\begin{center}%
{\Large A\+PI Test \#1 \\[1ex]\large beta v1 }\\
\vspace*{1cm}
{\large DOXYGEN GENERATED}\\
\end{center}
\end{titlepage}
\let\cleardoublepage\clearpage
\clearemptydoublepage
\tableofcontents
\clearemptydoublepage
\pagenumbering{arabic}
\hypersetup{pageanchor=true}

%--- Begin generated contents ---
\chapter{Namespace Index}
\input{namespaces}
\chapter{Hierarchical Index}
\input{hierarchy}
\chapter{Class Index}
\input{annotated}
\chapter{File Index}
\input{files}
\chapter{Namespace Documentation}

Page Space on Doxygen generated document

Table of contents function listing

1

1 Answers

0
votes

I had the exact same problem! Using the package titlesec helped a lot. As titlesec accepts vertical values in the format field for the \titleformat command, so I used \vspace{-0.5in} to force the chapters up. I added the following code to my header.tex. JKust mind that I added this before the \usepackage[titles]{tocloft} line.

\usepackage{titlesec,titletoc}
% Headings 1
\titleformat{\chapter}                                      % command
[display]                                                   % shape
{\vspace{-0.5in}\huge\bfseries\filcenter}                   % format
{\LARGE\thechapter}                                         % label
{0.4ex}                                                     % Spacing between label and title
{}                                                          % before code