I am using pdfTeX to convert TeX files to PDF. the TeX file is created by Doxygen(version 1.9.3). I want to reduce the line spacing in the PDF output.
After some research, my conclusion was to make changes in doxygen.sty file in those lines:
\newcommand\doxysection{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\raggedright\normalfont\Large\bfseries}}
\newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\large\bfseries}}
\newcommand\doxysubsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxyparagraph{\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxysubparagraph{\@startsection{subparagraph}{5}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\raggedright\normalfont\normalsize\bfseries}}
I am not sure this is the right solution however I cant understand the meaning of:
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
and how to change them to reduce the line spaces in the PDF.
This is my code
\hypertarget{exmp_8c}{}\doxysection{exmp.\+c File Reference}
\label{exmp_8c}\index{exmp.c@{exmp.c}}
Include dependency graph for exmp.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=129pt]{exmp_8c__incl}
\end{center}
\end{figure}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item
static void \mbox{\hyperlink{exmp_8c_a2cbb44cff0cf792a64055ce9c49a1b3f}{func1}} (int a, int b)
\begin{DoxyCompactList}\small\item\em this is a func \end{DoxyCompactList}\item
int \mbox{\hyperlink{exmp_8c_a5be28ec997a6678f448917604b8c8b05}{func2}} (int x)
\begin{DoxyCompactList}\small\item\em this is a func \end{DoxyCompactList}\item
long \mbox{\hyperlink{exmp_8c_a6eb654decf94da92003b86c5b8b2c2f0}{func3}} (char c)
\begin{DoxyCompactList}\small\item\em this is a func \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Function Documentation}
\mbox{\Hypertarget{exmp_8c_a2cbb44cff0cf792a64055ce9c49a1b3f}\label{exmp_8c_a2cbb44cff0cf792a64055ce9c49a1b3f}}
\index{exmp.c@{exmp.c}!func1@{func1}}
\index{func1@{func1}!exmp.c@{exmp.c}}
\doxysubsubsection{\texorpdfstring{func1()}{func1()}}
{\footnotesize\ttfamily static void func1 (\begin{DoxyParamCaption}\item[{int}]{a, }\item[{int}]{b }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
this is a func
\mbox{\Hypertarget{exmp_8c_a5be28ec997a6678f448917604b8c8b05}\label{exmp_8c_a5be28ec997a6678f448917604b8c8b05}}
\index{exmp.c@{exmp.c}!func2@{func2}}
\index{func2@{func2}!exmp.c@{exmp.c}}
\doxysubsubsection{\texorpdfstring{func2()}{func2()}}
{\footnotesize\ttfamily int func2 (\begin{DoxyParamCaption}\item[{int}]{x }\end{DoxyParamCaption})}
this is a func
\mbox{\Hypertarget{exmp_8c_a6eb654decf94da92003b86c5b8b2c2f0}\label{exmp_8c_a6eb654decf94da92003b86c5b8b2c2f0}}
\index{exmp.c@{exmp.c}!func3@{func3}}
\index{func3@{func3}!exmp.c@{exmp.c}}
\doxysubsubsection{\texorpdfstring{func3()}{func3()}}
{\footnotesize\ttfamily long func3 (\begin{DoxyParamCaption}\item[{char}]{c }\end{DoxyParamCaption})}
this is a func
\begin{DoxyParams}{Parameters}
{\em c} & ~\newline
\
\hline
\end{DoxyParams}
I want to remove all those empty lines for example between 2.8.1 and 2.8.1.1



doxygen.stybut to create a new.styfile with just the changed commands in it, in this case a\renewcommandcommand and add the new.styfile to your doxygen run by settingLATEX_EXTRA_STYLESHEET. – albert May 03 '22 at 07:56ccode through doxygen to the LaTeX code. – albert May 03 '22 at 13:29