Original code
\begin{table}[H]
\begin{center}
\begin{tabular}{c|c}
\hline
标签 & 含义 \\
\hline
[t] & 置顶 \\
[b] & 置底 \\
[p] & 换页 \\
[h] & 视情况插入中段 \\
[H] & 强制插入中段 \\
\hline
\end{tabular}
\end{center}
\caption{图表位置调整标签}
\label{table:location}
\end{table}
It works fine when the tabulate only have line for "[t]", but My compiler throws several errors when I put "[b]" line and more.
Missing number, treated as zero.
<to be read again>
LaTeX
Illegal unit of measure (pt inserted).
<to be read again>
LaTeX
Missing = inserted for \ifdim.
<to be read again>
LaTeX
Missing number, treated as zero.
<to be read again>
LaTeX
Illegal unit of measure (pt inserted).
<to be read again>
LaTeX
Missing number, treated as zero.
<to be read again>
LaTeX
Illegal unit of measure (pt inserted).
<to be read again>
LaTeX
Missing number, treated as zero.
<to be read again>
LaTeX
Illegal unit of measure (pt inserted).
<to be read again>
LaTeX
Though the code works when I use $$ to cover [tag]
\begin{table}[H]
\begin{center}
\begin{tabular}{c|c}
\hline
标签 & 含义 \\
\hline
$[t]$ & 置顶 \\
$[b]$ & 置底 \\
$[p]$ & 换页 \\
$[h]$ & 视情况插入中段 \\
$[H]$ & 强制插入中段 \\
\hline
\end{tabular}
\end{center}
\caption{图表位置调整标签}
\label{table:location}
\end{table}
I still want to know what makes my previous code wrong.
\relax
after the instances of double-backslash.[H]
option. It lends to bad typesetting. And, if you're writing a LaTeX manual, you should know thatcenter
isn't good insidetable
orfigure
and `\centering should be used.