1

I have got a float, that is minimal too high for a page.

Is it possible to either shift it up a bit, so that it fits between the head- and footsepline or to stretch it with, say 0.9?

My float actually is an algorithm from algorithm2e.

\documentclass[oneside,headsepline,footsepline]{scrbook}

\begin{document}

\begin{table}
\begin{tabular}{c}
This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.
\end{tabular}
\end{table}

\end{document}
1

avoid scaling tables, this fits if you move it slightly:

enter image description here

\documentclass[oneside,headsepline,footsepline]{scrbook}

\begin{document}

\begin{table}
\vspace*{-18pt}
\begin{tabular}{c}
This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.\\This is a looooooooooooooooooooong sentence.
\end{tabular}

\vspace*{-26pt}
\end{table}

\end{document}
  • Works with \begin{algorithm}[H] as well. – Ben Apr 25 at 7:31
0

I guess this question is still interesting for general floats, but for algorithms the adjustbox package helps at stretching!

Be aware, that using the option H might influence the order this algorithm will appear when set with others. You might use H for every algorithm.

\documentclass[oneside,headsepline,footsepline]{scrbook}
\usepackage{adjustbox}
\usepackage{algorithm2e}

\begin{document}

\begin{adjustbox}{totalheight=\textheight}
\begin{algorithm}[H]
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
This is a looooooooooooooooooooong sentence.\;
\end{algorithm}
\end{adjustbox}

\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.