Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gap after table in LaTeX

Tags:

latex

I notice that there is some gap after my table. See the following snapshot:

http://i39.tinypic.com/x3e4vd.jpg

My LaTeX code is:

\begin{table}[htb]  
\caption{Error rates VS training size in AdaBoosted stump, SVM and kNN. \label{tab:examplecount8000errerrplot}}  
\begin{center}  
\begin{tabular}{c c}  
\includegraphics[scale=0.4]{../boost.eps}   
&  
\includegraphics[scale=0.4]{../svm.eps}   \\    
\includegraphics[scale=0.4]{../knn.eps}   
& \\    
\end{tabular}  
\end{center}  
\end{table}     
%  
\subsection{Feature Numbers}

Is the gap normal or how can I reduce the gap to be normal?

like image 373
Tim Avatar asked Apr 21 '10 17:04

Tim


People also ask

How do you put a space after a table in LaTeX?

One option is to use the commands \setlength and \arraystretch to change the horizontal spacing (column separation) and the vertical spacing (row separation) respectively.

How do I reduce the space between tables in LaTeX?

You can reduce the gap between table columns by using \setlength{\tabcolsep}{1pt}.

How do you put a space before a table in LaTeX?

Horizontal spaces of arbitrary length may be inserted with \hspace . There are two commands that insert horizontal blank spaces in this example: \hspace{1cm} Inserts a horizontal space whose length is 1cm.


3 Answers

Instead of centering the tables with the {center} environment, try to use the \centering macro. I should be something like

\begin{table}
\centering
...
\end{table}
like image 196
midtiby Avatar answered Nov 09 '22 13:11

midtiby


If Charles's and midtiby's answers don't fix it for you and you must adjust it (because, for instance the margin lady won't pass your dissertation until you do), you can diddle the lengths

  • \floatsep
  • \textfloatsep
  • \intextsep

(and their two column brethren) which adjust the spacing around and between floats. In this case I believe you want \textfloatsep.

But do what Charles and midtiby said first, and consider Bears' advice as well.

like image 22
dmckee --- ex-moderator kitten Avatar answered Nov 09 '22 14:11

dmckee --- ex-moderator kitten


You can always fix vertical spacing by emitting a vskip command, say \vskip{-1em}, in vertical mode, such as before the \section. Bears is right: delay worrying about layout as late as possible. There should be a saying about premature formatting...

The table would look more attractive to me if the caption was at the bottom. The matter of appearance would be as much what is the proportion of space above and below the caption as the total amount of space.

like image 24
Charles Stewart Avatar answered Nov 09 '22 14:11

Charles Stewart