缩小单元格(包括引文)并在表格中使用项目符号

缩小单元格(包括引文)并在表格中使用项目符号

我有下表,我想修改两件事:

1)缩小第一列,可能使用两行或更多行来引用 2)使用项目符号来表示最后一列内容。

\begin{table*}[th!]
  \center
  \scriptsize
  \caption{Systematic literature review.\label{tab:lit_rev}}
  \begin{tabularx}{\textwidth}{lllllX}
    Article & Methodology & Model objective & Decision phase & Vehicle Types & Features\\
    \hline
    \cite{ma2017designing} & \begin{tabular}[c]{@{}l@{}}Linear\\ programming\end{tabular} & \begin{tabular}[c]{@{}l@{}}Minimize traffic\\ on arcs\end{tabular} & \begin{tabular}[c]{@{}l@{}}Operational,\\ rolling horizon\end{tabular} & SAV           & \begin{tabular}[c]{@{}l@{}}No carpooling\\ Parking at any node\\ Simulated traffic congestion\\ Flexible departure times\end{tabular} \\
    \hline
    \cite{hyland2018dynamic} & \begin{tabular}[c]{@{}l@{}}Agent-based\\ simulation\end{tabular} & \begin{tabular}[c]{@{}l@{}}Minimize miles\\ driven and\\ client wait times\end{tabular} & \begin{tabular}[c]{@{}l@{}}Operational,\\ rolling horizon,\\ real-time\end{tabular} & SAV & \begin{tabular}[c]{@{}l@{}}No carpooling\\ No info on parking\\ No traffic congestion\\ Flexible pick up time\\ Fixed number of AVs per day\end{tabular} \\
    \hline
  \end{tabularx}
\end{table*}

下面是一张截图,看看它现在的样子。对于我的修改 1,我找不到合适的方法。如果我使用带编号的文内引用,就不会出现这样的问题,但这不是一个选择。对于第二个,我找到了一些有用的链接,例如但它们要求使用 tabular 而不是 tabularx。

在此处输入图片描述

答案1

这是基于对所使用的文档类别和引文的假设和猜测而提出的建议。我p对第一列和最后一列使用了左对齐类型列。为了在最后一列中获得项目符号,我tabitem在包的帮助下定义了一个新环境enumitem。最后,我删除了第 2-4 列中的嵌套表格,并对X它们使用了左对齐的 txpe 列。从以下屏幕截图和示例中可以看到,您甚至可以增加字体大小,\scriptsize并且\footnotesize表格\small仍然可以很好地适应文本宽度。如果您的表格对于单个页面来说太长,您可能需要查看包xltabular

在此处输入图片描述

\documentclass{article}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage{tabulary}

\usepackage{booktabs}

\usepackage{enumitem}
\newlist{tabitem}{itemize}{1}
\setlist[tabitem]{wide=0pt, nosep, leftmargin= * ,label=\textbullet,after=\vspace{-\baselineskip},before=\vspace{-0.6\baselineskip}}

\usepackage[style=authoryear-comp]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{ma2017designing,
  author = {Ma, A.},
  year = {2007},
  title = {Title},
  publisher = {Publisher},
}
@book{hyland2018dynamic,
  author = {Hyland, A. and Mahmassani},
  year = {2018},
  title = {Title},
  publisher = {Publisher},
}
\end{filecontents}


\begin{document}

\begin{table*}[th!]
  \center
  \scriptsize
  \caption{Systematic literature review.\label{tab:lit_rev}}
  \begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}p{1.5cm}*{3}{>{\raggedright\arraybackslash}X}lp{4cm}}
    Article & Methodology & Model\newline objective & Decision phase & Vehicle Types & Features\\
    \toprule
    \cite{ma2017designing} & Linear programming & Minimize traffic on arcs & Operational, rolling horizon & SAV           & \begin{tabitem} \item No carpooling \item Parking at any node \item Simulated traffic congestion \item Flexible departure times\end{tabitem} \\
    \midrule
    \cite{hyland2018dynamic} & Agent-based simulation & Minimize miles driven and client wait times & Operational, rolling horizon, real-time & SAV & \begin{tabitem}\item No carpooling \item No info on parking \item No traffic congestion \item Flexible pick up time \item Fixed number of AVs per day\end{tabitem} \\
    \bottomrule
  \end{tabularx}
\end{table*}

\begin{table*}[th!]
  \center
  \footnotesize
  \caption{Systematic literature review.\label{tab:lit_rev}}
  \begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}p{1.5cm}*{3}{>{\raggedright\arraybackslash}X}lp{4.2cm}}
    Article & Methodology & Model\newline objective & Decision phase & Vehicle Types & Features\\
    \toprule
    \cite{ma2017designing} & Linear programming & Minimize traffic on arcs & Operational, rolling horizon & SAV           & \begin{tabitem} \item No carpooling \item Parking at any node \item Simulated traffic congestion \item Flexible departure times\end{tabitem} \\
    \midrule
    \cite{hyland2018dynamic} & Agent-based simulation & Minimize miles driven and client wait times & Operational, rolling horizon, real-time & SAV & \begin{tabitem}\item No carpooling \item No info on parking \item No traffic congestion \item Flexible pick up time \item Fixed number of AVs per day\end{tabitem} \\
    \bottomrule
  \end{tabularx}
\end{table*}

\begin{table*}[th!]
  \center
  \small \setlength{\tabcolsep}{4pt}
  \caption{Systematic literature review.\label{tab:lit_rev}}
  \begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}p{2cm}*{3}{>{\raggedright\arraybackslash}X}lp{4.4cm}}
    Article & Methodology & Model\newline objective & Decision phase & Vehicle Types & Features\\
    \toprule
    \cite{ma2017designing} & Linear programming & Minimize traffic on arcs & Operational, rolling horizon & SAV           & \begin{tabitem} \item No carpooling \item Parking at any node \item Simulated traffic congestion \item Flexible departure times\end{tabitem} \\
    \midrule
    \cite{hyland2018dynamic} & Agent-based simulation & Minimize miles driven and client wait times & Operational, rolling horizon, real-time & SAV & \begin{tabitem}\item No carpooling \item No info on parking \item No traffic congestion \item Flexible pick up time \item Fixed number of AVs per day\end{tabitem} \\
    \bottomrule
  \end{tabularx}
\end{table*}

\end{document}

相关内容