我有下表,我想修改兩件事:
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
fo增加到\footnotesize
Even \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}