【问题标题】:Table unnecessarily starting from next page in latex表格不必要地从乳胶中的下一页开始
【发布时间】:2015-04-15 10:46:04
【问题描述】:

如何在乳胶中停止我的表格以不必要地从下一页开始,在前一页留下巨大的空间?我怎样才能在标题之后强制开始。这是我的代码:

我正在使用包:

\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] 没有任何效果,而是桌子消失了。

【问题讨论】:

标签: latex texnic-center


【解决方案1】:

不仅在表格太长而无法垂直放入页面的情况下(例如,在标题或某些文本段落下方),您可以从浮动方法切换到:

%\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}(并且 longtables 不是浮点数,而 tables 是)。

【讨论】:

    猜你喜欢
    • 2015-01-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多