如何减少表格的宽度?

如何减少表格的宽度?

我想把这个表放在一个页面中:

\begin{table}[h]
\begin{tabular}{ccccccccc}
\hline
\textbf{No.} & \textbf{Author (year)}                                                & \textbf{Country} & \textbf{Journal}                                                                                                         & \textbf{Title}                                                                                                         & \textbf{Research method} & \textbf{E-grocery model} & \textbf{costs impact} & \textbf{Greenhouse gas emission} \\ \hline

1.           & Ring and Douglas (2001)                                                    & Finland          & \textit{International Journal of Retail \& Distribution Management}                                                      & Viewpoint: reaching the consumer through e-grocery VMI                                                                                           & Empirical                & Ancillary                & Core                  & Absent                           \\

2.           & \begin{tabular}[c]{@{}c@{}}K‰m‰r‰inen,\\ SmÂros et al. (2001)\end{tabular} & Finland          & \textit{\begin{tabular}[c]{@{}c@{}}International Journal of Retail \& Distribution\\ Management\end{tabular}}            & \begin{tabular}[c]{@{}c@{}}Cost-effectiveness\\ in the e-grocery business\end{tabular}                                                           & Conceptual Analitycal    & Absent                   & Core                  & Absent                           \\

3.           & K‰m‰r‰inen et al. (2001)                                                   & Finland          & \textit{\begin{tabular}[c]{@{}c@{}}International Journal of Physical Distribution\\ \& Logistic Management\end{tabular}} & \begin{tabular}[c]{@{}c@{}}The\\ reception box impact on home delivery efficiency in the e-grocery business\end{tabular}                         & Conceptual Analitycal    & Core                     & Core                  & Absent                           \\

4.           & \begin{tabular}[c]{@{}c@{}}Punakivi\\ and Tanskanen (2002)\end{tabular}    & Finland          & \textit{\begin{tabular}[c]{@{}c@{}}International\\ Journal of Retail \& Distribution Management\end{tabular}}            & \begin{tabular}[c]{@{}c@{}}Increasing\\ the cost efficiency of e-fulfilment using shared reception boxes\end{tabular}                            & Analytical               & Ancillary                & Core                  & Absent                           \\

5.           & Hanne Siikavirta et al. (2003)                                             & Finland          & \textit{Journal of industrial ecology}                                                                                   & \begin{tabular}[c]{@{}c@{}}Effects\\ of e-commerce on greenhouse gas emissions\end{tabular}                                                      & Empirical                & Absent                   & Absent                & Core                             \\

6.           & Heejin Lim et al. (2009)                                                   & USA              & \textit{\begin{tabular}[c]{@{}c@{}}International Journal of Retail \& Distribution\\ Management\end{tabular}}            & \begin{tabular}[c]{@{}c@{}}Web\\ content analysis of e-grocery retailers: a longitudinal study\end{tabular}                                      & Empirical                & Ancillary                & Absent                & Absent                           \\

7.           & \begin{tabular}[c]{@{}c@{}}Durand\\ and Gonzalez-Feliu (2012)\end{tabular} & France           & \textit{\begin{tabular}[c]{@{}c@{}}The Seventh International Conference on City\\ Logistics\end{tabular}}                & \begin{tabular}[c]{@{}c@{}}Urban\\ logistics and e-grocery: Have proximity delivery services a positive impact on\\ shopping trips?\end{tabular} & Conceptual Analitycal    & Core                     & Absent                & Core                             \\

8.           & Van Loon et al. (2014)                                                     & Germany          & \textit{Journal of Cleaner Production}                                                                                   & \begin{tabular}[c]{@{}c@{}}A\\ comparative analysis of carbon emissions from online retailing of fast moving consumer\\ goods\end{tabular}       & Analytical               & Absent                   & Absent                & Core                             \\ \hline
\end{tabular}
\end{table}

问题是宽度太大,一半超出纸张范围,因为 Latex 只用一行就将所有文本写入单元格中。我认为每个单元格的最佳解决方案是将文本分成多行,我该怎么做?

我尝试使用该命令\\,但它不能正常工作...感谢您的帮助!

答案1

您的表格很长,因此很难放入文档的文本宽度。经过一些调整,我得到了以下结果:

在此处输入图片描述

为此,我将字体大小减小到\scriptsize,而不是tabular使用\tabularx,并用文本的临时宽度定义其宽度。我还定义了新的列类型 L,它将单元格的多行内容左对齐。使用这种类型的列,我可以省略用于多行单元格的表格。

对于标题,我选择makecell包,对于水平线,我选择包booktabs

\documentclass{article}
\setlength\textwidth{16cm}
    \usepackage{tabularx,booktabs,makecell}
    \newcolumntype{L}{>{\raggedright\arraybackslash}X}
    \renewcommand\theadfont{\bfseries\sffamily}
\usepackage[active,floats,tightpage]{preview}
    \setlength\PreviewBorder{1em}

\begin{document}
\begin{table}[h]
    \scriptsize
        \setlength{\tabcolsep}{3pt}
\begin{tabularx}{\hsize}{@{}c>{\raggedright}p{24mm}l>{\itshape}LLLccc@{}}
    \toprule
\thead{No.} & \thead{Author (year)} 
    & \thead{Country} & \thead{Journal} 
        & \thead{Title} & \thead{Research\\ method} 
            & \thead{E-grocery\\ model} & \thead{Costs\\ impact} 
                & \thead{Greenhouse\\ gas emission}         \\ 
    \midrule
1.  & Ring and Douglas (2001)               & Finland   
        & International Journal of Retail \& Distribution Management
            & Viewpoint: reaching the consumer through e-grocery VMI 
                & Empirical & Ancillary & Core  & Absent    \\
2.  & K‰m‰r‰inen, SmÂros et al. (2001)      & Finland          
        & International Journal of Retail \& Distribution Management
            & Cost-effectiveness in the e-grocery business
                & Conceptual Analitycal    
                    & Absent    & Core  & Absent            \\
    \bottomrule
\end{tabularx}
\end{table}
    \end{document}

表格不完整,仅显示前三行,如何编辑表格并显示结果。

如果scriptsize字体太小,那么您应该考虑使用˙˙sidewaytable`` 环境,其中表格旋转 90 度。

相关内容