我有一张桌子,我想旋转,有什么帮助吗?我收到工具箱错误

我有一张桌子,我想旋转,有什么帮助吗?我收到工具箱错误
\begin{table}[!ht]
    \centering
    \begin{adjustbox}{max width=1.0\textwidth}
\begin{tabular}{ccccccccc} 
    \hline
    Percentage fraction of household wastes &Greater Accra(Newtown) & Ashanti region(Asokwa)& Northern region(Tamale) & Upper West region(Wa) & Central region(Cape Coast) & Western region(Tarkwa) & Eastern region(Aburi) & This survey (all ten regions in Ghana)  \\ \hline
    Organic & 63 & 54.5  & 57.5 & 48 &63  & 68.6 & 70 &61\\ 
    Paper   & 6 & 2.8  & 5 & 3 &3  & 4.9 & 6 &5\\ 
    Plastic & 10 & 6.8 & 20 & 5 & 2 & 16 & 16 &14\\ 
    Metal   & 2 & 1.7  & 10 & 5 & 1 & 2 & 3 &3\\ 
    Glass   & 2 & 1.1 & 5 & - & 1& 0.9 & 5&3 \\ 
    Leather/Rubber  & - & - & -  & - & - & - & -&1 \\ 
    Textile & 5 & 1.8 & - & 4 & 1 & 3.23 & - &2\\ 
    Inert   & 12 & 31.4 & 2.5  & 33  &26  & 4.2 & - &6\\ 
    Miscellaneous   & - & - & - & 0.21  & 0.25  & 29 & 0.0075& \\ 
    \hline
\end{tabular}
\end{adjustbox}
\end{table} 

答案1

由于对您的文档(使用的文档类、页面布局、使用的包)一无所知,以下建议只能作为我在标准article文档中格式化您的表格的起点/原则:

\documentclass{article}
\usepackage{siunitx}
\usepackage{rotating}
\usepackage{booktabs, makecell}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
    \begin{sidewaystable}
    \centering
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} l
             S[table-format=2.0]
        *{2}{S[table-format=2.1]}
        *{3}{S[table-format=2.2]}
             S[table-format=2.4]
             S[table-format=2.0]
                            }
    \toprule
\thead{Percentage fraction\\ of household wastes}
    &   {\thead{Greater\\ Accra\\ (Newtown)}}
        &   {\thead{Ashanti\\ region\\ (Asokwa)}}
            &   {\thead{Northern\\ region\\ (Tamale)}}
                &   {\thead{Upper\\ West\\ region (Wa)}}
                    &   {\thead{Central\\ region\\ (Cape Coast)}}
                        &   {\thead{Western\\ region\\ (Tarkwa)}}
                            &   {\thead{Eastern\\ region\\ (Aburi)}}
                                &   {\thead{This survey\\(all regions\\ in Ghana)}} \\
    \midrule
Organic         & 63  & 54.5 & 57.5 & 48    & 63   & 68.6 & 70     & 61 \\
Paper           & 6   &  2.8 &  5   &  3    &  3   &  4.9 &  6     &  5 \\
Plastic         & 10  &  6.8 & 20   &  5    &  2   & 16   & 16     & 14 \\
Metal           &  2  &  1.7 & 10   &  5    &  1   &  2   &  3     &  3 \\
Glass           &  2  &  1.1 &  5   & {-}   &  1   &  0.9 &  5     &  3 \\
Leather/Rubber  & {-} & {-}  & {-}  & {-}   & {-}  & {-}  & {-}    &  1 \\
Textile         &  5  &  1.8 & {-}  &  4    &  1   & 3.23 & {-}    &  2 \\
Inert           & 12  & 31.4 & 2.5  & 33    & 26   & 4.2  & {-}    &  6 \\
Miscellaneous   & {-} & {-}  & {-}  &  0.21 & 0.25 & 29   & 0.0075 &    \\
    \bottomrule
\end{tabular*}
    \end{sidewaystable}
\end{document}

在此处输入图片描述

相关内容