尝试将 table 向左移动,但失败了

Try to move the table to the left, but failed

我试图将我的 table 重新定位到页面左侧一点,所以我尝试 \hskip -2cm\hspace{-2cm} 但是这些都不能移动 table 和这是我的代码:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{float}
\usepackage{array}
\usepackage{booktabs,caption}
\usepackage[flushleft]{threeparttable}
\usepackage{indentfirst}
\setlength\extrarowheight{2pt}


\title{}
\author{}


\begin{document}


\maketitle
\section{Introduction}



\section{Data Summary}





\begin{table}[H]
\begin{threeparttable}
\small

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\hskip -2cm
\caption{Summary of numeric variables}

\begin{tabular}{l*{1}{ccccc}}
\hline\hline
                    &\multicolumn{5}{c}{(1)}                                         \
                    &\multicolumn{5}{c}{}                                            \
                    &       count&        mean&          sd&         min&         max\
\hline
Unemployment Rate   &         170&      8.3323&      4.1395&      3.1000&     26.0919\
log of spending per person for secondary education&         168&      9.0229&      0.4344&      7.6109&      9.9616\
log of spending per person for teriary education&         165&      9.5241&      0.3967&      8.7797&     10.7478\
log of exchange rate&         170&      1.0983&      2.0997&     -0.4986&      7.0522\
log of GDP per person&         168&     10.5306&      0.3592&      9.7330&     11.5213\
log of GDP fixed purchasing power&         165&     27.0045&      1.4905&     23.3668&     30.5051\
log of GDP growth   &         159&      1.2268&      0.7896&     -1.7458&      3.0063\
Long-term interest rate on government bonds&         165&      3.8447&      2.1387&      0.5511&     10.5465\
Short-term interest rate&         170&      1.7675&      1.9971&      0.0078&     10.3317\
\hline\hline
\end{tabular}
\begin{tablenotes}
\small
\item Source: OECD (2019), Education at a Glance Database, http://stats.oecd.org
\end{tablenotes}
\end{threeparttable}
\end{table}


\section{Methodology}

\end{document}

我的 table 看起来像这样:

我想让我的 table 至少留出 1.5 厘米。 还有其他方法吗?

将您的 table 项目放入页边距对于布局而言不是一个好的样式,因为布局并非专门设计为在页边距中添加额外的 space。页边距应该属于 reader 以便轻松保存您的文档、添加注释等。如果没有足够的 space 诸如费马大定理之类的东西是你的错:)

相反,我建议使用 tabularx 将 table 放入可用的 space:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{float}
\usepackage{array}
\usepackage{booktabs,caption}
\usepackage[flushleft]{threeparttable}
\usepackage{indentfirst}
\setlength\extrarowheight{2pt}
\usepackage{tabularx}
\usepackage{siunitx}


\title{}
\author{}


\begin{document}


\maketitle
\section{Introduction}



\section{Data Summary}





\begin{table}[H]
\begin{threeparttable}
\small

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\hskip -2cm
\caption{Summary of numeric variables}
\begin{tabularx}{\linewidth}{@{}XS[table-format=3.0]S[table-format=2.4]S[table-format=1.4]S[table-format=-1.4]S[table-format=2.4]@{}}
\toprule
                    &\multicolumn{5}{c}{(1)}                                        \\addlinespace 
                    &       {count}&        {mean}&          {sd}&         {min}&         {max}\
\midrule
Unemployment Rate   &         170&      8.3323&      4.1395&      3.1000&     26.0919\
log of spending per person for secondary education&         168&      9.0229&      0.4344&      7.6109&      9.9616\
log of spending per person for teriary education&         165&      9.5241&      0.3967&      8.7797&     10.7478\
log of exchange rate&         170&      1.0983&      2.0997&     -0.4986&      7.0522\
log of GDP per person&         168&     10.5306&      0.3592&      9.7330&     11.5213\
log of GDP fixed purchasing power&         165&     27.0045&      1.4905&     23.3668&     30.5051\
log of GDP growth   &         159&      1.2268&      0.7896&     -1.7458&      3.0063\
Long-term interest rate on government bonds&         165&      3.8447&      2.1387&      0.5511&     10.5465\
Short-term interest rate&         170&      1.7675&      1.9971&      0.0078&     10.3317\
\bottomrule
\end{tabularx}
\begin{tablenotes}
\small
\item Source: OECD (2019), Education at a Glance Database, http://stats.oecd.org
\end{tablenotes}
\end{threeparttable}
\end{table}


\section{Methodology}

\end{document}

其他一些评论:

  • 尽量避免 [H],这通常是次优放置浮动的保证。我建议 [htbp] 而不是

  • *{1}{ccccc} 可以缩写为 ccccc*{5}{c}

  • 你已经加载了booktabs包,所以我建议使用\toprule\midrule\bottomrule而不是\hline因为它们周围有更好的间距

  • 我建议使用 booktabs 包中的 \addlinespace 宏,而不是在 table 中手动添加空行

  • 使用 siunitx 包中的 S 列,您可以通过小数点标记对齐数字,并使用实际的减号而不是用连字符作弊

  • 你应该检查你的值的有效数字。如果您的标准偏差在 0.3 和 4.1 之间,则给出小数点后 4 位的值是没有意义的。