首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >表不必要地从latex中的下一页开始

表不必要地从latex中的下一页开始
EN

Stack Overflow用户
提问于 2015-04-15 18:46:04
回答 1查看 3.4K关注 0票数 1

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

我正在使用包:

代码语言:javascript
复制
\usepackage{tabularx,ragged2e,booktabs,caption},
\usepackage{float}

我的表的代码是:

代码语言:javascript
复制
\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],结果没有一样东西能正常工作,相反,表格消失了。

EN

回答 1

Stack Overflow用户

发布于 2015-06-20 03:35:17

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

代码语言:javascript
复制
%\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不是浮点数,而table是浮点数)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29648178

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档