尝试将表格向左移动,但失败

问题描述 投票:0回答:1

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

\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}

我的桌子看起来像这样:enter image description here

并且我想让我的桌子离开至少约1.5厘米。还有其他方法吗?

latex tex
1个回答
0
投票
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{float}
\usepackage{array}
\usepackage{booktabs,caption}
\usepackage[flushleft]{threeparttable}
\usepackage{indentfirst}
\setlength\extrarowheight{2pt}
\usepackage{tabularx}


\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}{@{}X*{5}{c}@{}}
\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}
© www.soinside.com 2019 - 2024. All rights reserved.