[Tex/LaTex] remove space before and after and table

spacingtables

I am new in Latex,so i have seen similar question but none of them work for me.
I have a table which has a huge margin, or padding before and after it.

I am using Spring template
Here is the code:

\documentclass[runningheads,a4paper]{llncs}

\usepackage{amssymb}
\setcounter{tocdepth}{2}
\usepackage{graphicx}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{float}
\usepackage{verbatimbox}
\usepackage{url}

\begin{document}

Here is some text of mine. Text,Text,Text,Text,

       \begin{table}\addvbuffer[0pt 0pt]
        \centering
        \caption{OCTAVE}
        \begin{tabular}{ | l | l | l | p{5cm} |}
            \hline
            Evaluation of likelihood &Number of times the event happened in last year  \\ \hline
            Very High & More than three times in a year  \\ \hline
            High & Two or three times in a year  \\ \hline
            Medium & Once in a year \\ \hline
            Low & Three or four times in the last year \\ \hline
            Very Low & one or two times in the last year  \\ \hline    
            \hline
        \end{tabular}
    \end{table}

Here is some text of mine. Text,Text,Text,Text,
\end{document}

I need to remove the extra space between them, and make margin and padding as 0px.

This solution suggests using addvbuffer[0pt 0pt], to control the space
but when i use it as 0pt it does not change anything

Best Answer

I suggest a better looking table with only horizontal lines of package booktabs. Also the following example reduces the number of packages to a more minimal like example:

\documentclass[runningheads,a4paper]{llncs}

\usepackage{booktabs}
\usepackage{lipsum}

\begin{document}

\lipsum[2]

       \begin{table}
        \centering
        \caption{OCTAVE}
        \begin{tabular}{ll}
            \toprule
            Evaluation of likelihood
            & Number of times the event happened in last year  \\
            \midrule
            Very High & More than three times in a year  \\
            High & Two or three times in a year  \\
            Medium & Once in a year \\
            Low & Three or four times in the last year \\
            Very Low & one or two times in the last year  \\
            \bottomrule
        \end{tabular}
    \end{table}

\lipsum[3]
\end{document}

Result

The space around the float inside the text body is controlled by length \intextsep, which is set in the class file llncs.cls:

\setlength\intextsep   {8mm\@plus 2\p@ \@minus 2\p@}

(Translated: 8mm plus 2pt minus 2pt)

If you want to submit a paper to Springer, then I doubt that they are too happy if the submitter changes the layout.

Of course, the length can be minimized to zero as the following, now ugly looking example shows:

\documentclass[runningheads,a4paper]{llncs}

\usepackage{booktabs}
\usepackage{lipsum}

\setlength\intextsep{0mm}

\begin{document}

\lipsum[2]

       \begin{table}
        \centering
        \caption{OCTAVE}
        \begin{tabular}{ll}
            \toprule
            Evaluation of likelihood
            & Number of times the event happened in last year  \\
            \midrule
            Very High & More than three times in a year  \\
            High & Two or three times in a year  \\
            Medium & Once in a year \\
            Low & Three or four times in the last year \\
            Very Low & one or two times in the last year  \\
            \bottomrule
        \end{tabular}
    \end{table}

\lipsum[3]
\end{document}

Result with zero \intextsep

A compromise, for example, would be half of the space:

\setlength\intextsep{\glueexpr\intextsep/2\relax}