如何使“理论”和“假设”列的单元格居中,并删除“财务约束”单元格中多余的空白?
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{array}
\usepackage{tabularx}
\renewcommand{\tabularxcolumn}[1]{m{#1}}
\begin{table}
\centering
\begin{tabularx}{\textwidth}{l X X X} \toprule
Theory & Hypothesis & Major characteristics & References \\ \hline
\multirow{3}{*}{Tax- Smoothing} & \multirow{2}{*}{\hsize}{When the government raises revenue, there is a deadweight loss in the economy} & Unanticipated fiscal needs & Barro, 1979 \\
\cline{3-4}
& & Anticipated fiscal needs & Lucas Stokey, 1983 \\
\midrule
\multirow{3}{*}{Safe asset provision} & \multirow{3}{*}{\hsize}{Companies and families are financially constrained and cannot operate in the credit market as freely as government} & Financial constraints & Woodford, 1990 \\
\cline{3-4}
& & Precautionary private savings & Ayigari McGrattan, 1998 Holmström Tirole, 1998 \\
\cline{3-4}
& & Global capital flows and interest rates & Aizenman Marion, 2011 \\
\midrule
\multirow{2}{*}{Dynamic Efficiency} & \multirow{2}{*}{\hsize}{Private sector does not internalize fiscal policies’ consequences infinitely into the future and beyond} & \multirow{2}{*}{\hsize}{Dynamic inefficiencies in the economy and over accumulated capital can lead to an optimal increase in government debt} & Diamond, 1965 \\
& & & Blanchard, 1985 \\
\toprule
\end{tabularx}
\end{table}
答案1
以下可能更接近预期的输出?(由于没有给出文档类/边距大小,所以我猜测。)
\documentclass{article}
\usepackage{geometry}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{array}
\usepackage{tabularx}
\begin{document}
\begin{table}
\centering
\begin{tabularx}{\textwidth}{l p{4cm} X X}
\toprule
Theory & Hypothesis & Major characteristics & References \\ \midrule
\multirow{4}{*}{Tax- Smoothing} & \multirow{4}{=}{When the government raises revenue, there is a deadweight loss in the economy} & Unanticipated fiscal needs & Barro, 1979 \\
\cmidrule{3-4}
& & Anticipated fiscal needs & Lucas Stokey, 1983 \\
\midrule
\multirow{7}{*}{Safe asset provision} & \multirow{7}{=}{Companies and families are financially constrained and cannot operate in the credit market as freely as government} & Financial constraints & Woodford, 1990 \\
\cmidrule{3-4}
& & Precautionary private savings & Ayigari McGrattan, 1998 Holmström Tirole, 1998 \\
\cmidrule{3-4}
& & Global capital flows and interest rates & Aizenman Marion, 2011 \\
\midrule
\multirow{8}{*}{Dynamic Efficiency} & \multirow{8}{=}{Private sector does not internalize fiscal policies’ consequences infinitely into the future and beyond} & Dynamic inefficiencies in the economy and over accumulated capital can lead to an optimal increase in government debt & Diamond, 1965 \\
& & & Blanchard, 1985 \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
答案2
p
通常情况下,使用notm
和 top 对齐而不是垂直居中条目看起来会好得多,但是......
\documentclass{article}
\usepackage{booktabs}
\usepackage{tabularx}
\renewcommand{\tabularxcolumn}[1]{m{#1}}
\begin{document}
\begin{table}
\centering
\begin{tabularx}{\textwidth}{p{2cm} X l}
\toprule
Theory & Hypothesis &
\begin{tabular}{@{}*2{>{\raggedright\arraybackslash}m{2cm}}@{}}
Major characteristics & References
\end{tabular} \\
\midrule
Tax-\newline Smoothing &
When the government raises revenue, there is a deadweight loss in the economy&
\begin{tabular}{@{}*2{>{\raggedright\arraybackslash}m{2cm}}@{}}
Unanticipated fiscal needs & Barro, 1979\\
Anticipated fiscal needs & Lucas Stokey, 1983
\end{tabular} \\
\midrule
Safe asset\newline provision &
Companies and families are financially constrained and cannot operate in the credit market as freely as government &
\begin{tabular}{@{}*2{>{\raggedright\arraybackslash}m{2cm}}@{}}
Financial constraints & Woodford, 1990 \\
Precautionary private savings & Ayigari McGrattan, 1998 Holmström Tirole, 1998 \\
Global capital flows and interest rates & Aizenman Marion, 2011
\end{tabular} \\
\midrule
Dynamic\newline Efficiency &
Private sector does not internalize fiscal policies’ consequences infinitely into the future and beyond &
\begin{tabular}{@{}*2{>{\raggedright\arraybackslash}m{2cm}}@{}}
Dynamic inefficiencies in the economy and over accumulated capital can lead to an optimal increase in government debt
& Diamond, 1965 \\
& Blanchard, 1985
\end{tabular}\\
\bottomrule
\end{tabularx}
\end{table}
\end{document}