Skip to content

Commit 89c4556

Browse files
committed
Space around images in LaTeX output is sometimes a bit large
When we look at images in documents we see for a number of images a big amount of white space around the image. This is e.g. the case in the doxygen manual at page 99 of the 1.8.20 version. - using `\raggedbottom` sees to it that the space inside the page is removed (there might be some white space when the next image doesn't fit anymore. (See https://tex.stackexchange.com/questions/566779/placing-figures-on-a-fixed-place-without-lot-of-space-around-it) - use `\centering` instead of `\begin{center}` as the center environment adds some extra white space (see a comment with the question, on a different subject though: https://stackoverflow.com/questions/64328597/pdftex-warning-saying-about-duplicate-figures#comment113772445_64328597)
1 parent f64705e commit 89c4556

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

doc/doxygen_manual.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
\usepackage{etoc}
123123
\etocsettocstyle{\doxytocparskip}{\doxynormalparskip}
124124
\begin{document}
125+
\raggedbottom
125126
\pagenumbering{alph}
126127
\begin{titlepage}
127128
\includegraphics[width=\textwidth]{doxygen_logo}

src/latexgen.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,8 @@ static void writeDefaultHeaderPart1(FTextStream &t)
774774
// End of preamble, now comes the document contents
775775
t << "%===== C O N T E N T S =====\n"
776776
"\n"
777-
"\\begin{document}\n";
777+
"\\begin{document}\n"
778+
"\\raggedbottom\n";
778779
QCString documentPre = theTranslator->latexDocumentPre();
779780
if (!documentPre.isEmpty())
780781
{

templates/latex/doxygen.sty

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,8 @@
186186
% (only if caption is specified)
187187
\newenvironment{DoxyImage}{%
188188
\begin{figure}[H]%
189-
\begin{center}%
189+
\centering%
190190
}{%
191-
\end{center}%
192191
\end{figure}%
193192
}
194193

0 commit comments

Comments
 (0)