I'm using the book class and I created a table. The table is alone on page and the spacing to the upper edge of the paper is too big. How can I reduce? I tried using
\setlength{\textfloatsep}{0.1cm} but nothing happened. Here is my code:
\documentclass{book}
\usepackage[german]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{booktabs,dcolumn}
\usepackage[figureposition=bottom]{caption}
\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[C]{\leftmark}
\fancyhead[R]{\thepage}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\chaptermark}[1]{
\markboth{#1}{}}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\newcommand*{\mc}[1]{\multicolumn{1}{c}{#1}}
\newcommand*{\mcTwo}[1]{\multicolumn{2}{c}{#1}}
\linespread{1.8}
\setlength\parindent{0pt}
\begin{document}
\chapter {Hello world}
\section{Hello world}
\lipsum
\begin{table}[htbp]
\centering
\caption{Zusammensetzungen einiger SX-Nickelbasislegierungen in wt\%.}
\label{tbl:1}
\begin{tabular}{c d{2.1} d{2.1} d{2.1} d{1.1} d{1.1} d{1.2} d{1.1} d{1.1} d{1.1} d{1.1} d{1.0} d{1.2}}
\toprule
Alloy & \mc{Ni} & \mc{Cr} & \mc{Co} & \mc{Mo} & \mc{W} & \mc{Al} & \mc{Ti} & \mc{Ta} & \mc{Re} & \mc{Nb} & \mc{V} & \mc{Hf} \\
\midrule
\mcTwo{First generation} & & & & & & & & & & & \\
\midrule
PWA~1480 & 62.5 & 10 & 5 & \mc{---} & 4 & 5 & 1.5 & 12 & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\[1ex]
Ren{\'e}~N4 & 62.6 & 9 & 8 & 2 & 6 & 3.7 & 4.2 & 4 & \mc{---} & 0.5 & \mc{---} & \mc{---} \\[1ex]
CMSX-2 & 66.6 & 8 & 4.6 & 0.6 & 7.9 & 5.6 & 0.9 & 5.8 & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\[1ex]
SRR~99 & 66.5 & 8.5 & 5 & \mc{---} & 9.5 & 5.5 & 2.2 & 2.8 & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\
\midrule
\mcTwo{Second generation} & & & & & & & & & & & \\
\midrule
PWA~1484 & 59.4 & 5 & 10 & 2 & 6 & 5.6 & \mc{---} & 9 & 3 & \mc{---} & \mc{---} & \mc{---} \\[1ex]
Ren{\'e}~N5 & 61.8 & 7 & 8 & 2 & 5 & 6.2 & \mc{---} & 7 & 3 & 0.5 & \mc{---} & 0.2 \\[1ex]
CMSX~4 & 61.8 & 6.5 & 9 & 0.6 & 6 & 5.6 & 1 & 6.5 & 3 & \mc{---} & \mc{---} & 0.1 \\[1ex]
CMSX~6 & 70.4 & 10 & 5 & 3 & \mc{---} & 4.8 & 4.7 & 2 & \mc{---} & \mc{---} & \mc{---} & 0.1 \\[1ex]
\midrule
\mcTwo{Third generation} & & & & & & & & & & & \\
\midrule
CMSX-10 & 69.6 & 2 & 3 & 0.4 & 5 & 5.7 & 0.2 & 8 & 6 & 0.1 & \mc{---} & 0.03 \\[1ex]
Ren{\'e}~N6 & 57.4 & 4.2 & 12.5 & 1.4 & 6 & 5.75 & 0 & 7.2 & 5.4 & 0 & 0 & 0.15 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
vspacecommands to pad out the page so you get whatever effect you need to show. As is the code posted is no help at all. However the linked answer most likely solves the problem/ – David Carlisle May 23 '13 at 20:12Undefined control sequence. l.31 \lipsumHowever if I add the code from the answer linked above to your preamble the table moves to the top of the page. So this question should be closed as duplicate/ – David Carlisle May 23 '13 at 20:38\setlength{\@fptop}{0pt}but it's giving an error: ! You can't use `\spacefactor' in internal vertical mode. – abdu May 23 '13 at 20:39\makeatletter– David Carlisle May 23 '13 at 20:39