表格不必从乳胶的下一页开始

时间:2015-04-15 10:46:04

标签: latex texnic-center

如何在乳胶中停止我的桌子从下一页开始不必要地在前一页留下一个巨大的空间?如何强制在标题之后开始。这是我的代码:

我正在使用套餐:

\usepackage{tabularx,ragged2e,booktabs,caption},
\usepackage{float}

我的表的代码是:

\begin{table}[H]
\begin{tabular}{| l| l }
$.$ & Matches any character.\\ 
$*$ & Matches zero or more instances of the previous pattern item.\\
$+$ & Matches one or more instances of the previous pattern item.\\
$?$ & Matches zero or one instances of the previous pattern item.\\
$( )$ & Groups a subpattern. The repetition and alternation operators apply to the preceding subpattern.\\
$|$ & Alternation.\\
$[ ]$ & Delimit a set of characters. Ranges are specified as [x-y].\\
\textasciicircum & Anchor the pattern to the beginning of the string. Only when first.\\
\$ & Anchor the pattern to the end of the string. Only when last.\\
\end{tabular}
\end{table}

我尝试了[!ht][!htp][htpb]没有任何类似的工作,而是桌子消失了。

1 个答案:

答案 0 :(得分:0)

不仅在你的桌子太长而且不能垂直放入页面的情况下(例如在标题或文本段落下面),你可以从浮动方法切换到:

%\begin{center}
\begin{longtable}{|l|l}
    %
  \endfirsthead
    %
  \endhead
    %
  \endfoot
    %
  \endlastfoot
    $.$ & Matches any character.\\ 
    $*$ & Matches zero or more instances of the previous pattern item.\\
    $+$ & Matches one or more instances of the previous pattern item.\\
    $?$ & Matches zero or one instances of the previous pattern item.\\
    $( )$ & Groups a subpattern. The repetition and alternation operators apply to the preceding subpattern.\\
    $|$ & Alternation.\\
    $[ ]$ & Delimit a set of characters. Ranges are specified as [x-y].\\
    \textasciicircum & Anchor the pattern to the beginning of the string. Only when first.\\
    \$ & Anchor the pattern to the end of the string. Only when last.\\
\end{longtable}
%\end{center}

编译时,这看起来与您的table完全相同,只要您在序言中包含\usepackage{longtable}(并且longtable s不是浮点数,而table则是{)。