I've put a table between two paragraphs (using the table environment to make it float) and I was clearly happy to see it move on the next page (something Word won't do !). BUT, when I saw the space it left between my two paragraphs, I lost that happiness.
Here is a MWE where you can see my problem :
Warning ! Long code ... I kept every thing I thought might be of some help.
Code: Select all
\documentclass[12pt,oneside]{book}
\usepackage{setspace} % package pour la taille des interlignes
\usepackage{latexsym}
\usepackage{multirow} % allow multirow
\usepackage{dcolumn} % allow to center a table on the decimal point
\usepackage{booktabs} % allow professionnal table presentation (toprule midrule bottomrule)
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ae,aecompl}
\usepackage{fancyhdr} % package pour mettre le nom des chapitres en haut de chaque page
\usepackage[francais]{babel}
\textheight=22cm \textwidth=14cm \oddsidemargin=2.25cm \topmargin=-20pt
\parskip=10pt %Saut entre les paragraphes
\parindent=0pt % Pour enlever toute indentation de début de paragraphe.
\begin{document}
\onehalfspacing % Interligne 1,5
Some text here to create a paragraph in which I discuss results I have printed in Table 1.
\begin{center}
\begin{table}[!tp]\footnotesize
\caption[Short title]{\textbf{Official title} \\{\small Here we have a long long description of this table ... it should take from 5 to 10 lines once printed }\\}
\begin{tabular*}{1\textwidth}{@{\extracolsep{\fill}} c D{,}{,}{-1} D{,}{,}{-1} D{,}{,}{-1} D{,}{,}{-1} }
\toprule
& \multicolumn{2}{c}{États-Unis} & \multicolumn{2}{c}{Canada} \\
\multirow{2}{*}{Année} & \multicolumn{1}{c}{Consensus} &\multicolumn{1}{c}{Pourcentage} & \multicolumn{1}{c}{Consensus} &\multicolumn{1}{c}{Pourcentage} \\
\midrule
2007 & 2,31 & 8,8 & 2,25 & 8,2 \\
2008 & 2,25 & 7,0 & 2,18 & 7,5 \\
2009 & 2,32 & 7,8 & 2,26 & 8,8 \\
\midrule
Total & 2,15 & 4,7 & 2,22 & 8,8 \\
\bottomrule
\end{tabular*}
\end{table}
\end{center}
The paragraph after my floating table. Spacing with the previous paragraph should be 10pt (as parskip command) ... But it appears to be 40pt !?!?!?
\end{document}
I use MiKTeX 2.8 on a Windows 7 PC for those who want to know. (I used to work with LyX but I just didn't like the WYSIWYM concept ... I prefer to work with the raw material)
Thanks,