表格标题问题

表格标题问题

我一直在用 LaTeX 撰写论文,并且总是能够解决出现的任何问题,但这个问题我却无能为力……:s。

基本上,我文档中的所有表格都有同样的问题。它们的标题乱七八糟,上面写着“表格 X:”,然后在插入标题之前插入了一个换行符...我在样式表中找不到它。

这是一个典型的例子,代码和结果都是图片...

\begin{table}[!h]\small \centering{}
  \begin{tabulary}{1\textwidth}{C C C C C}
    & \multicolumn{4}{c}{$\gamma$-criterion}\\
    & {1 mm / 0.5 \%} & {1 mm / 1 \%} & {2 mm / 0.5 \%} & {2 mm / 0.1 \%}\\
    \hline \hline
    Field & \multicolumn{4}{c}{Passing rate \%}\\
    \hline
    Spine sarcoma & 93.7 & 92.9 & 94.9 & 96.9\\
    Pericardia and lung sarcoma & 93.6 & 92.7 & 95.2 & 97.3\\
    Head \& neck field 1 & 94.4 & 93.3 & 95.1 & 97.0\\ 
    Head \& neck field 2 & 94.0 & 92.9 & 94.2 & 96.7\\ 
  \end{tabulary}
  \caption{3D $\gamma$-analyses results between GMC's water dose recomputation and the original QA dose computations. Numerous gamma criteria were used.}
  \label{GMCtab2}
\end{table}

结果:

结果

请帮忙!

答案1

以下是我排版表格的方式:

\documentclass{article}

\usepackage[
  margin = 3cm % avoids `overfull \hbox' warning
]{geometry}
\usepackage[
  tableposition = top, % correct spacing between table and caption
  width = 0.76\textwidth % relative width of the caption
]{caption}
\usepackage{booktabs} % horizontal lines in table
\usepackage{siunitx} % SI units


\begin{document}

\begin{table}
 \centering
 \small
  \caption{3D $\gamma$-analyses results between GMC's water dose recomputation and
           the original QA dose computations. Numerous gamma criteria were used.}
  \label{GMCtable2}
  \begin{tabular}{l *{4}{S[table-format = 2.1]}}
    \toprule
      & \multicolumn{4}{c}{$\gamma$-criterion}\\[1ex]
      & \SI{1}{\mm}/\SI{0.5}{\percent}
      & \SI{1}{\mm}/\SI{1}{\percent}
      & \SI{2}{\mm}/\SI{0.5}{\percent}
      & \SI{1}{\mm}/\SI{0.1}{\percent}\\
    \midrule
        Field
      & \multicolumn{4}{c}{Passing rate (\si{\percent})}\\[1ex]
    Spine sarcoma               & 93.7 & 92.9 & 94.9 & 96.9\\
    Pericardia and lung sarcoma & 93.6 & 92.7 & 95.2 & 97.3\\
    Head \& neck field~1        & 94.4 & 93.3 & 95.1 & 97.0\\
    Head \& neck field~2        & 94.0 & 92.9 & 94.2 & 96.7\\
    \bottomrule
  \end{tabular}
\end{table}
This is table~\ref{GMCtable2}.

\end{document}

输出

相关内容