1

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

  • 2
    Please provide a full minimal example, not just sniplets. That question you refer to mentions the package verbatimbox of which you mention nothing. Thus we need the full minimal example so we can replicate your problem. – daleif Jun 16 '17 at 12:37
  • @daleif i have edited my question, i hope this time it is replicable. – Jeff Jun 16 '17 at 12:47
  • 1
    There is no space between the image and the table because there is no image. – Heiko Oberdiek Jun 16 '17 at 12:54
  • 1
    the llncs class has a higher space above and below a h float than normal classes. This is by design. If you are writing something to be submitted to Springer, leave this setting alone, and in general leave the layout alone. If you mess too much with the layout you'll just end up pissing of the Springer editors who will have to revert your changes back to their design. – daleif Jun 16 '17 at 12:59
2

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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.