移动或拉伸浮点数

移动或拉伸浮点数

我得到了一个浮点数,但它对于页面来说太高了。

是否可以将其稍微上移,以便它适合head- 和之间,footsepline或者将其拉伸,比如说0.9

我的浮点数实际上是一种来自的算法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

避免缩放表格,只要稍微移动一下就可以了:

在此处输入图片描述

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

答案2

我猜这个问题对于一般浮点数来说仍然很有趣,但对于algorithms 来说,这个adjustbox包有助于拉伸!

请注意,使用该选项H可能会影响与其他选项一起设置时出现的顺序algorithm。您可以H对每个选项使用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}

相关内容