带有 2 个面板的表格导致表格编号跳过

带有 2 个面板的表格导致表格编号跳过

我使用 2 个 tabularx 创建了一个包含 2 个面板的表格。这导致下表跳过了表号,这意味着表号从包含 2 个面板的表格的表 2 变为下一个表格的表 4。

通过研究,我发现在 \begin{tabularx} 代码之后放置标题可以修复表格编号,但由于我使用了 2 个 tabularx,因此在这种情况下它不起作用。

有任何想法吗?

提前致谢!

     \documentclass[12pt]{article}
    \usepackage{tabularx}
        \usepackage{longtable}
\usepackage{apacite}
\usepackage{
\usepackage{float}
\usepackage{caption}
        \usepackage{ltablex} 
        \usepackage{booktabs}
        \begin{document}
        \begin{table}[H]
        \small
            \centering
            \begin{tabularx}{\textwidth}{XXXX}
            \captionof{table}{Summary of Stimulus Multipliers}\label{Stimulus table}\\
             \multicolumn{4}{c}{\textbf{Panel A: ARRA}} \\ \toprule
            \textbf{Study} & \textbf{Geographical Location and Level} & \textbf{Identification} & \textbf{Result} \\ \midrule \citeA{chodorow2012does} & State Level & Instrumented on a Medicaid match program that the Federal Government instigated for the states as part of the stimulus & \$100,000 of funding on leading to 3.8 job years \\ \midrule \citeA{conley2013american} & US State Level & Instrumented on State government stress and Highway funding & 0.76 \\ \midrule \citeA{dube2014excess} & County Level & Divided counties into two groups those above and below the median excess capacity level & For counties above the median excess capacity there was an economic multiplier of 2.8 while those below had no statistical effect \\ \midrule
            \citeA{dupor2014cup} & Employment regions at the County Level & Organised Counties into employment zones & Multiplier of 1.64 direct effect and 1.5 spillover into surrounding regions \\ \midrule \citeA{dupor20162009} & Local Labor Markets & Instrumented on spending by Federal Agencies that were not instructed to target expenditure to hard hit regions in the US & Employment multiplier of 0.93 and wage multiplier of roughly 1 \\ \midrule \citeA{katz2009estimating} & US Federal Level & Analysis of the broadband component of the ARRA & \$500,000 of spending creates 1 job \\ \midrule
        \citeA{klein2017american} & State Level & Instrumented on a Medicaid match program that the Federal Government instigated for the states as part of the stimulus & 2.27\% increase in GSP in 2009 \\ \midrule \citeA{wilson2012fiscal} & State Level & Instrumented on a series of exogenous factors that dictated how Federal Funds were transferred to the States & 1.75 \\ \bottomrule
        \end{tabularx} 
        \begin{tabularx}{\textwidth}{XXXX}
        \multicolumn{4}{c}{\textbf{Panel B: Other Stimulus Programs}} \\ \toprule
            \textbf{Study} & \textbf{Geographical Location and Level} & \textbf{Identification} & \textbf{Result} \\ \midrule \citeA{buchheim2017employment} & German County Level & Analysed the effects of a German stimulus program to fund energy efficiency in schools & \$100,000 of Federal funding funds 4 jobs per year \\ \midrule \citeA{li2016effectiveness} & Australia Federal Level & Used a DSGE model to evaluate the effect of the cash transfer to households & 0.9 on impact and 1.26 after a year with accommodative monetary policy \\ \bottomrule 
             \end{tabularx}
        \end{table}
        \end{document}

答案1

您可以通过两种方式解决遇到的问题:

  1. 操纵table计数器
  2. 将两个面板放在同一tabularx环境中,并手动添加一些垂直空白

这是第一种可能性的 MWE。我注释掉了table环境并\addtocounter{table}{-1}在 caption 命令后添加了它。

 \documentclass[12pt]{article}
\usepackage{tabularx}
    \usepackage{longtable}
    \usepackage{ltablex} 
    \usepackage{booktabs}
    \usepackage{float}
    \usepackage{caption}
    \usepackage{apacite}

    \begin{document}
%    \begin{table}[H]
    \small
        \centering
        \begin{tabularx}{\textwidth}{XXXX}
        \caption{Summary of Stimulus Multipliers}\label{Stimulus table}\addtocounter{table}{-1}\\
         \multicolumn{4}{c}{\textbf{Panel A: ARRA}} \\ \toprule
        \textbf{Study} & \textbf{Geographical Location and Level} & \textbf{Identification} & \textbf{Result} \\ \midrule \citeA{chodorow2012does} & State Level & Instrumented on a Medicaid match program that the Federal Government instigated for the states as part of the stimulus & \$100,000 of funding on leading to 3.8 job years \\ \midrule \citeA{conley2013american} & US State Level & Instrumented on State government stress and Highway funding & 0.76 \\ \midrule \citeA{dube2014excess} & County Level & Divided counties into two groups those above and below the median excess capacity level & For counties above the median excess capacity there was an economic multiplier of 2.8 while those below had no statistical effect \\ \midrule
        \citeA{dupor2014cup} & Employment regions at the County Level & Organised Counties into employment zones & Multiplier of 1.64 direct effect and 1.5 spillover into surrounding regions \\ \midrule \citeA{dupor20162009} & Local Labor Markets & Instrumented on spending by Federal Agencies that were not instructed to target expenditure to hard hit regions in the US & Employment multiplier of 0.93 and wage multiplier of roughly 1 \\ \midrule \citeA{katz2009estimating} & US Federal Level & Analysis of the broadband component of the ARRA & \$500,000 of spending creates 1 job \\ \midrule
    \citeA{klein2017american} & State Level & Instrumented on a Medicaid match program that the Federal Government instigated for the states as part of the stimulus & 2.27\% increase in GSP in 2009 \\ \midrule \citeA{wilson2012fiscal} & State Level & Instrumented on a series of exogenous factors that dictated how Federal Funds were transferred to the States & 1.75 \\ \bottomrule 
    \end{tabularx} 
    \begin{tabularx}{\textwidth}{XXXX}
    \multicolumn{4}{c}{\textbf{Panel B: Other Stimulus Programs}} \\ \toprule
        \textbf{Study} & \textbf{Geographical Location and Level} & \textbf{Identification} & \textbf{Result} \\ \midrule \citeA{buchheim2017employment} & German County Level & Analysed the effects of a German stimulus program to fund energy efficiency in schools &  100,000 of Federal funding funds 4 jobs per year \\ \midrule \citeA{li2016effectiveness} & Australia Federal Level & Used a DSGE model to evaluate the effect of the cash transfer to households & 0.9 on impact and 1.26 after a year with accommodative monetary policy \\ \bottomrule 
         \end{tabularx}
 %   \end{table}


\clearpage
\begin{table}
\caption{a second table caption}
\end{table}
    \end{document}

以下是第二种选择的 MWE:

 \documentclass[12pt]{article}
\usepackage{tabularx}
    \usepackage{longtable}
    \usepackage{ltablex} 
    \usepackage{booktabs}
    \usepackage{float}
    \usepackage{caption}
    \usepackage{apacite}

    \begin{document}
%    \begin{table}[H]
  {  \small
        \centering
        \begin{tabularx}{\textwidth}{XXXX}
        \caption{Summary of Stimulus Multipliers}\label{Stimulus table}\\
         \multicolumn{4}{c}{\textbf{Panel A: ARRA}} \\ \toprule
        \textbf{Study} & \textbf{Geographical Location and Level} & \textbf{Identification} & \textbf{Result} \\ \midrule \citeA{chodorow2012does} & State Level & Instrumented on a Medicaid match program that the Federal Government instigated for the states as part of the stimulus & \$100,000 of funding on leading to 3.8 job years \\ \midrule \citeA{conley2013american} & US State Level & Instrumented on State government stress and Highway funding & 0.76 \\ \midrule \citeA{dube2014excess} & County Level & Divided counties into two groups those above and below the median excess capacity level & For counties above the median excess capacity there was an economic multiplier of 2.8 while those below had no statistical effect \\ \midrule
        \citeA{dupor2014cup} & Employment regions at the County Level & Organised Counties into employment zones & Multiplier of 1.64 direct effect and 1.5 spillover into surrounding regions \\ \midrule \citeA{dupor20162009} & Local Labor Markets & Instrumented on spending by Federal Agencies that were not instructed to target expenditure to hard hit regions in the US & Employment multiplier of 0.93 and wage multiplier of roughly 1 \\ \midrule \citeA{katz2009estimating} & US Federal Level & Analysis of the broadband component of the ARRA & \$500,000 of spending creates 1 job \\ \midrule
    \citeA{klein2017american} & State Level & Instrumented on a Medicaid match program that the Federal Government instigated for the states as part of the stimulus & 2.27\% increase in GSP in 2009 \\ \midrule \citeA{wilson2012fiscal} & State Level & Instrumented on a series of exogenous factors that dictated how Federal Funds were transferred to the States & 1.75 \\ \bottomrule \\[0.5cm]

    \multicolumn{4}{c}{\textbf{Panel B: Other Stimulus Programs}} \\ \toprule
        \textbf{Study} & \textbf{Geographical Location and Level} & \textbf{Identification} & \textbf{Result} \\ \midrule \citeA{buchheim2017employment} & German County Level & Analysed the effects of a German stimulus program to fund energy efficiency in schools &  100,000 of Federal funding funds 4 jobs per year \\ \midrule \citeA{li2016effectiveness} & Australia Federal Level & Used a DSGE model to evaluate the effect of the cash transfer to households & 0.9 on impact and 1.26 after a year with accommodative monetary policy \\ \bottomrule 
         \end{tabularx}
 %   \end{table}
 }

\clearpage
\begin{table}
\caption{a second table caption}
\end{table}
    \end{document}

关于观察到的行为的原因的更多背景信息可以是找到这里

相关内容