我的表格是这么写的:
\renewcommand{\baselinestretch}{1}
\small\normalsize
\begin{table}[h]
\begin{center}
\caption[]{Upper limit intensities of missing $E2$ transitions in $^{78}$Ge. ``*" indicates the transition intensity is inflated by contamination in spectra from the 976.5 keV transition in the $^{76}$Ge beam.}
\begin{tabular}{|c|c|c|c|c|}
\noalign{\vskip 1mm}
\hline
\hline
$E_{\textit{i }lev}$ & $E_\gamma$ & $E_{\textit{f }lev}$ & Relative Intensity & $\%$ Branching ratio \\
(keV) & (keV)&(keV)& upper limit& upper limit\\
\hline
3295 & 976* & 2319 & 2.5 & 7.4\\
2760& 1116 & 1644 & 0.1&0.3\\
2760& 1190 & 1570 & 0.6 &2.2\\
2319 & 1700 & 619 & 0.1 &0.2\\
2319& 1134 & 1186 & 0.6& 1.1\\
2319& 749 & 1570 &0.6 &1.1\\
\hline \hline
\end{tabular}
\end{center}
\label{table:upper limit}
\end{table}
\renewcommand{\baselinestretch}{2}
\small\normalsize
在文本中它应该是表 6.3,但当我编译时,它返回的是表 6.11(我章节的部分)。救命!
答案1
两个主要建议:
不要在环境
center
中使用环境table
。相反,请使用简单的\centering
指令。确保将
\caption
指令放在指令之前\label
。
遵循这些建议就足以生成对相关表的正确交叉引用。
一些额外的建议,旨在使排版表更具可读性(并且使底层 LaTeX 代码更易读):
加载
booktabs
包来绘制间距适当的水平规则;省略所有垂直规则。加载
threeparttable
包并使用\tnote
指令和tablenotes
环境来排版脚注标记和脚注文本。不要用本应放在表格脚注中的材料来填充标题。学习使用该
setspace
包;这样,您就不必摆弄前后行距指令table
和figure
环境。
\documentclass{report} % or some other document class with "\chapter" macro
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{2.0} % don't modify the low-level macro "\baselinestretch" directly
\usepackage{booktabs} % for \toprule, \midrule, and \bottomrule directives
\usepackage{siunitx} % for "\si" and "\SI" macros
\usepackage[flushleft]{threeparttable}
\begin{document}
\setcounter{chapter}{6} % just for this example
\setcounter{section}{11}
\setcounter{table}{2}
\begin{table}[ht!]
\centering
\begin{threeparttable}
\caption[]{Upper limit intensities of missing $E2$ transitions in $^{78}$Ge}
\label{table:upper limit}
\medskip
\begin{tabular}{ccccc}
\toprule
$E_{i,\mathrm{lev}}$ & $E_{\gamma}$ & $E_{f,\mathrm{lev}}$
& Relative Intensity & \% Branching ratio \\
(\si{\kilo\electronvolt}) & (\si{\kilo\electronvolt})
& (\si{\kilo\electronvolt}) & upper limit& upper limit \\
\midrule
3295 & \phantom{0}976\tnote{*} & 2319 & 2.5 & 7.4\\
2760& 1116 & 1644 & 0.1&0.3\\
2760& 1190 & 1570 & 0.6 &2.2\\
2319 & 1700 & \phantom{0}619 & 0.1 &0.2\\
2319& 1134 & 1186 & 0.6& 1.1\\
2319& \phantom{0}749 & 1570 &0.6 &1.1\\
\bottomrule
\end{tabular}
\smallskip
\begin{tablenotes}
\footnotesize
\item[*]indicates the transition intensity is inflated by contamination in spectra
from the \SI{976.5}{\kilo\electronvolt} transition in the $^{76}$Ge beam.
\end{tablenotes}
\end{threeparttable}
\end{table}
A cross-reference to Table \ref{table:upper limit}.
\end{document}