我的表格有问题。基本上,我想在hline
模特名字后面和前面(即行后面和 1. Female 前面)留一个中等长度的空格。
我试过:
\documentclass{article}
\usepackage{rotating}
\begin{document}
\begin{sidewaystable}
\centering
\footnotesize{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\caption{\textbf{Sensitivity Analysis II}\label{table5}}
\begin{tabular}{l*{5}{c}}
\hline\hline
&\multicolumn{1}{c}{\textbf{Fst Stage}}&\multicolumn{2}{c}{\textbf{Snd Stage}}&\multicolumn{1}{c}{\textbf{LL}}&\multicolumn{1}{c}{\textbf{$\rho$=0}} \smallskip \\
&\multicolumn{1}{c}{\textbf{Lagged SF}}&\multicolumn{1}{c}{\textbf{SF}}&\multicolumn{1}{c}{\textbf{Fairness}}& &\\
&\multicolumn{1}{c}{\textbf{(Country Level)}}&&&&\\
\hline \medskip
1. Female &0.012***& 0.009***& 0.1999***&3,504.223& -0.053***\\
2. Male \medskip\\
3. Europe\\
4. Africa\\
5. Asia\\
6. North America\\
7. South America\\
8. Others \medskip \\
9. Left-Oriented\\
10. Right-Oriented \medskip \\
11. Competition is bad\\
12. Competition is good \medskip \\
13. Married \\
14. Single\medskip \\
15. Turst Others\\
16. No Trust Others \smallskip\\
\hline\hline
\multicolumn{6}{l}{\footnotesize * \(p<0.10\), ** \(p<0.05\), *** \(p<0.01\)}\\
\multicolumn{6}{l}{\footnotesize Standard errors in parentheses}\\
\end{tabular}}
\end{sidewaystable}
\end{document}
显然它不起作用。无论我尝试将跳过放在哪里(在 hline 之前或之后或之后,&\multicolumn{1}{c}{\textbf{(Country Level)}}&&&&\\)
我都无法在 之后留下任何跳过hline
。
答案1
以下是表格代码的一些改进和简化。行号是自动的,并且right-aligned
模拟enumerate
环境,以便第一列中的文本始终左对齐。我还使用了booktabs
,它在表格中的水平线周围设置了一些垂直填充,并定义了一个可调整的\addlinespace
命令,允许轻松分隔行组。最后,该makecell
包允许在单元格内换行,以及列/行标题的通用格式。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{rotating}
\usepackage{caption, booktabs, makecell}
\usepackage{eqparbox}
\renewcommand\theadfont{\bfseries}
\captionsetup{font=bf}
\begin{document}
\begin{sidewaystable}
\newcounter{rownum}\setcounter{rownum}{0}
\setlength\defaultaddspace{1.25ex}
\centering
\footnotesize{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\caption{Sensitivity Analysis II}\label{table5}
\begin{tabular}{>{\refstepcounter{rownum}\eqmakebox[R][r]{\therownum.}\hskip\labelsep}l*{5}{c}}
\toprule\midrule
\multicolumn{1}{c}{}& \textbf{1\textsuperscript{st} Stage} &\multicolumn{2}{c}{\textbf{2\textsuperscript{nd} Stage}}& \textbf{LL}& \boldmath$ \rho=0 $ \\
\multicolumn{1}{c}{} & \thead{Lagged SF & & & & \\(Country Level)}&\multicolumn{1}{c}{\textbf{SF}}&\multicolumn{1}{c}{\textbf{Fairness}}& &\\
\cmidrule(lr){1-6}
\addlinespace
Female & 0.012*** & 0.009*** & 0.1999*** & 3,504.223 & -0.053*** \\
Male\\
\addlinespace
Europe\\
Africa\\
Asia\\
North America\\
South America\\
Others\\
\addlinespace
Left-Oriented\\
Right-Oriented\\
\addlinespace
Competition is bad\\
Competition is good\\
\addlinespace
Married \\
Single\\
\addlinespace
Trust Others\\
No Trust Others\\
\midrule\bottomrule
\addlinespace
\multicolumn{6}{l}{\footnotesize * \(p<0.10\),\quad ** \(p<0.05\),\quad *** \(p<0.01\)}\\
\multicolumn{6}{l}{\footnotesize Standard errors in parentheses}\\
\end{tabular}}
\end{sidewaystable}
\end{document}
答案2
答案3
添加几个\\
似乎会引入一些空间。您还可以添加medskip
、或vspace{<length>}
或其他垂直空间,甚至是负空间。
\documentclass{article}
\usepackage{rotating}
\begin{document}
\begin{sidewaystable}
\centering
\footnotesize{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\caption{\textbf{Sensitivity Analysis II}\label{table5}}
\begin{tabular}{l*{5}{c}}
\hline\hline \\
&\multicolumn{1}{c}{\textbf{Fst Stage}}&\multicolumn{2}{c}{\textbf{Snd Stage}}&\multicolumn{1}{c}{\textbf{LL}}&\multicolumn{1}{c}{\textbf{$\rho$=0}} \smallskip \\
&\multicolumn{1}{c}{\textbf{Lagged SF}}&\multicolumn{1}{c}{\textbf{SF}}&\multicolumn{1}{c}{\textbf{Fairness}}& &\\
&\multicolumn{1}{c}{\textbf{(Country Level)}}&&&&\medskip\\
\hline \\
1. Female &0.012***& 0.009***& 0.1999***&3,504.223& -0.053***\\
2. Male \\
3. Europe\\
4. Africa\\
5. Asia\\
6. North America\\
7. South America\\
8. Others \medskip\\
9. Left-Oriented\\
10. Right-Oriented \medskip \\
11. Competition is bad\\
12. Competition is good \medskip \\
13. Married \\
14. Single\medskip \\
15. Turst Others\\
16. No Trust Others \smallskip\\
\hline\hline\\
\multicolumn{6}{l}{\footnotesize * \(p<0.10\), ** \(p<0.05\), *** \(p<0.01\)}\\
\multicolumn{6}{l}{\footnotesize Standard errors in parentheses}\\
\end{tabular}}
\end{sidewaystable}
\end{document}