我是 Latex 新手,所以我见过类似的问题,但都对我没用。我有一张桌子,桌子前后有很大的边距或填充。
我在用弹簧模板 以下是代码:
\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}
我需要删除多余的空间在它们之间,并使边距和填充为0px
。
这解决方案建议使用addvbuffer[0pt 0pt]
,来控制空间,但当我使用它时,0pt
它不会改变任何东西
答案1
我建议使用只包含水平线的包装表格来使表格看起来更好看booktabs
。以下示例还将包装数量减少到更小的程度:
\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}
文本主体内浮动周围的空间由长度控制\intextsep
,该长度在类文件中设置llncs.cls
:
\setlength\intextsep {8mm\@plus 2\p@ \@minus 2\p@}
(翻译8mm plus 2pt minus 2pt
:)
如果你想向 Springer 提交一篇论文,那么我怀疑如果提交者更改布局他们会不会太高兴。
当然,长度可以最小化为零,如下所示,现在看起来很丑陋的例子显示:
\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}
例如,一个折衷方案是将空间减少一半:
\setlength\intextsep{\glueexpr\intextsep/2\relax}