0

I am trying to avoid the massive gaps between the sections. Section 2 should start on page 87 instead of page 88. Does anyone know, how to fix this? Thank you in advance!

This is my code:

\begin{document}
...
\section{1}
\begin{figure}[ht!]
  \centering
  \subfloat{\includegraphics[width=0.45\textwidth]{Versuchohneacc1024_FFT.eps}}
  \hfill
  \subfloat{\includegraphics[width=0.45\textwidth]{Versuchohnacc1024_STFT.eps}}
  \caption[Ergebnisse der FFT \& STFT mit einem idealen Messsignal bei einer Analyse von 1024 Samples]{Ergebnisse der FFT \& STFT}
  \label{fig:Start}
\end{figure}
\begin{figure}[ht!]
  \centering
  \subfloat{\includegraphics[width=0.45\textwidth]{Versuchohneacc1024_FFT.eps}}
  \hfill
  \subfloat{\includegraphics[width=0.45\textwidth]{Versuchohnacc1024_STFT.eps}}
  \caption[Ergebnisse der FFT \& STFT mit einem idealen Messsignal bei einer Analyse von 1024 Samples]{Ergebnisse der FFT \& STFT}
  \label{fig:Start}
\end{figure}
\begin{figure}[ht!]
  \centering
  \subfloat{\includegraphics[width=0.45\textwidth]{Versuchohneacc1024_FFT.eps}}
  \hfill
  \subfloat{\includegraphics[width=0.45\textwidth]{Versuchohnacc1024_STFT.eps}}
  \caption[Ergebnisse der FFT \& STFT mit einem idealen Messsignal bei einer Analyse von 1024 Samples]{Ergebnisse der FFT \& STFT}
  \label{fig:Start}
\end{figure}
\begin{figure}[ht!]
  \centering
  \subfloat{\includegraphics[width=0.45\textwidth]{Versuchohneacc1024_FFT.eps}}
  \hfill
  \subfloat{\includegraphics[width=0.45\textwidth]{Versuchohnacc1024_STFT.eps}}
  \caption[Ergebnisse der FFT \& STFT mit einem idealen Messsignal bei einer Analyse von 1024 Samples]{Ergebnisse der FFT \& STFT}
  \label{fig:Start}
\end{figure}
\begin{figure}[ht!]
  \centering
  \subfloat{\includegraphics[width=0.45\textwidth]{Versuchohneacc1024_FFT.eps}}
  \hfill
  \subfloat{\includegraphics[width=0.45\textwidth]{Versuchohnacc1024_STFT.eps}}
  \caption[Ergebnisse der FFT \& STFT mit einem idealen Messsignal bei einer Analyse von 1024 Samples]{Ergebnisse der FFT \& STFT}
  \label{fig:Start}
\end{figure}
\clearpage
\section{2}
...
\end{document}
2
  • 2
    we can't run your code example and the image is just a lot of green crossing out so it is rather hard to guess your issue. It would be much easier if you posted a real example that showed your issue, you can use dummy text and example-image as the image. – David Carlisle Feb 4 at 19:56
  • really is hard to guess why you got the layout but as a start I would replace all [!ht] by [tp] (or simply remove the option) ! means special-case override the constraints designed to force good layout. – David Carlisle Feb 4 at 20:09
0

It is hard to tell with no example, but I think your document is showing

enter image description here

\documentclass{book}

\begin{document}

aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaa

\section{1}
\begin{figure}[!ht]  \centering  \rule{5pt}{.25\textheight}  \caption{zzz}\end{figure}
\begin{figure}[!ht]  \centering  \rule{5pt}{.25\textheight}  \caption{zzz}\end{figure}
\begin{figure}[!ht]  \centering  \rule{5pt}{.25\textheight}  \caption{zzz}\end{figure}
\begin{figure}[!ht]  \centering  \rule{5pt}{.25\textheight}  \caption{zzz}\end{figure}
\begin{figure}[!ht]  \centering  \rule{5pt}{.25\textheight}  \caption{zzz}\end{figure}
\clearpage
\section{2}
\end{document}

Note that ! means to override the constraints that are designed to prevent misplaced figures. It is useful in special cases but it isn't helping here.

enter image description here

\documentclass{book}

\begin{document}

aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaaa\\
aaa

\section{1}
\begin{figure}[htp]  \centering  \rule{5pt}{.25\textheight}  \caption{zzz}\end{figure}
\begin{figure}[htp]  \centering  \rule{5pt}{.25\textheight}  \caption{zzz}\end{figure}
\begin{figure}[htp]  \centering  \rule{5pt}{.25\textheight}  \caption{zzz}\end{figure}
\begin{figure}[htp]  \centering  \rule{5pt}{.25\textheight}  \caption{zzz}\end{figure}

\clearpage
\begin{figure}[htp]  \centering  \rule{5pt}{.25\textheight}  \caption{zzz}\end{figure}
\section{2}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.