将长水平表向左移动

将长水平表向左移动

我有一张很长的水平表格,我想将它向左移动一点,使其与页面完美契合。有人知道怎么做吗?谢谢!

\begin{table}
\centering
\footnotesize\setlength{\tabcolsep}{0.01pt}
\begin{tabular}{l@{\hspace{0.01pt}} *{18}{c}}
\toprule
\bfseries Model & \multicolumn{18}{c}{\bfseries Parameters} \\
\cmidrule(l){2-18}
& $\omega$ & $\phi$ & $\alpha$ & $\beta$ & $\gamma_1$ & $\gamma_2$ & $\gamma_3$ & 
$\gamma_4$ & $\gamma_5$ & $\gamma_6$ & $\theta_1$  & $\theta_2$ & $\theta_3$ & $\theta_4$ 
& $\varphi_1$ & $\varphi_2$ & $\varphi_3$ \\
\midrule
\bfseries 2
& - & 0.998  & 0.0032 & 0.0002 &  -0.0058 & -0.1887& - & - & - & - & 0.593 &
0.232 & - & - &  0.1476 & -0.1377 & -0.0288 \\
\bfseries 4
& 1 & - & - & - & 0.0003 & -0.0006 &  -0.0005 & 0.0002
-&-& &  0.823 & - & - & - & 0.0454 & -0.1384 \\
\bfseries 5
& 1 & - &  0.0054 & - & 0.0010 & -0.0002 & 0.0006 & -0.0020 & 0.0003 & -0.0007     
& 0.8524 & 0.2764 & -0.2393& 0.0348 & 0.0395 & -0.4177&- \\
\bottomrule
\addlinespace
\multicolumn{18}{l}{1: DSHW(7, 364) ; 2: BATS(7, 365); 3: BATS(7, 91, 365);\\
\end{tabular}
\caption{Parameters chosoen for all models}\label{tab:Hparameters}
\end{table}

答案1

您可以将表格环境括在 a 中\makebox[0pt]{…}(并保留\centering)。但是,我建议交换行和列,这样看起来会更好。此外,您应该使用S列类型,从 开始siunitx:您的数字将在小数点上对齐,并且减号不会是连字符。请注意,表格的序言应该有17居中的列,而不是 18 个。

添加:我建议使用此代码,其中字体大小可以设置为\small

    \documentclass{article}
    \usepackage[utf8]{inputenc}
    \usepackage[a4paper]{geometry}
    \usepackage{booktabs, caption, siunitx, threeparttable} %
     \usepackage{showframe}
    \renewcommand\ShowFrameLinethickness{0.2pt}

     \begin{document}

    \begin{table}[!htb]
      \centering
      \begin{threeparttable}
        \small\setlength\tabcolsep{4pt}
        \sisetup{table-format=-1.4,table-number-alignment=center}
        \caption{Parameters chosen for all models}\label{tab:Hparameters}
        \begin{tabular}{>{$}c<{$} *{3}{S}c>{$}c<{$} *{3}{S}}
          \addlinespace[-\aboverulesep]
          \cmidrule[\heavyrulewidth]{1-4}\cmidrule[\heavyrulewidth]{6-9}
          \textbf{Parameters} & \multicolumn{3}{c}{\bfseries Model}  & \rule{1cm}{0pt} &  \textbf{Parameters} & \multicolumn{3}{c}{\bfseries Model} \\
          \cmidrule(lr){2-4}\cmidrule(lr){7-9}
                   & {\bfseries 2} & {\bfseries 4} & {\bfseries 5} &   &           & {\bfseries 2} & {\bfseries 4} & {\bfseries 5} \\
          \cmidrule[\lightrulewidth]{1-4}\cmidrule[\lightrulewidth]{6-9}
          \omega   & {–}         & {1}           & {1}           &   & \theta_1  & 0.593         & 0.823         & 0.8524        \\
          \phi     & 0.998         & {–}         & {–}         &   & \theta_2  & 0.232         & {–}         & 0.2764        \\
          \alpha   & 0.0032        & {–}         & 0.0054        &   & \theta_3  & {–}         & {–}         & -0.2393       \\
          \beta    & 0.0002        & {–}         & {–}         &   & \theta_4  & {–}         & {–}         & 0.0348        \\
          \addlinespace
          \gamma_1 & -0.0058       & 0.0003        & 0.0010        &   & \varphi_1 & 0.1476        & 0.0454        & 0.0395        \\
          \gamma_2 & -0.1887       & -0.0006       & -0.0002       &   & \varphi_2 & -0.1377       & -0.1384       & -0.4177       \\
          \gamma_3 & {–}         & -0.0005       & 0.0006        &   & \varphi_3 & -0.0288       & {–}         & {–}         \\
          \gamma_4 & {–} & 0.0002 & -0.0020 \\
          \gamma_5 &{–} &{–} & 0.0003 \\
          \gamma_6 &{–} &{–} & -0.0007 \\
          \cmidrule[\heavyrulewidth]{1-4}\cmidrule[\heavyrulewidth]{6-9}
        \end{tabular}
        \begin{tablenotes}[para]\footnotesize
          \item[]1: DSHW(7, 364) ;
          \item[]2: BATS(7, 365);
          \item[]3: BATS(7, 91, 365).
        \end{tablenotes}
      \end{threeparttable}
    \end{table}

    \end{document}


\begin{table}
  \centering
  \begin{threeparttable}
    %\small
    \sisetup{table-format=-1.4,table-number-alignment=center}
    \caption{Parameters chosen for all models}\label{tab:Hparameters}
    \begin{tabular}{>{$}c<{$} *{3}{S}}
      \toprule
      \textbf{Parameters} & \multicolumn{3}{c}{\bfseries Model} \\
      \cmidrule(lr){2-4}
                & {\bfseries 2} & {\bfseries 4} & {\bfseries 5} \\
      \midrule
      \omega    & {–}         & {1}           & {1}           \\
      \phi      & 0.998         & {–}         & {–}         \\
      \alpha    & 0.0032        & {–}         & 0.0054        \\
      \beta     & 0.0002        & {–}         & {–}         \\
      \addlinespace
      \gamma_1  & -0.0058       & 0.0003        & 0.0010        \\
      \gamma_2  & -0.1887       & -0.0006       & -0.0002       \\
      \gamma_3  & {–}         & -0.0005       & 0.0006        \\
      \gamma_4  & {–}         & 0.0002        & -0.0020       \\
      \gamma_5  & {–}         & {–}         & 0.0003        \\
      \gamma_6  & {–}         & {–}         & -0.0007       \\
      \addlinespace
      \theta_1  & 0.593         & 0.823         & 0.8524        \\
      \theta_2  & 0.232         & {–}         & 0.2764        \\
      \theta_3  & {–}         & {–}         & -0.2393       \\
      \theta_4  & {–}         & {–}         & 0.0348        \\
      \addlinespace
      \varphi_1 & 0.1476        & 0.0454        & 0.0395        \\
      \varphi_2 & -0.1377       & -0.1384       & -0.4177       \\
      \varphi_3 & -0.0288       & {–}         & {–}         \\
      \bottomrule
    \end{tabular}
    \begin{tablenotes}[para]\footnotesize
      \item[]1: DSHW(7, 364) ;
      \item[]2: BATS(7, 365);
      \item[]3: BATS(7, 91, 365).
    \end{tablenotes}
  \end{threeparttable}
\end{table}

在此处输入图片描述

答案2

\documentclass{article}

\usepackage{booktabs}
\usepackage{rotating}
\usepackage{lipsum}

\begin{document}

\lipsum

\begin{sidewaystable}\hspace*{3cm}
\footnotesize\setlength{\tabcolsep}{0.01pt}
\begin{tabular}{l@{\hspace{0.01pt}} *{18}{c}}
\toprule
\bfseries Model & \multicolumn{18}{c}{\bfseries Parameters} \\
\cmidrule(l){2-18}
& $\omega$ & $\phi$ & $\alpha$ & $\beta$ & $\gamma_1$ & $\gamma_2$ & $\gamma_3$ & 
$\gamma_4$ & $\gamma_5$ & $\gamma_6$ & $\theta_1$  & $\theta_2$ & $\theta_3$ & $\theta_4$ 
& $\varphi_1$ & $\varphi_2$ & $\varphi_3$ \\
\midrule
\bfseries 2
& - & 0.998  & 0.0032 & 0.0002 &  -0.0058 & -0.1887& - & - & - & - & 0.593 &
0.232 & - & - &  0.1476 & -0.1377 & -0.0288 \\
\bfseries 4
& 1 & - & - & - & 0.0003 & -0.0006 &  -0.0005 & 0.0002
-&-& &  0.823 & - & - & - & 0.0454 & -0.1384 \\
\bfseries 5
& 1 & - &  0.0054 & - & 0.0010 & -0.0002 & 0.0006 & -0.0020 & 0.0003 & -0.0007     
& 0.8524 & 0.2764 & -0.2393& 0.0348 & 0.0395 & -0.4177&- \\
\bottomrule
\addlinespace
\multicolumn{18}{l}{1: DSHW(7, 364) ; 2: BATS(7, 365); 3: BATS(7, 91, 365);}\\
\end{tabular}
\caption{Parameters chosoen for all models}\label{tab:Hparameters}
\end{sidewaystable}

\lipsum

\end{document}

相关内容