我制作了五个并排的表格,但在文中引用它们时,标签效果不佳。例如,写的
Table \ref{T2} \eqref{T2a}
结果为
Table 1 (0a)
而不是Table 1 (A)
。其他表格也出现了类似的错误,即写的Tables \ref{T2} \eqref{T2b}, \eqref{T2c}, \eqref{T2d} and \eqref{T2e}
结果为Tables 1 (0b), (0c), (0d) and (0e)
而不是Tables 1 (B), (C), (D) and (E)
。以下是我制作的表格。我该如何纠正这个错误?
\documentclass[reqno]{amsart}
%\usepackage{subfigure}
\usepackage{amsfonts}
%\usepackage{xy}
\usepackage{newlfont}
\usepackage[centertags]{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
%\usepackage{qsymbols}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{plain}
\usepackage{mathrsfs}
\usepackage{makecell}
\usepackage{enumerate}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{calc}
\setcounter{page}{1}
\renewcommand{\baselinestretch}{1.5}
\oddsidemargin=.25cm \evensidemargin=.25cm \textwidth=15cm
\topmargin=0cm \textheight=21cm
%\textwidth= \textheight=
\begin{document}
\begin{table}
%\centering
\scalebox{0.8}{
\subfloat[]{
\label{T2a}
\begin{tabular}{c|c}
$\alpha(E)$ & $H(n_0, r_0)$ \\
\hline
$0.0046$ & $221.4469$ \\
$0.0242$ & $234.2140$ \\
$0.0676$ & $256.8037$ \\
$0.1051$ & $273.6300$ \\
$0.1556$ & $294.0302$ \\
$0.1919$ & $307.4861$ \\
$0.1953$ & $308.7253$ \\
$0.1968$ & $309.2591$ \\
$0.2534$ & $328.6548$ \\
$0.2990$ & $343.2435$ \\
$0.3179$ & $349.0466$ \\
$0.3895$ & $369.9289$ \\
$0.4080$ & $375.0633$ \\
$0.4723$ & $392.1812$ \\
$0.5182$ & $403.7715$ \\
$0.5229$ & $404.9304$ \\
$0.5929$ & $421.6356$ \\
$0.6035$ & $424.0598$ \\
$0.6379$ & $431.8383$ \\
$0.6752$ & $439.9954$ \\
$0.6874$ & $442.5920$ \\
$0.7184$ & $449.1324$ \\
$0.8319$ & $471.6474$ \\
$0.9050$ & $485.0971$ \\
\end{tabular}
}\qquad
\subfloat[]{
\label{T2b}
\begin{tabular}{c|c}
$\beta_1(\tau)$ & $H(n_0, r_0)$ \\
\hline
$0.0234$ & $19.5570$ \\
$0.0287$ & $23.3547$ \\
$0.0916$ & $61.9414$ \\
$0.1618$ & $98.4688$ \\
$0.1916$ & $112.7342$ \\
$0.2434$ & $136.2445$ \\
$0.2967$ & $159.0552$ \\
$0.3323$ & $173.5709$ \\
$0.3663$ & $187.0306$ \\
$0.3979$ & $199.1778$ \\
$0.4143$ & $205.3392$ \\
$0.4356$ & $213.2420$ \\
$0.5322$ & $247.4564$ \\
$0.5467$ & $252.3924$ \\
$0.5784$ & $263.0127$ \\
$0.7063$ & $303.6231$ \\
$0.7185$ & $307.3005$ \\
$0.7307$ & $310.9747$ \\
$0.7392$ & $313.5350$ \\
$0.7444$ & $315.0890$ \\
$0.8524$ & $346.2092$ \\
$0.8639$ & $349.4112$ \\
$0.9382$ & $369.5946$ \\
$0.9954$ & $384.5563$ \\
\end{tabular}
}\qquad
\subfloat[]{
\label{T2c}
\begin{tabular}{c|c}
$\beta_2(n_E)$ & $H(n_0, r_0)$ \\
\hline
$0.0401$ & $41.6852$ \\
$0.0415$ & $42.8924$ \\
$0.1459$ & $119.8971$ \\
$0.1469$ & $120.4960$ \\
$0.1697$ & $135.0943$ \\
$0.1747$ & $138.1723$ \\
$0.1808$ & $141.9400$ \\
$0.2020$ & $154.8078$ \\
$0.2415$ & $177.6726$ \\
$0.2977$ & $208.3297$ \\
$0.4658$ & $289.4966$ \\
$0.4678$ & $290.4147$ \\
$0.4874$ & $299.0131$ \\
$0.5592$ & $329.3742$ \\
$0.5769$ & $336.5756$ \\
$0.6298$ & $357.4931$ \\
$0.6432$ & $362.6616$ \\
$0.6440$ & $362.9452$ \\
$0.6764$ & $375.1864$ \\
$0.8121$ & $423.1673$ \\
$0.9103$ & $454.9058$ \\
$0.9216$ & $458.4156$ \\
$0.9932$ & $479.9329$ \\
$0.9941$ & $480.2066$ \\
\end{tabular}
}\qquad
\subfloat[]{
\label{T2d}
\begin{tabular}{c|c}
$\gamma(R_E)$ & $H(n_0, r_0)$ \\
\hline
$0.0130$ & $139.1077$ \\
$0.0257$ & $146.9657$ \\
$0.0611$ & $165.8004$ \\
$0.0742$ & $172.1161$ \\
$0.0779$ & $173.8204$ \\
$0.0905$ & $179.5609$ \\
$0.1394$ & $200.2853$ \\
$0.1739$ & $213.6810$ \\
$0.1862$ & $218.3039$ \\
$0.2335$ & $235.1517$ \\
$0.2408$ & $237.6320$ \\
$0.2919$ & $254.5007$ \\
$0.3034$ & $258.1202$ \\
$0.3256$ & $265.0310$ \\
$0.4231$ & $293.4047$ \\
$0.4774$ & $308.0440$ \\
$0.4795$ & $308.5853$ \\
$0.4918$ & $311.7980$ \\
$0.5051$ & $315.2074$ \\
$0.6566$ & $351.5110$ \\
$0.6710$ & $354.7289$ \\
$0.8568$ & $393.0985$ \\
$0.8683$ & $395.2959$ \\
$0.8702$ & $395.6473$ \\
\end{tabular}
}\qquad
\subfloat[]{
\label{T2e}
\begin{tabular}{c|c}
$t$ & $H(n_0, r_0)$ \\
\hline
$1$ & $316.3187$ \\
$2$ & $319.2520$ \\
$3$ & $322.1979$ \\
$4$ & $325.1567$ \\
$5$ & $328.1296$ \\
$6$ & $331.1179$ \\
$7$ & $334.1225$ \\
$8$ & $337.1443$ \\
$9$ & $340.1836$ \\
$10$ & $343.2408$ \\
$11$ & $346.3159$ \\
$12$ & $349.4090$ \\
$13$ & $352.5202$ \\
$14$ & $355.6493$ \\
$15$ & $358.7962$ \\
$16$ & $361.9608$ \\
$17$ & $365.1430$ \\
$18$ & $425.1145$ \\
$19$ & $489.1914$ \\
$19.5$ & $522.1258$ \\
$19.75$ & $538.6532$ \\
$19.99$ & $554.4819$ \\
$20$ & $145.7364$ \\
$21$ & $145.7336$ \\
\end{tabular}
}}
\caption{The function}
\label{T2}
\end{table}
\end{document}
答案1
问题在于,\subfloat
在一个table
环境中,标题应该位于顶部。
我相信您最好使用软件包subcaption
而不是subfig
,这样就不会出现这个问题。
我还编辑了您的表格以使用siunitx
功能;我删除了垂直规则,如果您真的想要,您可以恢复它。
我还删除了示例中不必要的包。请注意,newlfont
新文档中不能使用 :它是 1992 年之前文档的兼容包。此外,我会避免使用\usepackage{plain}
。
有amsart
一种更简洁的方式来改变页面参数,如图\calclayout
所示。
\documentclass[reqno]{amsart}
\usepackage[centertags]{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{siunitx}
\renewcommand{\baselinestretch}{1.5}
\setlength{\textwidth}{15cm}
\setlength{\textheight}{21cm}
\calclayout
\begin{document}
\ref{T2}, \ref{T2a}, \ref{T2b}
\begin{table}[htp]
\centering
\footnotesize
\setlength{\tabcolsep}{2pt}
\subcaptionbox{\label{T2a}}{%
\begin{tabular}{@{}S[table-format=1.4]S[table-format=3.4]@{}}
{$\alpha(E)$} & {$H(n_0, r_0)$} \\
\hline
0.0046 & 221.4469 \\
0.0242 & 234.2140 \\
0.0676 & 256.8037 \\
0.1051 & 273.6300 \\
0.1556 & 294.0302 \\
0.1919 & 307.4861 \\
0.1953 & 308.7253 \\
0.1968 & 309.2591 \\
0.2534 & 328.6548 \\
0.2990 & 343.2435 \\
0.3179 & 349.0466 \\
0.3895 & 369.9289 \\
0.4080 & 375.0633 \\
0.4723 & 392.1812 \\
0.5182 & 403.7715 \\
0.5229 & 404.9304 \\
0.5929 & 421.6356 \\
0.6035 & 424.0598 \\
0.6379 & 431.8383 \\
0.6752 & 439.9954 \\
0.6874 & 442.5920 \\
0.7184 & 449.1324 \\
0.8319 & 471.6474 \\
0.9050 & 485.0971 \\
\end{tabular}%
}\hfill
\subcaptionbox{\label{T2b}}{%
\begin{tabular}{@{}S[table-format=1.4]S[table-format=3.4]@{}}
{$\beta_1(\tau)$} & {$H(n_0, r_0)$} \\
\hline
0.0234 & 19.5570 \\
0.0287 & 23.3547 \\
0.0916 & 61.9414 \\
0.1618 & 98.4688 \\
0.1916 & 112.7342 \\
0.2434 & 136.2445 \\
0.2967 & 159.0552 \\
0.3323 & 173.5709 \\
0.3663 & 187.0306 \\
0.3979 & 199.1778 \\
0.4143 & 205.3392 \\
0.4356 & 213.2420 \\
0.5322 & 247.4564 \\
0.5467 & 252.3924 \\
0.5784 & 263.0127 \\
0.7063 & 303.6231 \\
0.7185 & 307.3005 \\
0.7307 & 310.9747 \\
0.7392 & 313.5350 \\
0.7444 & 315.0890 \\
0.8524 & 346.2092 \\
0.8639 & 349.4112 \\
0.9382 & 369.5946 \\
0.9954 & 384.5563 \\
\end{tabular}%
}\hfill
\subcaptionbox{\label{T2c}}{%
\begin{tabular}{@{}S[table-format=1.4]S[table-format=3.4]@{}}
{$\beta_2(n_E)$} & {$H(n_0, r_0)$} \\
\hline
0.0401 & 41.6852 \\
0.0415 & 42.8924 \\
0.1459 & 119.8971 \\
0.1469 & 120.4960 \\
0.1697 & 135.0943 \\
0.1747 & 138.1723 \\
0.1808 & 141.9400 \\
0.2020 & 154.8078 \\
0.2415 & 177.6726 \\
0.2977 & 208.3297 \\
0.4658 & 289.4966 \\
0.4678 & 290.4147 \\
0.4874 & 299.0131 \\
0.5592 & 329.3742 \\
0.5769 & 336.5756 \\
0.6298 & 357.4931 \\
0.6432 & 362.6616 \\
0.6440 & 362.9452 \\
0.6764 & 375.1864 \\
0.8121 & 423.1673 \\
0.9103 & 454.9058 \\
0.9216 & 458.4156 \\
0.9932 & 479.9329 \\
0.9941 & 480.2066 \\
\end{tabular}%
}\hfill
\subcaptionbox{\label{T2d}}{%
\begin{tabular}{@{}S[table-format=1.4]S[table-format=3.4]@{}}
{$\gamma(R_E)$} & {$H(n_0, r_0)$} \\
\hline
0.0130 & 139.1077 \\
0.0257 & 146.9657 \\
0.0611 & 165.8004 \\
0.0742 & 172.1161 \\
0.0779 & 173.8204 \\
0.0905 & 179.5609 \\
0.1394 & 200.2853 \\
0.1739 & 213.6810 \\
0.1862 & 218.3039 \\
0.2335 & 235.1517 \\
0.2408 & 237.6320 \\
0.2919 & 254.5007 \\
0.3034 & 258.1202 \\
0.3256 & 265.0310 \\
0.4231 & 293.4047 \\
0.4774 & 308.0440 \\
0.4795 & 308.5853 \\
0.4918 & 311.7980 \\
0.5051 & 315.2074 \\
0.6566 & 351.5110 \\
0.6710 & 354.7289 \\
0.8568 & 393.0985 \\
0.8683 & 395.2959 \\
0.8702 & 395.6473 \\
\end{tabular}%
}\hfill
\subcaptionbox{\label{T2e}}{%
\begin{tabular}{@{}S[table-format=2.2]S[table-format=3.4]@{}}
{$t$} & {$H(n_0, r_0)$} \\
\hline
1 & 316.3187 \\
2 & 319.2520 \\
3 & 322.1979 \\
4 & 325.1567 \\
5 & 328.1296 \\
6 & 331.1179 \\
7 & 334.1225 \\
8 & 337.1443 \\
9 & 340.1836 \\
10 & 343.2408 \\
11 & 346.3159 \\
12 & 349.4090 \\
13 & 352.5202 \\
14 & 355.6493 \\
15 & 358.7962 \\
16 & 361.9608 \\
17 & 365.1430 \\
18 & 425.1145 \\
19 & 489.1914 \\
19.5 & 522.1258 \\
19.75 & 538.6532 \\
19.99 & 554.4819 \\
20 & 145.7364 \\
21 & 145.7336 \\
\end{tabular}%
}
\caption{The function}
\label{T2}
\end{table}
\end{document}
答案2
我想到两个解决方案:
- 使用
\subref
提供的命令subfig
包裹您使用它来进行\subfloat
sie 尝试Table \ref{T2} \subref{T2a}
,Tables \ref{T2} \subref{T2b}, \subref{T2c}, \subref{T2d} and \subref{T2e}
然后分别得到“表 1(a)”和“表 1 (b)、(c)、(d) 和 (e)”。当然,如果您想在字母前面重复表号,可以对此进行调整:Tables \ref{T2} (\ref{T2}\subref{T2b}), ...
给出“表 1 (1b),...”。 - 将该命令移到所有 s命令
\caption
之前,您将得到:“表 1 (1a)”和“表 1 (1b)、(1c)、(1d) 和 (1e)”\label
\subfloat
Table \ref{T2} \eqref{T2a}
Tables \ref{T2} \eqref{T2b}, \eqref{T2c}, \eqref{T2d} and \eqref{T2e}
答案3
一个想法是将表格放在另一个表格中。一个表格中有三个表格。我在 mathjax 中这样做过。