2015-04-15 1 views
1

Как я могу остановить мою таблицу в латексе, чтобы начать без необходимости со следующей страницы, оставляя огромное пространство на предыдущей странице? Как я могу заставить начать сразу после заголовка. Вот мой код:Таблица без необходимости начиная со следующей страницы в латексе

Я использую пакеты:

\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

Привет! Отправьте код, который можно скомпилировать, включая '\ documentclass {...}' и '\ begin {document} ... \ end {document}'. Только с таким кодом, воспроизводящим проблему, можно дать вам целенаправленный ответ. – MattAllegro

+1

Вы найдете здесь свои ответы: [Как повлиять на положение среды с плавающей точкой, такой как рисунок и таблица в LaTeX?] (Http://goo.gl/Qzz31); [Ведение таблиц/цифр, близких к тому, где они упоминаются) (http://goo.gl/290dD) – Werner

ответ

0

Не только в том случае, если ваша таблица слишком долго, чтобы вертикально вписаться в страницу (например, ниже заголовка или какой-то текст пункта), вы можете перейти от float подхода к:

%\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 с).

Смежные вопросы